系统:Ubuntu 20.04 64位
FreeSwitch:1.10.9.-release
apt install pkg-config
apt-get -y install build-essential automake autoconf libtool
apt-get -y install libncurses5-dev libtiff-dev libjpeg-dev zlib1g-dev libssl-dev libsqlite3-dev
如果报 libssl-dev : Depends: libssl1.1 (= 1.1.1f-1ubuntu2) but 1.1.1f-1ubuntu2.3 is to be installed
执行: apt-get install libssl1.1=1.1.1f-1ubuntu2
重新执行 apt-get -y install libncurses5-dev libtiff-dev libjpeg-dev zlib1g-dev libssl-dev libsqlite3-dev
apt-get -y install libpcre3-dev libspeexdsp-dev libspeex-dev libcurl4-openssl-dev libopus-dev
安装spandsp
git clone https://github.com/freeswitch/spandsp.git
cd spandsp
git reset --hard 0d2e6ac65e0e8f53d652665a743015a88bf048d4 否则会报错:
mod_spandsp_dsp.c:159:10: error: ‘V18_MODE_5BIT_4545’ undeclared
chmod 777 autogen.sh
chmod 777 bootstrap.sh
./configure
make
make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
ldconfig
安装sofia-sip
git clone https://github.com/freeswitch/sofia-sip.git
chmod 777 autogen.sh
chmod 777 bootstrap.sh
./configure
make
make install
ldconfig
安装libldns-dev
apt install libldns-dev
安装uuid uuid-dev
apt install uuid uuid-dev
安装libks
git clone https://github.com/signalwire/libks.git
cd libks
cmake --prefix=/usr/local/libks .
make -dj
make install
安装signalwire-client-c
cmake .
make install
安装 libedit-dev
apt install libedit-dev
安装yasm或nasm
apt install yasm
安装libavformat-dev and libswscale-dev
apt-get install libavformat-dev libswscale-dev
需要重新./configure
安装liblua5.2-dev lua5.2
apt-get install liblua5.2-dev lua5.2 #注意是5.2版本
需要重新./configure
安装libsndfile-dev
apt install libsndfile-dev
建立软连接
ln -sf /usr/local/freeswitch/bin/freeswitch /usr/local/bin/
ln -sf /usr/local/freeswitch/bin/fs_cli /usr/local/bin/
安装音频文件
make sounds-install
make moh-install