1、到ubuntu 下运行下面的命令,安装相关的基础编译包
sudo apt-get update
sudo apt-get install -y build-essential autoconf libtool pkg-config libssl-dev libsqlite3-dev libxml2-dev libspeex-dev libspeexdsp-dev libopus-dev libsndfile1-dev libcurl4-openssl-dev libtool-bin libspandsp-dev libpq-dev unixodbc-dev libpcre3 libpcre3-dev libldns-dev uuid-dev libedit-dev yasm libavformat-dev libswscale-dev libmariadb-dev mariadb-client liblua5.2-dev
2、安装FreeSWITCH依赖的数据库(如果需要MySQL,请确保先安装MySQL服务器)
sudo apt-get install -y sqlite3
3、下载freeswitch 最新包进行编译
wget https://github.com/signalwire/freeswitch/archive/refs/tags/v1.10.12.tar.gz
mv v1.10.12.tar.gz freeswitch_1.10.12.tar.gz
tar xzf freeswith_1.10.12.tar.gz
cd freeswich_1.10.12
4、安装其它基础类库
cd libs
(1)安装sofia-sip
git clone https://github.com/freeswitch/sofia-sip.git
cd sofia-sip
./bootstrap.sh -j
./configure
make
make install
ldconfig
cd..
(2)安装spandsp
cd /usr/local/src/freeswitch-1.10.5.-release
git clone https://github.com/freeswitch/spandsp.git
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4
cd spandsp
./bootstrap.sh -j
./configure
make
make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
ldconfig
cd ..
3) 编译安装libks和signalwire
3.1 编译libks
sudo git clone https://github.com/signalwire/libks.git
cd libks
sudo cmake .
sudo make
sudo make install
cd..
3.2 编译signalwire
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c
sudo cmake .
sudo make
sudo make install
cd..
3.3 安装mod_maridb 需要的库
cd libs
wget https://downloads.mariadb.com/Connectors/c/connector-c-3.1.7/mariadb-connector-c-3.1.7-linux-x86_64.tar.gz
tar xvf mariadb-connector-c-3.1.7-linux-x86_64.tar.gz
cp -r mariadb-connector-c-3.1.7-linux-x86_