Personal Blog

Install FreeSWITCH 1.10.5 on Ubuntu 18.04

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.

Build FreeSWITCH from source

FreeSWITCH recommends Debian as their installation platform as most of the development happens on that platform. In this article we see how to install FreeSWITCH 1.10.5 on Ubuntu 18.04. Below are the list of steps we follow to install FreeSWITCH on Ubuntu:

  1. Bring up a VM (I use Virtualbox) and install Ubuntu 18.04 server.
  2. Install dependent packages to compile FreeSWITCH
  3. Compile and build SpanDSP and sofia-sip
  4. Download FreeSWITCH source, build and install
  5. Make FreeSWITCH to run as a service

Note: The scope of this article is to install and run FreeSWITCH successfully on Ubuntu 18.04. We don’t configure FreeSWITCH to handle incoming/outgoing calls.

Setup Ubuntu 18.04 server

I use Virtualbox to create an Ubuntu 18.04 server with 30GB of hard disk space and 4GB of RAM. You can build the same or use a desktop or laptop running Ubuntu 18.04. If you want more information on how to install Ubuntu on Virtualbox refer to this article.

Install dependent packages to compile FreeSWITCH

We need some dependent packages to compile FreeSWITCH code. FreeSWITCH is built on C/C++. Let’s install the packages on Ubuntu server using its package manager by ssh into the server:

FreeSWITCH comes with lots of modules. For example, it has support for MySQL, MongoDB, PostgreSQL etc. Most of the deployments use only one database and want to disable the other. So, they don’t install dependent packages of the modules which they don’t need. But in our case we install FreeSWITCH with default modules enabled. Below is the list of additional packages we need:

We have compile and build libks

Compile and build SpanDSP and sofia-sip

According to FreeSWITCH 1.10.x release notes SpanDSP and sofia-sip packages are removed from build. We need to compile and build them separately.

Execute the below commands to build sofia-sip:

Execute the below commands to build SpanDSP:

Download FreeSWITCH source, build and install

We can download the FreeSWITCH release source code from Github releases. Execute the following commands to download, build and install FreeSWITCH:

Once configure is successfully completed, modules.conf file is created in freeswitch-1.10.5 folder. You can comment out unnecessary modules in modules.conf file so that FreeSWITCH will not build those modules. As of now we will comment out only one module, mod_signalwire.

Let’s start the build:

After successful installation we need to install default sounds and voice files.

FreeSWITCH is installed at /usr/local/freeswitch and the binaries are available at /usr/local/freeswitch/bin folder.

Now you can run FreeSWITCH using:

fs_cli is a FreeSWITCH command-line interface that allows a user to connect to running FreeSWITCH instance. Open the other terminal and run:

Make FreeSWITCH to run as a service

By default FreeSWITCH will not be installed as a service in Ubuntu. Let’s make it a service

Add new group and user with less privileges to run FreeSWITCH service.

We need to add FreeSwitch as a systemd unit file. Open new file /etc/systemd/system/freeswitch.service using vim editor paste the below content:

Start FreeSWITCH service and enable it on system startup

Now check status of FreeSWITCH service

Freeswitch Service


In this article we learnt how to install FreeSWITCH on Ubuntu 18.04. This is a default installation with all the modules included. Production ready installations remove lot of unnecessary modules which reduces build and load time. You can configure what modules need to be loaded during startup by changing modules.conf.xml file under /usr/local/freeswitch/conf/autoload_configs folder. In the coming articles we will see how to configure FreeSWITCH to handle simple inbound and outbound calls.

#FreeSWITCH 1.10.5 #Ubuntu 18.04
comments powered by Disqus