Intalar FreeSWITCH en DEBIAN LENNY

Por medio del presente documento pretendo idicarles como instalar FreeSWITCH 1.0.4 con soporte ODBC y H323.

1) Instalamos todos los paquetes necesarios para Debian
aptitude update
aptitude -y install openssh-server
aptitude -y install mc
aptitude -y install linux-headers-`uname -r`
aptitude -y install build-essential
aptitude -y install mysql-client-5.0 mysql-server-5.0 libmysqlclient15-dev
aptitude -y php5 php5-pear php5-cli php5-cgi php5-curl php5-common php5-mysql php5-odbc php5-sqlite php5-mhash php5-xmlrpc php5-dev
aptitude -y install unixodbc unixodbc-bin unixodbc-dev
aptitude -y install sendmail-bin sendmail dovecot-common
aptitude -y install libcurl3-dev curl libcurl3
aptitude -y install libgnutls26 libgnutls-dev libdb4.5-dev
aptitude -y install subversion-tools flex bison autoconf
aptitude -y install libtiff4 libtiff4-dev libncurses5-dev

2) Instalacion de PTLIB (necesaria para H323)

cd /usr/src
svn co http://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/branches/v2_6 ptlib
cd ptlib
./configure
make
make install

3) Instalacion de OPAL (necesaria para H323)

cd /usr/src
svn co http://opalvoip.svn.sourceforge.net/svnroot/opalvoip/opal/branches/v3_6 opal
cd opal
./configure
make
make install

4) Instalacion de IKSEMEL
cd /usr/src
wget http://iksemel.googlecode.com/files/iksemel-1.3.tar.gz
tar xvfz iksemel-1.3.tar.gz
cd iksemel-1.3
./configure --prefix=/usr
make
make check
make install

5) Instalacion de SPANDSP
cd /usr/src
wget http://www.soft-switch.org/downloads/spandsp/spandsp-0.0.5.tgz
tar xvfz spandsp-0.0.5.tgz
cd spandsp-0.0.5
./configure --prefix=/usr
make
make install

ldconfig -v

Instalacion de FreeSWITCH

wget http://files.freeswitch.org/freeswitch-1.0.4.tar.gz
tar xfz freeswitch-1.0.4.tar.gz
cd freeswitch-1.0.4

modificamos el archivo modules.conf, les quitamos los "#"

Archivo original

#endpoints mod_dingaling
#languages mod_spidermonkey_odbc
#xml_int mod_xml_curl

Debe quedar asi:

endpoints mod_dingaling
languages mod_spidermonkey_odbc
xml_int mod_xml_curl

./bootstrap.sh
./configure --enable-core-odbc-support --prefix=/opt/freeswitch
make
make install

Instalacion de modulo para soporte H323
make mod_opal
make mod_opal-install

make sounds-install
make moh-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 samples

Instalamos esto por si luego deseamos instalar FreePBX V3:
aptitude -y install libdb4.5-dev
cat $dir_dest/freeswitch-$fs_ver/libs/esl/php/Makefile | sed 's/LOCAL_LDFLAGS=$(PHP_LDFLAGS) $(PHP_LIBS)/LOCAL_LDFLAGS=$(PHP_LDFLAGS) $(PHP_LIBS) --lpthread/g' > /tmp/file.tmp
cat /tmp/file.tmp > $dir_dest/freeswitch-$fs_ver/libs/esl/php/Makefile
cd $dir_dest/freeswitch-$fs_ver/libs/esl
make phpmod
make phpmod-install
echo "extension=ESL.so" > /usr/lib/php5/20060613+lfs/ESL.ini
echo "extension=ESL.so" > /etc/php5/conf.d/ESL.ini

Generando archivo de inicio de freeSWITCH

cp debian/freeswitch.init /etc/init.d/freeswitch
chmod 777 /etc/init.d/freeswitch
touch /etc/default/freeswitch
echo 'FREESWITCH_ENABLED="true"' > /etc/default/freeswitch
echo 'FREESWITCH_PARAMS="-nc"' >> /etc/default/freeswitch

update-rc.d freeswitch defaults

ln -s /opt/freeswitch /etc/freeswitch
ln -s /opt/freeswitch/bin/fs_cli /bin

Bien, antes de iniciar FreeSWITCH debemos editar el archivo /opt/freeswitch/conf/autoload_configs/modules.conf.xml, en el mismo nos debe quedar agregado los siguiente:

<!-- Endpoints -->
    <load module="mod_sofia"/>
    <load module="mod_loopback"/>
    <load module="mod_opal"/>
<!-- Languages -->
    <load module="mod_spidermonkey"/>

Listo, ya estamos en condiciones de iniciar FreeSWITCH(/etc/init.d/freeswitch start), y para ingresar debemos ejecutar /opt/freeswitch/bin/fs_cli.

En la proxima les indicare como instalar FreePBX V3, y como manejar diferentes contextos para los usuarios, como hacer capturas de llamadas por grupo, etc.

Suerte.

 

 

 

 

Comentarios

Manejo de freeswitch

Hola veo que has trabajado ya con el software quisiera ver la posibilidad de si tienes un manual de como funciona el software debido a que estoy estoy empesando a leer sobre el mismo y no hay mucha documeentacion y que me puedas decir a grandes rasgos la diferencia entre freeswitch y asterisk si las sabes.. De antemano gracias

Distribuir contenido Distribuir contenido