FreeSWITCH 安装配置的 各种坑, 填坑
个人安装环境:
OS:CentOS6.7 64位
FreeSWITCH Ver:1.6.17
一. 编译出错
安装 之前, 最好 先安装 这几个东西(如果有, 请忽略):
yasm (有nasm的话 不用装这个) ,
opus-devel(可能 提示 libopus-dev 或 libopus-devel 等) ,
lua-devel , libsndfile-devel , libtiff-devel
当然了, 你也可以 先不管, 等 出错 提示了, 在按照下面的方法安装:
1. 安装 yasm , yasm 和 nasm 必须要有一个,必须装了!
错误提示: 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))
2.安装 lua-devel
错误提示: 找不到 lua.h 等lua的头文件
yum install lua lua-devel
3.安装 opus-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 &
#install: error
#all: error
4.安装 sndfile
错误提示 : You must install libsndfile-dev to build mod_sndfile
yum install libsndfile-devel
或者源代码编译安装:
#下载包libsndfile-x.x.xx.tar.gz from地址 http://www.mega-nerd.com/libsndfile/#Download, 然后
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz
tar zxvf libsndfile-1.0..tar.gz
./configure
make
make install
cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib64/pkgconfig
然后 重新 configure FreeSWITCH , 再 make
如果还是报这个错误,就修改这两行,在 Makefile 末尾:
vim src/mod/formats/mod_sndfile/Makefile
# 修改这两行install: install-am
all: install
然后 再 make
5.安装 libyuv
错误提示: 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/
6.安装 libvpx
错误提示: 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/
7.安装 libpng
错误提示: 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/
8.安装 libav
错误提示: You must install libav-dev to build mod_av
或者 : You must install libavformat-dev to build mod_av
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
安装完成,如果 make 还是 提示这个错误,重新执行:
./bootstrap.sh -j
./configure
make
二. 其他问题
1.错误提示: libs/spandsp
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中首先编译中文模块。
1.编译:
a.在 configure 之前, 编辑 modules.conf, 取消 "#say/mod_say_zh" 这行的注释 ->"say/mod_say_zh"
b.补救安装 `make mod_say_zh-install`
2.加载(不重启fs)
在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
3.修改 `var.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"/>
4.加入中文语音配置
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">
5. 载入中文配置
在`freeswitch.xml`的`<section name="languages" `节点中增加一行 (或那一行取消注释)
` <X-PRE-PROCESS cmd="include" data="lang/zh/*.xml"/>`
四. 解决ESL拒绝连接问题
默认是只接受本机连接的,稍一改动就 内外都不能连接了,或者只能接受内外之一连接
解决方法:
. event_socket.conf.xml 加入:
<param name="apply-inbound-acl" value="domains"/> . 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>
<未完待续,欲知后事如何,且听下回分解>
FreeSWITCH 安装配置的 各种坑, 填坑的更多相关文章
- Cloudera Manager 5.9 和 CDH 5.9 离线安装指南及个人采坑填坑记
公司的CDH早就装好了,一直想自己装一个玩玩,最近组了台电脑,笔记本就淘汰下来了,加上之前的,一共3台,就在X宝上买了CPU和内存升级了下笔记本,就自己组了个集群. 话说,好想去捡垃圾,捡台8核16线 ...
- Linux踩坑填坑记录
Linux踩坑填坑记录 yum安装失败[Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'mirrors.aliyun.com'" ...
- Phoenix踩坑填坑记录
Phoenix踩坑填坑记录 Phoenix建表语句 如何添加二级索引 判断某表是否存在 判断索引是否存在 Date类型日期,条件判断 杂项 记录Phoenix开发过程中的填坑记录. 部分原文地址:ph ...
- Kafka踩坑填坑记录
Kafka踩坑填坑记录 一.kafka通过Java客户端,消费者无法接收消息,生产者发送失败消息 二. 一.kafka通过Java客户端,消费者无法接收消息,生产者发送失败消息 在虚拟机上,搭建了3台 ...
- Spark踩坑填坑-聚合函数-序列化异常
Spark踩坑填坑-聚合函数-序列化异常 一.Spark聚合函数特殊场景 二.spark sql group by 三.Spark Caused by: java.io.NotSerializable ...
- Gulp的安装配置过程和一些小坑
谈谈gulp. 项目尾声,老师叫我去熟悉一下grunt前端自动化工具,第一次知道这种东西,我就查各种资料啊,发现grunt已经‘过时’了,大家都用gulp和webpack.我当然选择了配置最简单的gu ...
- Win10 安装配置 MongoDB 4.0 踩坑记
redis 官方没有 Windows 版的,微软维护的已经好久没更新了,所以就在想着换成 MongoDB. 于是一趟被我复杂化的踩坑之旅就开始了,同时也记录一下,避免有人遇见跟我一样的问题. 首先在 ...
- FreeSwitch安装配置记录
安装FreeSwitch 主要命令如下: git clone -b v1.2.stable git://git.freeswitch.org/freeswitch.gitcd freeswitch/. ...
- 关于Box Anemometer的安装配置遇到的几个坑
Box Anemometer是一个非常不错的MySQL慢查询可视化工具平台,具体就不多详述了,官网是https://github.com/box/Anemometer 最近动自己动手搭了一个,具体搭建 ...
随机推荐
- Springboot启动源码详解
我们开发任何一个Spring Boot项目,都会用到如下的启动类 @SpringBootApplication public class Application { public static voi ...
- DAX/PowerBI系列 - 父子层级(Parent-Child Hierarchy)
DAX/PowerBI系列 - 父子层级(Parent-Child Hierarchy)参考文章见最后 难度: ◆◆◇◇◇(2星) 应用场景: 其实很多时候对数据汇总都会有层级关系的问题,不过说的不是 ...
- C#:判断100--999之前的水仙花数
//判断100--999之前的水仙花数.水仙花数举例:153=13+53+33. using System;public class Program { public static void ...
- IE浏览器下使用AJAX登陆接口请求缓存与登陆不了的问题解决
问题: 在IE浏览器下面,登陆的时候老是登陆不上,但是打开控制台的时候再登陆却能登陆上. 分析: 通过抓包,发现,在不打开控制台的时候,少了一个接口的请求,却返回了改接口的返回信息,但是返回信息并不是 ...
- 【js数据结构】栈解决括号不匹配问题
栈可以用来判断一个算术表达式中的括号是否匹配. 思路:读取算术表达式,遇到左括号'{'.'['.'('压入栈,栈的特点是后入先出,所以当遇到右括号'}'.']'.')'的时候,取出栈顶元素,是否满足读 ...
- 'utf8' codec can't decode byte 0xd1 in position 931: invalid continuation byte解决方法
有时候,我得到这样的字符œ导致的UnicodeDecodeError错误. 我需要能够使串的UTF-8有或没有这些字符. 在工作中,经常遇到,读取一个文件,或者是从网页获取一个问题,明明看着是gb23 ...
- Asp.Net 常用工具类---Config操作(7)
近期工作比较忙,忙到忘记写博客(自己的借口,主要加班下班后不想动). 月初的时候,打算每两天写一篇博文,分享自己的一些心得和开发体验,无奈现在只写到第六篇,然而时间已经是20号,岁月不饶人! 总想写点 ...
- SQL Server里书签查找的性能伤害
在我的博客上,以前我经常谈到SQL Serverl里的书签查找,还有它们带来的很多问题.在今天的文章里,我想从性能角度进一步谈下书签查找,还有它们如何拉低你整个SQL Server性能. 书签查找—— ...
- Win10下 VS2017 安装失败 未能安装包“Microsoft.VisualStudio.AspNet45.Feature,version=15.0.26208.0”
事情的起因是这样的,前段时间,VS2017发布当天,想在自己的Win10上安装VS2017,然而,由于自己的系统很久没有更新(PS:自己关闭了Windows更新). 安装提示:未能安装包“Micros ...
- 不使用回调函数的ajax请求实现(async和await简化回调函数嵌套)
在常规的服务器端程序设计中, 比如说爬虫程序, 发送http请求的过程会使整个执行过程阻塞,直到http请求响应完成代码才会继续执行, 以php为例子 $url = "http://www. ...