Skip to content

Instantly share code, notes, and snippets.

@hamidrhashmi
Created February 23, 2024 13:03
Show Gist options
  • Save hamidrhashmi/403062c60f22442eff998f48fa6f2e79 to your computer and use it in GitHub Desktop.
Save hamidrhashmi/403062c60f22442eff998f48fa6f2e79 to your computer and use it in GitHub Desktop.
How to install Freeswitch from Source on Debian 12

Step 1: install dependencies

apt install aptitude build-essential
aptitude install autoconf libtool libtool-bin pkg-config libpq-dev lua5.4 liblua5.4-dev libmariadb-dev git libtiff-dev libsqlite3-dev libcurl4-openssl-dev libcurl4-nss-dev libcurl4-gnutls-dev libpcre3 libpcre3-dev libspeex-dev libspeexdsp-dev libldns-dev yasm uuid-dev uuid libopencore-amrnb-dev libopencore-amrnb0 libopencore-amrwb-dev libopencore-amrwb0 libvo-amrwbenc-dev libvo-amrwbenc0 libswscale-dev libavformat-dev libopus-dev libshout3-dev libmpg123-dev libmp3lame-dev libsndfile-dev libapr1 libapr1-dev libncurses5 libncurses5-dev libsctp-dev libsctp1 libtinfo5 sqlite3 unzip zip libedit-dev cmake

Step 2: Install spandsp

git clone https://github.com/freeswitch/spandsp.git
cd spandsp
./bootstrap.sh
./configure
make 
make install

Step 3: Install Sofia SIP

wget https://github.com/freeswitch/sofia-sip/archive/refs/tags/v1.13.17.tar.gz
tar -zxvf v1.13.17.tar.gz
cd sofia-sip-1.13.17
./bootstrap.sh
./configure
make
make install

Step 4: Install libks

build and install libks2 - needed for mod_verto and signalwire

git clone https://github.com/signalwire/libks.git
cd libks
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX
make
sudo make install

Step 5: Install Freeswitch

Downloa dthe latest version from Freeswitch Github repo.

wget https://github.com/signalwire/freeswitch/archive/refs/tags/v1.10.11.tar.gz
tar -zxvf v1.10.11.tar.gz
cd freeswitch
./bootstrap.sh -j

Edit Modules files as per your requirnmnets

vim modules.conf
  • enable mod_xml_curl
  • enable mod_curl
  • enable mod_shout
  • disable mod_signalwire
./configure --prefix=/opt/freeswitch

Faced this issue while compiling the code

vim ./src/mod/applications/mod_spandsp/mod_spandsp_dsp.c

Edit file as per above mentioned gitHub Issue.

make
make install
ln -s /opt/freeswitch/etc/freeswitch /etc/freeswitch
ln -s /opt/freeswitch/bin/freeswitch /usr/bin/freeswitch
ln -s /opt/freeswitch/bin/fs_cli /usr/bin/fs_cli
useradd -M freeswitch
mkdir -p /opt/freeswitch/run/freeswitch/
chown -R freeswitch:freeswitch /opt/freeswitch
cp debian/freeswitch-systemd.freeswitch.service /etc/systemd/system/freeswitch.service

Edit the service as per path

vim /etc/systemd/system/freeswitch.service

Start freeswitch

systemctl daemon-reload
systemctl restart freeswitch

Enjoy ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment