在ubuntu 20.04 下安装 freeswitch 1.10.7
安装依赖
#!/bin/bash
sudo apt-get install -y build-essential g++ make cmake automake autoconf git-core wget libtool
sudo apt-get install -y uuid uuid-dev
sudo apt-get install -y libshout-dev libmpg123-dev libsndfile-dev libedit-dev libavformat-dev libswscale-dev libpq-dev
sudo apt-get install -y libncurses5-dev libtiff-dev libjpeg-dev zlib1g-dev libssl-dev libsqlite3-dev
sudo apt-get install -y libpcre3-dev libspeexdsp-dev libspeex-dev libcurl4-openssl-dev libopus-dev
sudo apt-get install -y libldns-dev
sudo apt-get install -y libsndfile-dev
sudo apt-get install -y libreadline-dev
sudo apt-get install -y yasm
sudo apt-get install -y libasound2 libasound2-dev
sudo apt-get install -y libopenal-dev
sudo apt-get install -y libaprutil1 libaprutil1-dev
sudo apt-get install -y libodbc1
sudo apt-get install -y libmp3lame0 libmp3lame-dev
sudo apt-get install -y libcodec2-dev
sudo apt-get install -y flite flite1-dev
# install lua
sudo apt-get install -y lua5.2 lua5.2-doc liblua5.2-dev
#将so文件做个链接
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/lib/x86_64-linux-gnu/liblua.so
安装需要通过源码编译的依赖
# install libks
git clone https://github.com/signalwire/libks.git && cd libks && cmake . && make && sudo make install
# install signalwire-c
git clone https://github.com/signalwire/signalwire-c.git && cd signalwire-c && cmake . && make && sudo make install
# install spandsp
git clone https://github.com/freeswitch/spandsp.git && cd spandsp && ./bootstrap.sh -j && ./configure && make && sudo make install && sudo ldconfig
# install sofia-sip
git clone https://github.com/freeswitch/sofia-sip.git && cd sofia-sip && ./bootstrap.sh -j && ./configure && make && sudo make install && sudo ldconfig
安装freeswitch
#!/bin/bash
tar xavf freeswitch-1.10.7.tar.gz
cd freeswitch-1.10.7
#安装完将相关头文件拷贝一下
sudo cp /usr/include/lua5.2/*.h src/mod/languages/mod_lua/
./bootstrap.sh
# configure的时候报错,不知道为啥, 需要这样才行
./configure
## 尝试修改Makefile来解决报错
CFLAGS = -g -O2 -Wno-error=deprecated-declarations -Wno-error=array-bounds -Werror=implicit-function-declaration
make
sudo make install
#安装声音文件
sudo make sounds-install
sudo make moh-install
# 其他模块
sudo make mod_shout-install
其他注意事项1. sofia命令
内网环境下,需要注释掉
/usr/local/freeswitch/conf/sip_profiles/internal.xml
/usr/local/freeswitch/conf/sip_profiles/external.xml
中的ext-sip-ip, 否则sofia命令不好使
网友评论