FreeSWITCH

How to build and install FreeSWITCH 1.6 on Debian 8 Jessie

FreeSWITCH is an opensource telephony soft switch created in 2006. As per official wiki  page,

It is a scalable open source cross-platform telephony platform designed to route and interconnect popular communication protocols using audio, video, text or any other form of media.

Sounds good. right ?

We are using Debian for this tutorial as it is very stable & mature linux distribution and FreeSWITCH core developers’ choice-of-distribution .
You can read more about FreeSWITCH on there wiki page.

Now lets cut a crap & start an action, assuming you  already have working Debian 8 OS.

Build & Install FreeSWITCH

There are different ways to install FreeSWITCH. In this tutorial, we will see how to install it from source.

  1. First update your Debian box & install curl & git.

  2. Add FreeSWITCH GPG key to APT sources keyring.

  3. Add FreeSWITCH repository to APT sources.

  4. Once again update your system.

  5. Now lets first install FreeSWITCH dependencies.

  6. Though above step takes care of most of dependencies, few still remains required to compile mod_fsv. So install them as,

  7. Grab source code of FreeSWITCH as follows,

  8. Now lets compile FreeSWITCH source for version 1.6

  9. Now lets compile sounds

  10. Lets create simlinks to required binaries to access them from anywhere.

     

Set Owner & Permissions

Starting FreeSWITCH service on boot automatically

To start FreeSWITCH after each boot automatically we need to set up init script. Init script is script used by init system to manipulate services. Debian 8 is now migrated to systemd init system, we will add systemd unit file.

Copy following content to ‘/lib/systemd/system/freeswitch.service’

Now execute following commands in your shell

Start FreeSWITCH

Now we are all set. Lets start hacking FreeSWITCH.

 

Notes

  1. If something goes wrong & you try compilation again by ‘make clean’, sometimes you get errors regarding ‘spandsp’. To resolve them try to clean using
    ‘git clean -fdx’. For more info check this ticket – https://freeswitch.org/jira/browse/FS-6405

 

Published by

Rohit Chormale

I am software engineer from Hyderabad, India with primary interests in distributed systems. In my leisure time, I love to read technical papers and hacking emacs.

6 thoughts on “How to build and install FreeSWITCH 1.6 on Debian 8 Jessie”

  1. correction in string “systemcl daemon-reload”
    missing “t” in systemcl

    Good article, everything works fine. Thank you

  2. Thank you very much for the clear instructions. I would appreciate if you can help configuring freeswitch with tls and srtp. I have no clue how to create tls certificate.

    Best regards

  3. After installing Freeswitch, I am getting the following error, any idea
    [ERROR] fs_cli.c:1659 main() Error Connecting [Socket Connection Error]

    1. Hi AZ,
      please make sure freeswitch is running properly. You can check freeswitch status using systemd as
      systemctl status freeswitch.service

      If it is not running, you need to start it first using
      systemctl start freeswitch.service

      One important point is freeswitch takes few seconds to start and in that duration fs_cli can’t connect to it.

      If freeswitch is not able to start then you need to dig logs, those can be found at /usr/local/freeswitch/log dir

Leave a Reply

Your email address will not be published. Required fields are marked *