centos7.9下安装freeswitch-1.10.5.-release详细教程(极其简单)
之前分享过freeswitch1.6.0的源码安装,相对目前freeswitch版本比较老了。今天分享下freeswitch-1.10.5.-release版本的安装,比较之前的安装流程要简单的多。注意freeswitch随着版本升级,sofia-sip、spandsp模块已经能分离出去,需要手动安装
重点:因为我的服务器之前安装过1.60版本,所以可能有些依赖和工具已经安装过了,本次也是我刚安装1.10.5版本后最新整理的文章,所以可能有些安装过程中的问题忽略了。大家参照安装中有什么问题可以留言最好是主页信息联系我留言我不怎么看。
另外,本人可提供商用的freeswitch相关业务产品及开发,可浏览以往文章。包括呼叫中心核心接口产品、语音实时质检、开源asr对接等业务
1:配置PKG_CONFIG_PATH环境变量
需要在/etc/profile中配置下PKG_CONFIG_PATH环境变量,后续安装中会自动在变量目录安装一些库文件
vi /etc/profile
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
source /etc/profile
2:安装必要依赖
yum install autoconf automake libtool openssl* libtiff* libjpeg*yum install yum-utils
yum-builddep -y freeswitch --skip-broken
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools
3:下载freeswitch源码
cd /usr/local/src
git clone -b v1.10.5 https://github.com/signalwire/freeswitch.git freeswitch
3:安装sofia-sip、spandsp模块
此版本需要单独安装两个模块,在哪个目录编译应该没有要求,但是我之前的freeswitch版本模块都是在freeswitch源码的libs目录下,所以我也把两个模块放到libs目录下安装编译。
注意spandsp的安装git检出的版本,因为spandsp版本更新和freeswitch版本有匹配要求,1.10.5版本就是对应下面的spandsp版本,如果下载最新的spandsp会有问题
cd /usr/local/src/freeswitch/libs
git clone https://github.com/freeswitch/sofia-sip
cd sofia-sip
./bootstrap.sh
./configure
make
make installgit clone https://github.com/freeswitch/spandsp
cd spandsp
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4./bootstrap.sh
./configure
make
make install
4:提出mod_av和mod_signalwire模块
因为我这没涉及这两个模块的应用,所以删除这两个模块的编译,有涉及的可以自行安装
vi /usr/local/src/freeswitch/modules.conf下面两个模块注释掉
#applications/mod_av
#applications/mod_signalwire
5:安装freeswitch
执行以下命令后,/usr/local下就会出现freeswitch目录
./bootstrap.sh -j./configuremake
make -j install
6:安装语音文件
最后就到了非常慢的语音文件安装过程,很慢!看网速,我是开两个窗口同时安装
make -j cd-sounds-install
make -j cd-moh-install
7:添加软连接
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/bin/
启动查看日志
freeswitch -c -nonat -rp