centos7編譯安裝freeswitch軟電話交換軟體並實現通話
阿新 • • 發佈:2022-03-16
centos7編譯安裝freeswitch,並實現通話
環境
centos7.9(最小安裝的)
freeswitch1.10.5原始碼
安裝
編譯環境安裝
由於centos7使用最小安裝,需要安裝的軟體有點多
yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release yum install -y yum-utils --enablerepo=extras yum install -y yum-plugin-ovl centos-release-scl rpmdevtools yum-utils git yum install -y devtoolset-7-gcc* yum install -y devtoolset-7 yum install -y libtiff-devel yum install -y cmake3 yum install -y libatomic yum install -y unixodbc yum install -y unixODBC yum install -y unixODBC-devel.x86_64 yum install -y postgresql-libs yum install -y postgresql-devel yum install -y libpqxx-devel yum install -y git gcc-c++ autoconf automake libtool wget python 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
下載準備原始碼檔案
由於github官網不能穩定訪問 此處使用映象網址github.com.cnpmjs.org,也可通過其他途徑下載原始碼檔案
cd /usr/local/src git clone -b v1.10.5 https://github.com.cnpmjs.org/signalwire/freeswitch.git freeswitch cd /usr/local/src/freeswitch git clone https://github.com.cnpmjs.org/freeswitch/spandsp.git git clone https://github.com.cnpmjs.org/freeswitch/sofia-sip.git git clone https://github.com.cnpmjs.org/signalwire/libks.git
編譯安裝
#安裝libks cd /usr/local/src/freeswitch/libks cmake3 . make -j4 make install -j4 #安裝spandsp cd /usr/local/src/freeswitch/spandsp ./bootstrap.sh -j4 ./configure make -j4 make install -j4 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH} ldconfig #安裝sofia cd /usr/local/src/freeswitch/sofia-sip ./bootstrap.sh -j4 ./configure make -j4 make install -j4 ldconfig cd /usr/local/src/freeswitch ./bootstrap.sh -j8 vim modules.conf #根據需要註釋不需要的功能 ./configure --enable-portable-binary --prefix=/opt/freeswitch --with-gnu-ld --with-python --with-openssl --enable-core-odbc-support --enable-zrtp make -j8 make install -j8
啟動測試
#啟動
/opt/freeswitch/bin/freeswitch
/opt/freeswitch/bin/freeswitch -nc #後臺啟動
#客戶端連線
/opt/freeswitch/bin/fs_cli
註冊
註冊-做為落地閘道器
以註冊到vos落地為例
1 vos新建動態落地,並記錄賬號密碼
2 新建freeswitch配置檔案
3 啟動fs,並檢視註冊狀態