在CentOS7.9系统内安装目前最新版本FreeSWITCH 1.10.11
00:00
安装依赖包
sudo yum install epel-release vim tcpdump net-tools.x86_64 -y sudo yum install gcc-c++ sqlite-devel zlib-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel openssl-devel git -y yum install yasm nasm opus-devel -y yum groupinstall perl* -y yum install python -y yum install bzip2 -y yum install -y libshout-devel lame-devel libmpg123-devel yum install bc -y yum install curl -y yum install expect telnet -y yum install -y unixODBC unixODBC-devel mysql-connector-odbc yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git wget vim devtoolset-7-gcc* devtoolset-7 libtiff-devel cmake3 libatomic unixODBC unixODBC-devel.x86_64 postgresql-libs postgresql-devel libpqxx-devel yum install -y gcc-c++ autoconf automake libtool ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel libxml2-devel libyuv-devel libvpx-devel libvpx2* libdb4* libidn-devel unbound-devel libuuid-devel lua-devel libsndfile-devel yasm-devel
下载目前最新版本FreeSWITCH 1.10.11
cd /root git clone --branch v1.10.11 https://github.com/signalwire/freeswitch.git
下载安装sofia-sip模块
cd /root/freeswitch git clone https://github.com/freeswitch/sofia-sip cd sofia-sip ./bootstrap.sh -j ./configure make make install export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH} ldconfig
下载安装spandsp模块
cd /root/freeswitch git clone https://github.com/freeswitch/spandsp cd spandsp ./bootstrap.sh -j ./configure make make install ldconfig
编辑modules.conf,选择需要启用的模块
cd /root/freeswitch ./bootstrap.sh sed -i 's/#formats\/mod_shout/formats\/mod_shout/g' /root/freeswitch/modules.conf sed -i 's/applications\/mod_signalwire/#applications\/mod_signalwire/g' /root/freeswitch/modules.conf sed -i 's/endpoints\/mod_verto/#endpoints\/mod_verto/g' /root/freeswitch/modules.conf sed -i 's/applications\/mod_av/#applications\/mod_av/g' /root/freeswitch/modules.conf sed -i 's/codecs\/mod_opus/#codecs\/mod_opus/g' /root/freeswitch/modules.conf sed -i 's/#applications\/mod_callcenter/applications\/mod_callcenter/g' /root/freeswitch/modules.conf sed -i 's/#applications\/mod_httapi/applications\/mod_httapi/g' /root/freeswitch/modules.conf sed -i 's/#event_handlers\/mod_odbc_cdr/event_handlers\/mod_odbc_cdr/g' /root/freeswitch/modules.conf
安装FreeSWITCH
./configure --enable-portable-binary --prefix=/usr/local/freeswitch --with-gnu-ld --with-python --with-openssl --enable-core-odbc-support --enable-zrtp make make install
等待安装完后配置软链接和开启自启动
sudo ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/ sudo ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/ cp -r /usr/local/freeswitch/bin/freeswitch /etc/rc.d/init.d echo -e "/etc/init.d/freeswitch -nonat -nc" >> /etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local
至此,全部安装完成!
重启服务器reboot