Menu Close

Installing FreeSWITCH on debian (lenny)

There are lot of guides about installing FreeSwitch on Debian/Ubuntu. The official guide is at http://wiki.freeswitch.org/wiki/Installation_Guide#Debian_Linux and another is at howtoforge. Ubuntu has deb packages even and we may use apt-get install (so easy). Debian lenny does not have bin packages. So we will install the freeswitch from the source.

Install prerequisities

During the process of compilation we may use any of following packages, so we will install them

apt-get install subversion git-core build-essential automake autoconf libtool wget make libncurses5 libncurses5-dev  \
                libgdbm-dev libdb-dev libperl-dev zlib1g-dev libtiff4-dev libjpeg62-dev debhelper         \
                unixodbc-dev libasound2-dev libcurl4-openssl-dev libssl-dev libogg-dev libvorbis-dev      \
                libgdbm-dev libgnutls-dev devscripts curl pkg-config

Downloading source files

We download SVN files from the freeswitch.org (aprox. 300MB), so it wil take a while (freeswitch version 1.0.4)

cd /usr/src/
svn checkout http://svn.freeswitch.org/svn/freeswitch/trunk freeswitch

Building binaries

Go to the folder containing source files

cd freeswitch

Check dependencies, if something are missing, install it

dpkg-checkbuilddeps
dpkg-checkbuilddeps: Unmet build dependencies: libx11-dev uuid-dev

In my case it is missing libx11-dev and uuid-dev, so i’ll install them

apt-get install libx11-dev uuid-dev

now it should be Ok

server:/usr/src/freeswitch# dpkg-checkbuilddeps
server:/usr/src/freeswitch#

now we start building packages, I’m using xen virtual server (2xCPU and 512MB of RAM, so it will take a while, preciselly 3,5 hours

 dpkg-buildpackage -rfakeroot

or

debuild -i -us -uc -b

When the process have finished, one folder up we will find deb packages, which we should install now. The folder with src files we may remve now (/usr/src/freeswitch)

server:/usr/src/freeswitch# cd ..
server:/usr/src# ls -al
total 75808
drwxrwsr-x  3 root src      4096 2010-11-24 18:47 .
drwxr-xr-x 11 root root     4096 2010-10-04 11:30 ..
drwxr-sr-x 21 root src     12288 2010-11-24 18:35 freeswitch
-rw-r--r--  1 root src      7531 2010-11-24 18:47 freeswitch_1.0.4-1ubuntu2_amd64.changes
-rw-r--r--  1 root src   3707826 2010-11-24 18:47 freeswitch_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src      1275 2010-11-24 15:41 freeswitch_1.0.4-1ubuntu2.dsc
-rw-r--r--  1 root src  59732666 2010-11-24 15:41 freeswitch_1.0.4-1ubuntu2.tar.gz
-rw-r--r--  1 root src     22730 2010-11-24 18:47 freeswitch-codec-passthru-amr_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     22800 2010-11-24 18:47 freeswitch-codec-passthru-g7231_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     22812 2010-11-24 18:47 freeswitch-codec-passthru-g729_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src   4956476 2010-11-24 18:47 freeswitch-dbg_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src   7943348 2010-11-24 18:47 freeswitch-dev_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     28158 2010-11-24 18:47 freeswitch-lang-de_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     31484 2010-11-24 18:47 freeswitch-lang-en_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     26414 2010-11-24 18:47 freeswitch-lang-es_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     29286 2010-11-24 18:47 freeswitch-lang-fr_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     25990 2010-11-24 18:47 freeswitch-lang-it_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     25986 2010-11-24 18:47 freeswitch-lang-nl_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src     38510 2010-11-24 18:47 freeswitch-lang-ru_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src    147748 2010-11-24 18:47 freeswitch-lua_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src    164040 2010-11-24 18:47 freeswitch-perl_1.0.4-1ubuntu2_amd64.deb
-rw-r--r--  1 root src    518892 2010-11-24 18:47 freeswitch-spidermonkey_1.0.4-1ubuntu2_amd64.deb

Comparing to the guide which talks about following packages

Description: Freeswitch - The FreeSWITCH open source telephony platform freeswitch-codec-passthru-amr - Pass through AMR Codec support for the FreeSWITCH(TM) freeswitch-codec-passthru-g7231 - Pass through g723.1 Codec support for the FreeSWITCH(TM) freeswitch-codec-passthru-g729 - Pass through g729 Codec support for the FreeSWITCH(TM) freeswitch-dbg - The FreeSWITCH(TM) open source telephony platform Debug symbols freeswitch-dev - Development Package for the FreeSWITCH(TM) freeswitch-lang-de - German language files for the FreeSWITCH(TM) freeswitch-lang-en - English language files for the FreeSWITCH(TM) freeswitch-lang-es - Spanish language files for the FreeSWITCH(TM) freeswitch-lang-fr - French language files for the FreeSWITCH(TM) freeswitch-lang-it - Italian language files for the FreeSWITCH(TM) freeswitch-lang-nl - Dutch language files for the FreeSWITCH(TM) freeswitch-lua - A lua engine for FreeSWITCH(TM) freeswitch-perl - A perl engine for FreeSWITCH(TM) freeswitch-sounds-en-us-callie-16000 - English language files for the FreeSWITCH(TM) (16000) freeswitch-sounds-en-us-callie-32000 - English language files for the FreeSWITCH(TM) (32000) freeswitch-sounds-en-us-callie-8000 - English language files for the FreeSWITCH(TM) freeswitch-sounds-music-8000 - Music on hold files for the FreeSWITCH(TM) (8000) freeswitch-spidermonkey - A Javascript engine for FreeSWITCH(TM)

I’m missing all freeswitch-sound* packages

Installing packages

Now we will install binary packages, I will install all with en lang and excepting other lang packages

dpkg -i freeswitch_1.0.4-1ubuntu2_amd64.deb freeswitch-codec-passthru-amr_1.0.4-1ubuntu2_amd64.deb  /
freeswitch-codec-passthru-g7231_1.0.4-1ubuntu2_amd64.deb freeswitch-codec-passthru-g729_1.0.4-1ubuntu2_amd64.deb   / 
freeswitch-dbg_1.0.4-1ubuntu2_amd64.deb freeswitch-dev_1.0.4-1ubuntu2_amd64.deb   /
freeswitch-lang-en_1.0.4-1ubuntu2_amd64.deb freeswitch-lua_1.0.4-1ubuntu2_amd64.deb   /
freeswitch-perl_1.0.4-1ubuntu2_amd64.deb freeswitch-spidermonkey_1.0.4-1ubuntu2_amd64.deb

Setting up FreeSWITCH server

we need to initiate freeswitch daemon and during installation of freeswitch packages we are informed about that

FreeSwitch Voice Switching System not enabled yet. Edit /etc/default/freeswitch first.

so open the file and change FREESWITCH_ENABLED parameters from false to true

vim /etc/default/freeswitch
# Startup settings for FreeSWITCH

# Enable initd (let init handle start and stop of freeswitch).
# Set to "true" (lowercase) to enable.

FREESWITCH_ENABLED="true"

now we may start the freeswitch service

server:/home/palo/freeswitch# /etc/init.d/freeswitch start
server:/home/palo/freeswitch# 17626 Backgrounding.

we should check if the freeswitch is running (new command for me)

server:/home/palo/freeswitch# lsof -i udp COMMAND     PID       USER   FD   TYPE DEVICE SIZE NODE NAME
portmap    1941     daemon    4u  IPv4   4265       UDP *:sunrpc
rpc.statd  1958      statd    5u  IPv4   4320       UDP *:862
rpc.statd  1958      statd    7u  IPv4   4328       UDP *:56801
snmpd      2785       snmp    7u  IPv4   5980       UDP localhost:snmp
freeswitc 17630 freeswitch    4u  IPv4 354573       UDP server.freeswitch.local:54680->gw.netlab.kis.fri.uniza.sk:5351
freeswitc 17630 freeswitch   36u  IPv6 355409       UDP [2001:4118:300:122:b077:48ff:fe9d:5524]:sip
freeswitc 17630 freeswitch   39u  IPv4 355430       UDP server.freeswitch.local:5080
freeswitc 17630 freeswitch   43u  IPv4 355445       UDP server.freeswitch.local:sip

or

server:/home/palo/freeswitch# ps afx | grep free 24718 pts/1    S+     0:00  |                               \_ tee ../freeswitch_1.0.4-1ubuntu2_amd64.build
 7139 pts/1    S+     0:53  |                                       \_ /bin/sh ./configure --prefix=/opt/free 
...
...
...

look it is running. We may continue.

Configuring the FreeSWITCH

Soon…

Leave a Reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.