Install FreeSWITCH on Debian

Installing FreeSWITCH is fairly easy if you follow the FreeSWITCH Download & Installation Guide. But the instructions are not step-by-step. Following is an attempt to rectify this.

Install Essential and Required Packages

You need to first install all packages required by using aptitude. The following command installs packages without using specific version numbers. Following is a single command but may be displayed on multiple lines due to page formatting.

sudo aptitude install build-essential debhelper automake autoconf libtool unixodbc-dev libssl-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev libgnutls-dev subversion subversion-tools wget

For the following packages I could not find packages which did not have specific version numbers in the name. In other words, I couldn’t find virtual packages. Please make sure that when you follow this guide then you do a search for package versions required by FreeSWITCH before you blindly follow me and install the versions I did. Following is a single command but may be displayed on multiple lines due to page formatting.

sudo aptitude install libncurses5-dev libcurl4-openssl-dev libasound2-dev libtiff4-dev

Download Source Code

It is recommended that you always download the latest source from trunk before installing for the first time.

cd /usr/src/

sudo svn checkout freeswitch

You now have the latest source code in the freeswitch directory. In case you want to update from trunk again, just run the following command in the /usr/src/freeswitch/ directory

sudo svn update

Compile and Install

You are now able to compile and install directly. If you would like to build deb packages and install from there, skip this section and read “Build Debian Packages” section. If you want to install directly from source, start by running the following commands.

cd /usr/src/freeswitch/

sudo ./

sudo make

sudo make install

sudo make cd-sounds-install

sudo make cd-moh-install

This installs FreeSWITCH in /opt/freeswitch/.

Build Debian Packages

I love how FreeSWITCH has made it so easy to create deb packages from the source you just downloaded. It makes it easier to compile once and then install on multiple machines. Just follow the steps below

cd /usr/src/freeswitch/

sudo dpkg-buildpackage

dpkg-buildpackage gave an error that uuid-dev was not installed. So I had to install it by running the following command.

sudo aptitude install uuid-dev

I ran dpkg-buildpackage again and did not find any other errors. If you do encounter any errors, please install the required packages and run dpkg-buildpackage again. Continue doing this until there are no more errors.

It will take some time for the compiling and packaging to be done. Once finished, you will see a bunch of .deb, .dsc, .changes, and .tar.gz files. You may install all of them using dpkg -i.

Start and Stop FreeSWITCH

Be aware that this will install FreeSWITCH in the /opt/freeswitch/ directory instead of the /usr/local/freeswitch/ directory which FreeSWTICH considers its default installation directory. No worries there; you just have to modify the instructions in documentation, etc., to use /opt/ instead of /usr/local/.
To start FreeSWITCH in the background, run the following command:

/opt/freeswitch/bin/freeswitch -nc

To stop, run the following command

/opt/freeswitch/bin/freeswitch -stop

To control FreeSWITCH via a Telnet interface, run the following command


Comments are closed.

%d bloggers like this: