软件版本说明
ubuntu版本18.04:https://releases.ubuntu.com/18.04.6/ubuntu-18.04.6-live-server-amd64.iso
freeswitch 版本1.10.7:https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.7.-release.tar.gz
spandsp包:https://codeload.github.com/freeswitch/spandsp/zip/refs/heads/master
sofia-sip包:https://codeload.github.com/freeswitch/sofia-sip/tar.gz/refs/tags/v1.13.9
libks: https://github.com/signalwire/libks.git
安装编译工具和依赖包
apt-get update
apt-get install -y autoconf git libtool g++ zlib1g-dev libjpeg-dev libcurl4-openssl-dev libspeex-dev libldns-dev libedit-dev libssl-dev pkg-config yasm liblua50-dev libopus-dev libsndfile1-dev libpq-dev libreadline-dev lua5.2 lua5.2-doc liblua5.2-dev libtiff5 libtiff5-dev
sudo apt-get install -y vim
sudo apt-get install -y g++
sudo apt-get install -y zlib1g-dev
sudo apt-get install -y libjpeg-dev
sudo apt-get install -y libsqlite3-dev
sudo apt-get install -y libcurl4-gnutls-dev
sudo apt-get install -y libpcre3-dev
sudo apt-get install -y libspeexdsp-dev
sudo apt-get install -y libedit-dev
sudo apt-get install -y libssl-dev
sudo apt-get install -y libopus-dev
sudo apt-get install -y liblua5.2-dev
sudo apt-get install -y libldns-dev
sudo apt-get install -y libsndfile1-dev
sudo apt-get install python3-pip -y
sudo apt-get install unixodbc unixodbc-dev
sudo apt install libavformat-dev -y
sudo apt install libswscale-dev -y
sudo apt install doxygen cmake uuid-dev -y
编译安装sofia-sip
git clone https://github.com/freeswitch/sofia-sip.git
git checkout -b v1.13.9
./bootstrap.sh -j
./configure
make
make install
编译安装spandsp
git clone https://github.com/freeswitch/spandsp.git
cd spandsp
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
./bootstrap.sh -j
./configure
make
make install
编译安装libks
git clone https://github.com/signalwire/libks.git
cd libks
sudo cmake .
sudo make
sudo make install
#sudo mkdir -p /usr/lib64/pkgconfig/
#sudo cp /usr/lib/pkgconfig/libks.pc /usr/lib64/pkgconfig/
cat /etc/profile
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:${PKG_CONFIG_PATH}
编译安装freeswitch
git clone --branch v1.10.7 https://github.com/signalwire/freeswitch.git
cd freeswitch
# 编辑配置,去掉模块mod_signalwire、mod_verto,启用模块mod_callcenter
sed -i 's/applications\/mod_signalwire/#applications\/mod_signalwire/g' freeswitch/modules.conf
sed -i 's/endpoints\/mod_verto/#endpoints\/mod_verto/g' freeswitch/modules.conf
sed -i 's/#applications\/mod_callcenter/applications\/mod_callcenter/g' freeswitch/modules.conf
./configure --enable-portable-binary --with-gnu-ld --with-python3 --with-openssl --enable-core-odbc-support --enable-zrtp --enable-core-pgsql-support
make -j2
make install
make -j cd-sounds-install
make -j cd-moh-instal
配置软连接和启动
#freeswitch启动:
/usr/local/freeswitch/bin/freeswitch -nonat -nc
#做软链,方便启动:
ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/
ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
#详细启动日志并进入控制台模式命令
freeswitch -c -nonat -rp
#退出详细模式启动命令
shutdown
#后台启动freeswitch服务(推荐使用)
freeswitch -nc -nonat
#进入控制台模式命令
fs_cli
#退出控制台命令
/exit
#关闭freeswitch命令
freeswitch -stop
默认号码和说明
参考资料:https://www.cnblogs.com/wuchangsoft/p/16730694.html
https://www.cnblogs.com/kn-zheng/p/17025534.html