As noted in a recent blog post, the FreeSWITCH telephony switching engine has seen a notable spike in popularity in the last couple years among VoIP system administrators and integrators. Its exceptional stability and performance power all for extreme call volumes to be handled with less hardware than most other open-source systems available. With projects like FreePBX v3 ramping up their efforts to improve front-end interactions with the immensely powerful FreeSWITCH engine, its wide-scale use seems inevitable.
Installing FreeSWITCH is rather straight forward. I small list of dependencies are required, almost all of which should be available via the update / package manager of the distribution selected for the install. For the making of this document, and CentOS 5 system was setup. The systems configuration is based on XML files making the list of required tools to work with FreeSWITCH near non-existent.
First item to take care of prior to beginning the installation is to ensure the system is entirely up to date with current versions of all packages.
yum -y update
Once the system has completed its updates, install the necessary dependencies required by FreeSWITCH.
yum -y install autoconf automake nano libtool gcc-c++ ncurses-devel make expat-devel yum -y install zlib zlib-devel libjpeg-devel unixODBC-devel openssl-devel yum -y install gnutls-devel libogg-devel libvorbis-devel curl-devel libtiff-devel
The next step is to download the FreeSWITCH source files and unpack them.
cd /usr/src/ wget http://files.freeswitch.org/freeswitch-1.0.6.tar.gz tar -xvf freeswitch-1.0.6.tar.gz
Move to the unpacked folder and run the installer’s configuration script.
cd freeswitch-1.0.6 ./configure
Once configuration of the installer has started, its break time. The configuration script took approximately an hour to complete on the 512 MB test system. After the configuration is complete, run the Makefiles and install.
make make install
This will complete the install of the FreeSWITCH system binaries. Note the output of the install and its reference to the command ‘make samples‘. This can be used to generate test configuration files (very handy). The default location of FreeSWITCH on CentOS systems is /usr/local/freeswitch. Since it is often more convenient to have daemon software registered as a system service in CentOS, it will be done here as well. Move to the folder containing the services scripts, download the script file (or just copy / paste if thats easier) and register the service.
cd /etc/init.d wget http://minded.ca/files/2010/07/freeswitch chmod a+x freeswitch
After the script is saved to /etc/init.d/freeswitch and permissions have been changed to allow the file to be executed, the service needs to be registered.
chkconfig --add freeswitch chkconfig --level 345 freeswitch on
Finally, the service can be started just like any other.
service freeswitch start
Currently the service script for FreeSWITCH starts the service as user ‘root’. If the desire is to run the daemon as a different user, modify the line in the script file (near the top), “FS_USER=${FS_USER-root}“; changing ‘root’ to the user account you wish to run the service as. This completes the basic installation of the FreeSWITCH software. Be sure to check the FreeSWITCH wiki for information and examples on configuring the different aspects and features of this excellent software system.
July 20th, 2010 12:09 pm
[...] This post was mentioned on Twitter by Tyler Winfield, Minded Software. Minded Software said: Installing FreeSWITCH http://minded.ca/2010-07-20/installing-freeswitch/ [...]