FreeSWITCH 1.10.7 编译(debian 11)
1、安装预备库
更新源:deb https://security.debian.org/debian-security bullseye-security main non-free contrib
apt install -y build-essential gdb gnupg2 wget autoconf lsb-release libtool libtool-bin libtiff-dev uuid-dev pkg-config openssl libssl-dev sqlite3 libsqlite3-dev libcurl4-openssl-dev libspeexdsp-dev libldns-dev libedit-dev yasm nasm ffmpeg libswscale-dev libavformat-dev lua5.4 liblua5.4-dev libopus-dev libpq-dev libmariadb-dev unixodbc unixodbc-dev libsndfile1-dev libpcre3-dev python3-pip python3-distutils
2、 安装libks
git clone https://github.com/signalwire/libks.git cmake . make sudo make install
3、安装spandsp
git clone https://github.com/freeswitch/spandsp.git cd spandsp ./bootstrap.sh -j ./configure make make install
4、编译sofia-sip
git clone https://github.com/freeswitch/sofia-sip.git cd sofia-sip ./bootstrap.sh -j ./configure make make install
5、编译freeswitch 1.10.7
./configure make -j4 make install
6、链接mod_spandsp_dsp故障处理
FreeSWITCH·编译mod_spandsp_dsp模块是找不到函数:
mod_spandsp_dsp.c: In function ‘get_v18_mode’: mod_spandsp_dsp.c:159:10: error: ‘V18_MODE_5BIT_4545’ undeclared (first use in this function) 159 | int r = V18_MODE_5BIT_4545; | ^~~~~~~~~~~~~~~~~~ mod_spandsp_dsp.c:159:10: note: each undeclared identifier is reported only once for each function it appears in mod_spandsp_dsp.c:165:8: error: ‘V18_MODE_5BIT_50’ undeclared (first use in this function) 165 | r = V18_MODE_5BIT_50; | ^~~~~~~~~~~~~~~~ mod_spandsp_dsp.c: In function ‘spandsp_tdd_send_session’: mod_spandsp_dsp.c:216:14: error: too few arguments to function ‘v18_init’ 216 | tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL); | ^~~~~~~~ In file included from /usr/local/include/spandsp.h:112, from mod_spandsp.h:50, from mod_spandsp_dsp.c:36: /usr/local/include/spandsp/v18.h:138:29: note: declared here 138 | SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s, | ^~~~~~~~ mod_spandsp_dsp.c: In function ‘spandsp_tdd_encode_session’: mod_spandsp_dsp.c:263:19: error: too few arguments to function ‘v18_init’ 263 | pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);
处理步骤:
回退spandsp版本,重新编译:
git clone https://github.com/freeswitch/spandsp.git cd spandsp git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4 ./bootstrap.sh -j ./configure make make install