freeswitch1.10.10源码编译安装

环境 debian11

命令

请确保你的网络能正常访问github

apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq install git
git clone  -b v1.10.10  https://github.com/signalwire/freeswitch /usr/src/freeswitch
git clone https://github.com/signalwire/libks /usr/src/libs/libks
git clone https://github.com/freeswitch/sofia-sip /usr/src/libs/sofia-sip
git clone https://github.com/freeswitch/spandsp /usr/src/libs/spandsp && cd /usr/src/libs/spandsp
git clone https://github.com/signalwire/signalwire-c /usr/src/libs/signalwire-c
DEBIAN_FRONTEND=noninteractive apt-get -yq install \
    build-essential cmake automake autoconf 'libtool-bin|libtool' pkg-config \
    libssl-dev zlib1g-dev libdb-dev unixodbc-dev libncurses5-dev libexpat1-dev libgdbm-dev bison erlang-dev libtpl-dev libtiff5-dev uuid-dev \
    libpcre3-dev libedit-dev libsqlite3-dev libcurl4-openssl-dev nasm \
    libogg-dev libspeex-dev libspeexdsp-dev \
    libldns-dev \
    python3-dev \
    libavformat-dev libswscale-dev libavresample-dev \
    liblua5.2-dev \
    libopus-dev \
    libpq-dev \
    libsndfile1-dev libflac-dev libogg-dev libvorbis-dev \
    libshout3-dev libmpg123-dev libmp3lame-dev
cd /usr/src/libs/libks && cmake . -DCMAKE_INSTALL_PREFIX=/usr -DWITH_LIBBACKTRACE=1 && make install
cd /usr/src/libs/sofia-sip && ./bootstrap.sh && ./configure CFLAGS="-g -ggdb" --with-pic --with-glib=no --without-doxygen --disable-stun --prefix=/usr && make -j`nproc --all` && make install
cd /usr/src/libs/spandsp && git checkout e59ca8fb8b1591e626e6a12fdc60a2ebe83435ed && ./bootstrap.sh && ./configure CFLAGS="-g -ggdb" --with-pic --prefix=/usr && make -j`nproc --all` && make install
cd /usr/src/libs/signalwire-c && PKG_CONFIG_PATH=/usr/lib/pkgconfig cmake . -DCMAKE_INSTALL_PREFIX=/usr && make install
sed -i 's|#formats/mod_shout|formats/mod_shout|' /usr/src/freeswitch/build/modules.conf.in
sed -i 's|#xml_int/mod_xml_curl|xml_int/mod_xml_curl|' /usr/src/freeswitch/build/modules.conf.in
sed -i 's|applications/mod_sms|#applications/mod_sms|' /usr/src/freeswitch/build/modules.conf.in
sed -i 's|formats/mod_vpx|#formats/mod_vpx|' /usr/src/freeswitch/build/modules.conf.in
cd /usr/src/freeswitch && ./bootstrap.sh -j  && ./configure  && make  && make install

docker编译

https://github.com/noxue/freeswitch/