FreeSWITCH 1.10.12 on Debian 12 from source - Omid-Mohajerani/freeswitch GitHub Wiki

FreeSWITCH Installation Guide

Step 1: Update System and Install Dependencies

apt-get update && apt-get install -yq gnupg2 wget lsb-release git libssl-dev libevent-dev

Step 2: Add SignalWire FreeSWITCH Repository

TOKEN=pat_q3zNDnuUEQdMwyYz594MGTYj
wget --http-user=signalwire --http-password=$TOKEN -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
echo "machine freeswitch.signalwire.com login signalwire password $TOKEN" > /etc/apt/auth.conf
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ $(lsb_release -sc) main" >> /etc/apt/sources.list.d/freeswitch.list

Step 3: Update and Install Build Dependencies

apt-get -y update
apt-get -y build-dep freeswitch

Step 4: Clone FreeSWITCH Repository

cd /usr/src
git clone https://github.com/signalwire/freeswitch.git -bv1.10.12 freeswitch

Step 5: Build and Install FreeSWITCH

cd freeswitch
git config pull.rebase true
./bootstrap.sh -j
./configure
make
make install
make cd-sounds-install cd-moh-install

Step 6: Setup User and Permissions

cd /usr/local
groupadd freeswitch
adduser --quiet --system --home /usr/local/freeswitch --gecos "FreeSWITCH open source softswitch" --ingroup freeswitch freeswitch --disabled-password
chown -R freeswitch:freeswitch /usr/local/freeswitch/
chmod -R ug=rwX,o= /usr/local/freeswitch/
chmod -R u=rwx,g=rx /usr/local/freeswitch/bin/*

Step 7: Create Systemd Service File

Create and edit the FreeSWITCH service file:

vim /etc/systemd/system/freeswitch.service

(You need to manually define the service file content here.)

Step 8: Enable and Start FreeSWITCH Service

systemctl daemon-reload
systemctl start freeswitch
systemctl enable freeswitch
systemctl status freeswitch

Step 9: Verify Installation

ps aux | grep freeswitch

Step 10: Set Environment Variables

PATH=$PATH:/usr/local/freeswitch/bin
export PATH

Step 11: Enabling Required Modules

For example, enabling mod_esl:

cd /usr/src/freeswitch/
make mod_esl-install

vim /usr/local/freeswitch/modules.conf

Enable mod_esl in the configuration file, then restart FreeSWITCH:

systemctl restart freeswitch