Call Us Today! 877.742.2583

Page tree
Skip to end of metadata
Go to start of metadata


This a FreeSWITCH installation manual tested in virtual machines with CentOS 6.5 32-bit and 64-bit operating systems.


CentOS 6 is deprecated. Please use CentOS 7 and RHEL 7

 Click here to expand Table of Contents

FreeSWITCH 1.6 depends on many updated system libraries which are available in Debian 8, but can not be distributed for CentOS due to licensing restrictions or that require additional work to include in CentOS distributions. As of September 2015 the FS team can not recommend CentOS 6 for modern versions of FreeSWITCH™.

Build From Source

Automatic Makefile

The FreeSWITCH™ team has prepared a Makefile in the source tree that pulls down all dependencies and builds FreeSWITCH. It is available in the repository at

Simply copy the contents of the above link into 'Makefile', then run 'make' in the same directory, it will download FreeSWITCH latest (master) sources into a freeswitch.git subdir of the current dir (so, you may want to do this in /usr/src or /usr/local/src).

If you want to compile and install RELEASE branch, edit the above Makefile and add " -b v1.4 " just after the word "clone".

When finished, FreeSWITCH should be located under /usr/local/freeswitch

Now continue below at  Set Owner and Permissions. If you find any errors please see the Corrections page.

Manual Build

Install libraries and pre-requisites

Install Prerequisites
# Add the RPM repository 
rpm -ivh
### OR a European repository
rpm -ivh

# Install necessary components
yum install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel

Download FreeSWITCH™ source code, configure modules, compile, install

Install FreeSWITCH
cd /usr/src
# To build from Master, the latest source code: 
git clone
##### OR #####
# To build from the current release source code:
git clone -b v1.4

cd /usr/src/freeswitch
# The -j argument spawns multiple threads to speed the build process 
./ -j

# if you want to add or remove modules from the build, edit modules.conf
vi modules.conf
# add a module by removing '#' comment character at the beginning of the line
# remove a module by inserting the '#' comment character at the beginning of the line containing the name of the module to be skipped
./configure -C
make && make install

Install Sounds

Install sounds:

CD-Quality Sounds
make cd-sounds-install
make cd-moh-install

Installing higher quality sounds will automatically install lesser quality sounds.

If you only need 8KHz sounds, you can save time and bandwidth:

8KC Sounds
make sounds-install
make moh-install

Set Owner and Permissions

# create user 'freeswitch'
# add it to group 'daemon'
# change owner and group of the freeswitch installation
cd /usr/local
useradd --system --home-dir /usr/local/freeswitch -G daemon freeswitch
passwd -l freeswitch

chown -R freeswitch:daemon /usr/local/freeswitch/ 
chmod -R 770 /usr/local/freeswitch/
chmod -R 750 /usr/local/freeswitch/bin/*

mkdir /var/run/freeswitch
chown -R freeswitch:daemon  /var/run/freeswitch

ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/ # needed by /etc/init.d/freeswitch

Start FreeSWITCH

First Time

cd /usr/local/freeswitch/bin

This will start FreeSWITCH™ and output many messages to the screen, allowing you to observe the startup sequence and any error messages. It is a Good Thing to do this at least once so that you can see the modules being loaded and understand how much information is available to you as you learn how to work with FreeSWITCH™. After all modules, users, and profiles have fully loaded you will see a prompt similar to


where domain is replaced by the domain name, machine name, or i.p. address on which FreeSWITCH™ is running. Refer to mod_commands to learn what commands are available. Start with

sofia status

Type 'help' to get a long listing of commands available. Refer to mod_commands for descriptions of the commands.

Automatic Start At Boot

To get FreeSWITCH to start up automatically at system start, just copy the FreeSWITCH init script into the /etc/init.d directory. An example init script is included in the git repository, under the build directory, named as freeswitch.init.redhat. You may need to modify the script to get FreeSWITCH starting up from the directory where the binaries are installed. After the file has been modified to suit your needs, simply run this command:

cp /usr/src/freeswitch/build/freeswitch.init.redhat  /etc/init.d/freeswitch
chmod 750 /etc/init.d/freeswitch
chown freeswitch:daemon /etc/init.d/freeswitch

chkconfig --add freeswitch && chkconfig --levels 35 freeswitch on

This procedure will also work exactly the same way on Fedora systems.


  1. Hi,

    In the set owner and permission section, the adduser command and some of it's switches are not compatible with CentOS. I think the author copied them from Ubuntu installation. Anyway, the current workable commands on CentOS 6.4 are as follow:

    useradd --system --home-dir /usr/local/freeswitch -G daemon freeswitch
    passwd -l freeswitch

    The first command create the freeswitch user and assign it to daemon group. Also, it set the home directory of user and make it a system one. The second command lock the freeswitch command.


  2. why ./configure --enable-core-pgsql-support ?

    why not just ./configure ?

    1. I think because FreeSWITCH has been natively supported PostgreSQL DB as a tiny local database and you should install it in order to proceed.

      1. No, the --enable-core-pgsql-support can be safely omitted if you don't need to put the core dbs over pgsql, since it will use sqlite by default.

  3. any guidance on what needs built for centos? are there configuration issues to consider like what to configure for firewall and security settings?

    1. This page only covers installation on CentOS 6. Configuration is a much bigger topic covered elsewhere across a number of pages. We are slowly copying pages over from the old Mediawiki site and updating as time allows so I'm not sure everything is covered on Confluence yet.

  4. where is package install?

    cat >/etc/yum.repos.d/freeswitch.repo <<EOF

    name=FreeSWITCH Packages for Enterprise Linux $releasever - $basearch


  5. when i give the make && make install step, there is an error

    making all mod_fsv

    make[4]: Entering directory `/usr/src/freeswitch/src/mod/applications/mod_fsv'

    Makefile:791: *** You must install libyuv-dev to build mod_fsv.  Stop.

    make[4]: Leaving directory `/usr/src/freeswitch/src/mod/applications/mod_fsv'

    make[3]: *** [mod_fsv-all] Error 1

    make[3]: Leaving directory `/usr/src/freeswitch/src/mod'

    make[2]: *** [all-recursive] Error 1

    make[2]: Leaving directory `/usr/src/freeswitch/src'

    make[1]: *** [all-recursive] Error 1

    make[1]: Leaving directory `/usr/src/freeswitch'

    make: *** [all] Error 2


     how can i rectify this???


  6. For making mod_fsv:  yum Install libyuv-devel then re-run ./configure

  7. My experiences with installing FreeSWITCH 1.6.x on Centos 6.4 (before running ./configure -C)

    1) mod_lua requires lua-devel package

    2) mod_opus requires opus-devel pacakge

    3) mod_shout requires libshout-devel and lame-devel package

    4) mod_shout requires libmpg123-devel which isn't available in Centos 6 repos, so should be compiled from source or a repo that contains it.  RPMForge contains it for example.

    5) mod_sndfile requires libsndfile-devel