Wednesday, September 1, 2010

{Deploy} Installing FreeSWITCH (VoIP) on CentOS, Fedora, RedHat

This HowTo can be downloaded at http://www.slideshare.net/AbhishekKr/free-switch-cent-os


FreeSWITCH on RedHat, Fedora, CentOS

To Install 'FreeSWITCH' on CentOS/RedHat/Fedora
=============================================================
============================================================= 
Execute following commands at shell: 

___________________________________________
Installing Dependencies {Require Internet} 
===========================================
yum -y install autoconf automake libtool gcc-c++ ncurses-devel 
yum -y make expat-devel zlib zlib-devel libjpeg-devel unixODBC- devel 
yum -y openssl-devel gnutls-devel libogg-devel libvorbis-devel 
yum -y curl-devel libtiff-devel libjpeg-devel

___________________________________________
Download/Extract FreeSWITCH Source =========================================== 
wget http://files.freeswitch.org/freeswitch-1.0.6.tar.gz tar -zxvf freeswitch-1.0.6.tar.gz
___________________________________________ 
Optional {to add OpenZAP support to FreeSWITCH} 
=========================================== 
echo "../../libs/openzap/mod_openzap" >> freeswitch-1.0.6/modules.conf 

___________________________________________ 
Compiling/Installing FreeSWITCH 
=========================================== 
cd freeswitch-1.0.6 
./configure 
make install 
make cd-sounds-install 
make cd-moh-install 
make uhd-sounds-install 
make uhd-moh-install 
make hd-sounds-install 
make hd-moh-install 
make sounds-install 
make moh-install 
make mod_portaudio-install 
make samples 

___________________________________________ 
create symlink for main binaries, EZ-ACCESS 
=========================================== 
ln -s /usr/local/freeswitch/bin/freeswitch /usr/local/bin/freeswitch 
ln -s /usr/local/freeswitch/bin/fs_cli /usr/local/bin/fs_cli

__________________________________________ 
Post Installation =========================================== 
to launch app 
#freeswitch 
to launch app at background (no console)
#freeswitch -nc 
to stop a running freeswitch instance 
[] running foreground: 
> ... {i.e. 3 periods} 
[] running background: 
# freeswitch -stop 
to access cmd-line of any FreeSWITCH server 
#fs_cli 
try commands like 'version','help' to exit use 'fsctl shutdown' or '...' 
__________________________________________

2 comments:

Michael Collins said...

Just a few comments to make things even easier for your readers:

#1 - Just do "make cd-moh-install && make cd-sounds-install" because it will implicitly install the other sound files. (cd means 48kHz, uhd means 32kHz, hd means 16kHz; the moh-install and sounds-install is for the 8kHz sound files.) The above command will install *all* sound files for you!

#2 - "openzap" is already in modules.conf. Just edit modules.conf prior to running ./configure. Remove the # at the beginning of the line with openzap. No need to add it with the echo command.

#3 - You mentioned building mod_portaudio and the command you gave is correct. However, if you enable mod_portaudio in modules.conf (again by removing the # at the beginning of the line) then it will be built when you execute "make install" and you won't have to explicitly do "make mod_portaudio-install".

#4 - You can automatically load mod_openzap and mod_portaudio (as well as any other module that you have built) by editing /usr/local/freeswitch/conf/autoload_configs/modules.conf.xml - uncomment the lines with mod_openzap and mod_portaudio. When you start FreeSWITCH these modules will load automatically.

Thanks for such a quick how-to! If your blog readers want more information they can visit freeswitch.org or wiki.freeswitch.org.

Thanks,
Michael S Collins

Abhishek said...

well thanks Michael, that comment was a post in itself

>> for 'echo...' statement part I did that with proper intention as if someone want to create a shell script of entire process and do other work while it completes; 'echo' was the substitute of manually removing '#' from it

>> also 'mod_portaudio'; I did a separate installation just to make a point if they forgot few modules during initial stages they can always build them later like this

thanks for the support