好长时间没有安装新的FreeSWITCH了,只是知道1.10.4以后spandsp和sofia-sip分离出来,需要单独编译,但上次的实际操作还是很久之前,今天又安装了一次,索性将整个过程记录下来,以供后续参考,也供大家参考 😃
更详细的说明可参考官方说明
先看一下官方解释:
SpanDSP and sofia-sip
Sofia-sip and SpanDSP dependencies have been removed from the FreeSWITCH™ tree since v1.10.4 Release (05 August 2020).
You can find source files of Sofia-sip here: https://github.com/freeswitch/sofia-sip
SpanDSP sources are here: https://github.com/freeswitch/spandsp
Packages for Sofia-sip and SpandDSP are available for all supported platforms from our packaging repos.
You might have to visit each directory, run ./bootstrap.sh then ./configure then make install
在编译FreeSWITCH之前需要先安装一下spandsp和sofia-sip,不然会报错checking for spandsp >= 3.0... configure: error: no usable spandsp; please install spandsp3 devel package or equivalent
或者checking for sofia-sip-ua >= 1.12.12... configure: error: no usable sofia-sip; please install sofia-sip-ua devel package or equivalent
安装步骤如下:
安装sofia-sip:
git clone https://github.com/freeswitch/sofia-sip.git
cd sofia-sip
./bootstrap.sh
./configure
make
make install
安装spandsp:
git clone https://github.com/freeswitch/spandsp
cd spandsp
./bootstrap.sh
./configure
make
make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
最后一句千万不要忘了,它是为了告诉编译器去哪里找spandsp和sofia-sip。
官方说明如下:
In case of errors about "no usable spandsp" or sofia-sip, compile and install spandsp and sofia-sip first, then
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
where ls /usr/local/lib/pkgconfig should list at least
sofia-sip-ua.pc spandsp.pc
Then FreeSWITCH should compile properly.
接下来就是获取源码并安装了,国内上github有时会比较慢,可以找国内的镜像。
yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum-builddep -y freeswitch
yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git
yum install -y devtoolset-4-gcc*
cd /usr/local/src
git clone -b v1.10 https://github.com/signalwire/freeswitch.git freeswitch
cd /usr/local/src/freeswitch
./bootstrap.sh -j
./configure --prefix=/usr/local/freeswitch-test
make
make install
至此,FreeSWITCH就安装成功啦。
如果你不想使用某个模块,比如mod_av,可以直接在/usr/local/freeswitch-test/modules.conf
内将其注释掉。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)