Pre Conditions:
Before installing FreeSwitch you must run Run these commands.
Code Block |
---|
#sudo apt-get update #sudo apt-get install -y gnupg2 wget lsb-release [Optional] #sudo apt upgrade |
...
Update your system
Code Block |
---|
#sudo apt-get update |
Go into super user mode to get rid of permission issues.
...
For the latest version of Debian such as Book worm we need to follow the following steps as well.
Before we install the freeswitch 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.
...
In /usr/src run the following commands one by one
Code Block |
---|
#./bootstrap.sh #./configure make#make install |
Go to the signal wire website and login and then make a token for the installation of freeswitch.. If you already have a token please proceed.
Now, run the following commands one by one to add Freeswitch repositories to your apt directory
...
After these commands run the update command and the install command to install Freeswitch.
Code Block |
---|
#sudo apt update
#apt-get install -y freeswitch-meta-all |
Restart the Freeswitch and configure it.
build-dep freeswitch |
Then get the source. Use the -b flag to get a specific branch for specified version v1.10.10
Code Block |
---|
#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).
Code Block |
---|
#git config pull.rebase true
#./bootstrap.sh -j
#./configure
#make
#makeinstall |
Edit the Recorder System Service
Code Block |
---|
#sudo nano /etc/systemd/system/freeswitch.service |
Replace the previous content with this version (omitting User and Group):
Code Block |
---|
[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
Code Block |
---|
#sudo systemctl daemon-reload
#sudo systemctl enable freeswitch |
Now start Recorder
Code Block |
---|
#sudo systemctl start freeswitch |
Now Verify Recorder Status
Code Block |
---|
#sudo systemctl status freeswitch |
Add to path
Code Block |
---|
#export PATH=$PATH:/usr/src/freeswitch |
In case of any problem, complete documentation can be found here for the installation of freeswitch. .
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:
Code Block |
---|
#sudo systemctl stop freeswitch |
2. Uninstall Recorder Packages
Use apt to remove the recorder packages. This will uninstall recorder but leave the configuration files:
Code Block |
---|
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:
Code Block |
---|
sudo apt autoremove |
4. Delete Leftover Files
Check for any leftover Recorder directories or files and remove them manually:
Code Block |
---|
#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:
Code Block |
---|
#sudo deluser freeswitch
#sudo delgroup freeswitch |
6. Verify Removal
You can check if FreeSWITCH has been completely removed by running:
Code Block |
---|
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:
Code Block |
---|
#sudo reboot |
This process should completely uninstall FreeSWITCH from your Debian 12 server.