标签:list $$ name either src file rev sed section
个人安装环境:
OS:CentOS6.7 64位
FreeSWITCH Ver:1.6.17
安装 之前, 最好 先安装 这几个东西(如果有, 请忽略):
yasm (有nasm的话 不用装这个) , opus-devel(可能 提示 libopus-dev 或 libopus-devel 等) , lua-devel , libsndfile-devel , libtiff-devel
当然了, 你也可以 先不管, 等 出错 提示了, 在按照下面的方法安装:
错误提示: Neither yasm nor nasm have been found
((which nasm) || (which yasm) || (git clone https://github.com/yasm/yasm.git && cd yasm && ./autogen.sh && make && make install))
错误提示: 找不到 lua.h 等lua的头文件
yum install lua lua-devel
错误提示: You must install libopus-dev to build mod_opus
yum -y install opus-devel #可能需要清理: make clean && ./configure && make
如果还是报这个错误, 就注释这两行,在Makefile:
vim freeswitch/src/mod/codecs/mod_opus/Makefile # Comment line 896 & 897 #install: error #all: error
错误提示 : You must install libsndfile-dev to build mod_sndfile
#下载包libsndfile-x.x.xx.tar.gz from地址 http://www.mega-nerd.com/libsndfile/#Download, 然后 tar zxvf libsndfile-1.0.26.tar.gz ./configure make make install cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib64/pkgconfig #然后 重新 configure FreeSWITCH...
如果还是报这个错误,就注释这两行,在Makefile:
vim src/mod/formats/mod_sndfile/Makefile # Comment line 897 & 898 #install: error #all: error
错误提示: You must install libyuv-dev to build mod_fsv
cd freeswitch/libs git clone https://freeswitch.org/stash/scm/sd/libyuv.gitcd libyuv make -f linux.mk CXXFLAGS="-fPIC -O2 -fomit-frame-pointer -Iinclude/" make install cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/
错误提示: You must install libvpx-dev to build ....
cd freeswitch/libs git clone https://freeswitch.org/stash/scm/sd/libvpx.git cd libvpx ./configure --enable-pic --disable-static --enable-shared make make install cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/
错误提示: You must install libpng-dev to build ....
git clone https://freeswitch.org/stash/scm/sd/libpng.git cd libpng ./configure make make install cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/
错误提示: You must install libav-dev to build ....
git clone https://freeswitch.org/stash/scm/sd/libav.git cd libav ./configure #CFLAGS="-fPIC" ./configure --enable-pic --enable-shared make # make CXXFLAGS="-fPIC" make install
configure: loading cache ../../config.cache configure: error: `CFLAGS‘ was not set in the previous run configure: error: `CPPFLAGS‘ was not set in the previous run configure: error: in `/usr/src/freeswitch.git/libs/spandsp‘: configure: error: changes in the environment can compromise the build configure: error: run `make distclean‘ and/or `rm ../../config.cache‘ and start over
解决: 重新 configure
./configure -C && make
fs默认不加载中文语音。需要在fs的src中首先编译中文模块。
a.在 configure 之前, 编辑 modules.conf, 取消 "#say/mod_say_zh" 这行的注释 ->"say/mod_say_zh"
b.补救安装 `make mod_say_zh-install`
在fs控制台上加载该模块 `load mod _say_zh`
若想fs在每次启动的时候都加载该模块,就在`autoload_configs/modules.conf.xml`中`<load module="mod_say_zh">`的注释去掉即可。
也可以这样:
sed -i ‘s#<!-- <load module="mod_say_zh"/> -->#<load module="mod_say_zh"/>#g‘ autoload_configs/modules.conf.xml
`<X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/en/us/callie"/>`修改为中文语音文件的目录
`<X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/zh/cn/link"/>`
加入以下几行(也可以不加)
<X-PRE-PROCESS cmd="set" data="default_language=zh"/>
<X-PRE-PROCESS cmd="set" data="default_dialect=cn"/>
<X-PRE-PROCESS cmd="set" data="default_voice=sue"/>
cd conf/lang cp -R en zh mv zh/en.xml zh/zh.xml vim zh/zh.xml (替换路径`en/us/callie`和 `en`等:第二行修改为) <language name="zh" say-module="zh" sound-prefix="$${sounds_dir}/zh/cn/link" tts-engine="cepstral" tts-voice="link">
在`freeswitch.xml`的`<section name="languages" `节点中增加一行 (或那一行取消注释)
` <X-PRE-PROCESS cmd="include" data="lang/zh/*.xml"/>`
默认是只接受本机连接的,稍一改动就 内外都不能连接了,或者只能接受内外之一连接
解决方法:
1. event_socket.conf.xml 加入: <param name="apply-inbound-acl" value="domains"/> 2. acl.conf.xml 加入: <list name="domains" default="deny"> <node type="allow" domain="$${domain}"/> <node type="allow" cidr="192.168.1.0/24"/> <node type="allow" cidr="127.0.0.1/24"/> </list>
<未完待续,欲知后事如何,且听下回分解>
标签:list $$ name either src file rev sed section
原文地址:https://www.cnblogs.com/myfk5741/p/11367596.html