Document toolboxDocument toolbox

(14.3.1) Recorder installation v1.10.10

Pre Conditions:

Run these commands.

#sudo apt-get update #sudo apt-get install -y gnupg2 wget lsb-release [Optional] #sudo apt upgrade

Make sure that the [deb cdrom: ...] is commented out in the source.list file in /etc/apt directory.

Also make sure that the repositories listed in the "/etc/apt/sources.list" are for the latest release of Debain. (Currently 12.2 'Bookworm')
If you make any changes to the "sources.list" file. Below are the dependencies for Debain Bookworm. If you have a different version please add accordingly.  Make sure to run the update command again.

#deb http://deb.debian.org/debian/ bookworm main #deb-src http://deb.debian.org/debian/ bookworm main #deb http://deb.debian.org/debian/ bookworm-updates main #deb-src http://deb.debian.org/debian/ bookworm-updates main

Update your system

#sudo apt-get update

Go into super user mode to get rid of permission issues.

#su

For the latest version of Debian such as Book worm we need to follow the following steps as well.

Before we install the recorder, we need to clone the Sofia-sip and SpandDSP in /usr/src directory. In case git is not installed please install the git by running the 'apt install git' command.

#git clone https://github.com/freeswitch/sofia-sip #git clone https://github.com/freeswitch/spandsp

Now add all these dependencies. Some of these dependencies may not be available in the future or the latest versions will be available. Please exclude it from the command and add the latest one.

#sudo apt-get -y install build-essential subversion automake autoconf wget libtool libtool-bin libncurse5-dev libssl-dev libsndfile1-dev #sudo apt-get install git libcurl4-openssl-dev libexpat1-dev libssl-dev libtiff5-dev libx11-dev unixodbc-dev python-dev zlib1g-dev libzrtpcpp-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev python-dev uuid-dev bison autoconf g++ libncurses-dev

In /usr/src run the following commands one by one

#./bootstrap.sh #./configure #make install

Go to the signal wire website and login and then make a token.. If you already have a token please proceed.

Now, run the following commands one by one to add repositories to your apt directory

#$TOKEN=pat_8Errev5k19bRCnmsGdJSxGEs [In case you don't have your token please get one from signalwire website] #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 #chmod 600 /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

Note that "#" is the indicator of a new command. Do not copy and run all commands at the same time.

After these commands run the update command and the install command.

#sudo apt update #apt-get build-dep freeswitch

Then get the source. Use the -b flag to get a specific branch for specified version v1.10.10

#cd /usr/src/ #git clone https://github.com/signalwire/freeswitch.git -b v1.10.10 freeswitch #cd freeswitch

 

Because we're in a branch that will go through many rebases, it’s better to set this one, or you'll get CONFLICTS when pulling (update).

#git config pull.rebase true #./bootstrap.sh -j #./configure #make #makeinstall

 

Edit the Recorder System Service

#sudo nano /etc/systemd/system/freeswitch.service

 

Replace the previous content with this version (omitting User and Group):

[Unit] Description=FreeSWITCH After=network.target [Service] Type=forking PIDFile=/usr/local/freeswitch/run/freeswitch.pid ExecStart=/usr/local/freeswitch/bin/freeswitch -u root -g root -ncwait -nonat ExecStop=/usr/local/freeswitch/bin/freeswitch -stop Restart=always LimitCORE=infinity LimitNOFILE=100000 LimitNPROC=60000 LimitSTACK=250000 TimeoutSec=300 [Install] WantedBy=multi-user.target

Now Reload System and Enable Recorder

#sudo systemctl daemon-reload #sudo systemctl enable freeswitch

Now start Recorder

#sudo systemctl start freeswitch

Now Verify Recorder Status

#sudo systemctl status freeswitch

Add to path

#export PATH=$PATH:/usr/src/freeswitch

 

In case of any problem, complete documentation can be found here. 

 



 

If Recorder was already installed and you want to reinstall it follow this guide

To completely uninstall recorder from a Debian 12 server, you can follow these steps. This will remove both the recorder application and its configuration files:

1. Stop recorder

First, stop the Recorder service if it's running:

#sudo systemctl stop freeswitch

 

2. Uninstall Recorder Packages

Use apt to remove the recorder packages. This will uninstall recorder but leave the configuration files:

sudo apt remove --purge freeswitch*

The --purge flag ensures that configuration files are also removed.

 

3. Remove Dependencies

After uninstalling recorder, you can remove any unneeded dependencies:

sudo apt autoremove

 

4. Delete Leftover Files

Check for any leftover Recorder directories or files and remove them manually:

#sudo rm -rf /usr/local/freeswitch #sudo rm -rf /etc/freeswitch #sudo rm -rf /var/lib/freeswitch #sudo rm -rf /var/log/freeswitch #sudo rm -rf /var/run/freeswitch

 

5. Remove User and Group

If Recorder created a specific user and group, you can delete them as well:

#sudo deluser freeswitch #sudo delgroup freeswitch

 

6. Verify Removal

You can check if FreeSWITCH has been completely removed by running:

which freeswitch

This should return no output if Recorder is uninstalled completely.

 

7. Reboot (Optional)

If you want to ensure everything is properly cleaned up, you can reboot the server:

#sudo reboot

 

This process should completely uninstall FreeSWITCH from your Debian 12 server.