本文主要是介绍ubuntu 18.04 server源码编译安装freeswitch 1.10.7支持音视频通话、收发短信——筑梦之路,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
软件版本说明
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 updateapt-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-devsudo apt-get install -y vimsudo apt-get install -y g++sudo apt-get install -y zlib1g-devsudo apt-get install -y libjpeg-devsudo apt-get install -y libsqlite3-devsudo apt-get install -y libcurl4-gnutls-devsudo apt-get install -y libpcre3-devsudo apt-get install -y libspeexdsp-devsudo apt-get install -y libedit-devsudo apt-get install -y libssl-devsudo apt-get install -y libopus-devsudo apt-get install -y liblua5.2-devsudo apt-get install -y libldns-devsudo apt-get install -y libsndfile1-devsudo apt-get install python3-pip -ysudo apt-get install unixodbc unixodbc-devsudo apt install libavformat-dev -ysudo apt install libswscale-dev -ysudo apt install doxygen cmake uuid-dev -y
编译安装sofia-sip
git clone https://github.com/freeswitch/sofia-sip.gitgit checkout -b v1.13.9./bootstrap.sh -j./configuremakemake install
编译安装spandsp
git clone https://github.com/freeswitch/spandsp.gitcd spandspgit checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4./bootstrap.sh -j./configuremakemake 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/profileexport 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.gitcd freeswitch# 编辑配置,去掉模块mod_signalwire、mod_verto,启用模块mod_callcenter
sed -i 's/applications\/mod_signalwire/#applications\/mod_signalwire/g' freeswitch/modules.confsed -i 's/endpoints\/mod_verto/#endpoints\/mod_verto/g' freeswitch/modules.confsed -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-supportmake -j2make installmake -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
这篇关于ubuntu 18.04 server源码编译安装freeswitch 1.10.7支持音视频通话、收发短信——筑梦之路的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!