1,安装spandsp
git clone https://github.com/freeswitch/spandsp
cd spandsp
./bootstrap.sh
./configure
make -j
make install
2,安装其他依赖,因为我在docker里安装,很多依赖都已经安装了,这里就略过了,可以查以前安装旧版本的wiki
3,安装freeswitch
wget https://github.com/signalwire/freeswitch/archive/v1.10.5.tar.gz
tar -zxf v1.10.5.tar.gz
cd freeswitch-1.10.5/
./bootstrap.sh
./configure
4,遇到错误
checking for spandsp >= 3.0... configure: error: no usable spandsp; please install spandsp3 devel package or equivalent
由于最新版本的freeswitch 把spandsp 和sofia-sip 库剥离了,所以需要自己安装
https://github.com/freeswitch/sofia-sip
https://github.com/freeswitch/spandsp
下载后安装如步骤1,安装spandsp,同理可以安装sofia-sip
5,查询后发现需要指定PKG_CONFIG_PATH
export PKG_CONFIG_PATH=/usr/local/freeswitch/new/freeswitch-1.10.5/libs/spandsp/
6,指定后重新configure
./configure&& make -j &&make install
出现错误
Makefile:1446: *** You must install libavformat-dev to build mod_av. Stop.
7,安装libav
方法有两种,1,下载源码,然后安装
2,安装ffmpeg
第一种方法代码下的太慢了,采用了第二种方法
参考https://www.cnblogs.com/zhaocundang/p/10676994.html
yum install -y epel-release
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
yum install ffmpeg ffmpeg-devel
重新编译,遇到下面错误
/usr/include/ffmpeg/libavutil/pixdesc.h:34:5: error: type of bit-field ‘plane’ is a GCC extension [-Werror=pedantic] uint16_t plane : 2; ^ /usr/include/ffmpeg/libavutil/pixdesc.h:40:5: error: type of bit-field ‘step_minus1’ is a GCC extension [-Werror=pedantic] uint16_t step_minus1 : 3; ^ /usr/include/ffmpeg/libavutil/pixdesc.h:46:5: error: type of bit-field ‘offset_plus1’ is a GCC extension [-Werror=pedantic] uint16_t offset_plus1 : 3; ^ /usr/include/ffmpeg/libavutil/pixdesc.h:52:5: error: type of bit-field ‘shift’ is a GCC extension [-Werror=pedantic] uint16_t shift : 3; ^ /usr/include/ffmpeg/libavutil/pixdesc.h:57:5: error: type of bit-field ‘depth_minus1’ is a GCC extension [-Werror=pedantic] uint16_t depth_minus1 : 4;
决定先暂时不安装mod_av 库了,以后再说了
遇到You must install libopus-dev to build mod_opus. Stop.
解决办法
Create the repository config file /etc/yum.repos.d/linuxtech.repo:
[linuxtech]
name=LinuxTECH
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET
yum install libopus-devel