You are on page 1of 15

Installation steps for cvt release 8.0.

0 (java version)
Required files:
cvt server runtimes
cvt gateway pages runtimes
cvt page service runtimes
cvt status service runtimes
cvt reports runtimes
freeswitch source
dahdi driver source
libpri source
dahdi timer module source
tslcvtmono database scripts
freeswitch,tslcvt,tslpage and tslstatus startup scripts
java 8 runtimes
archives folder with dependecies deb files in it
sources.list.d folder and sources.list file
Install Dependencies:

Copy all available deb files from archives folder to


/var/cache/apt/archives/. Copy sources.list and
sources.list.d folder to /etc/apt/. apt-get will take
those from this path instead of downloading from
internet
Execute follow :
sudo apt-get install autoconf automake devscripts gawk
g++ git-core libjpeg-dev libncurses5-dev libtool make
python-dev pkg-config libtiff5-dev libperl-dev libgdbmdev libdb-dev gettext libssl-dev libcurl4-openssl-dev
libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3dev libedit-dev libldns.dev libpq-dev build-essential
libncurses5 unixodbc unixodbc-dev zlib1g-dev
sudo apt-get install libexpat1-dev libtiff4-dev libx11-dev

unixodbc-dev python-dev zlib1g-dev libzrtpcpp-dev


libasound2-dev libogg-dev libvorbis-dev uuid-dev bison
libncurses-dev

Install CaudalFin DAHDI Drivers:

Extract dahdi source to folder :


tar -zxvf dahdi-linux-complete-X.X.X+X.X.X.tar.gz

Goto extracted folder :

cd dahdi-linux-complete-X.X.X+X.X.X

execute commands :
sudo make
sudo make install
sudo make config

Now you can see driver installed sucessfully or by


starting dahdi service
execute
service dahdi start

output will be something like this :


Loading DAHDI hardware modules:
cf42xxp: done
Running dahdi_cfg: done.

At this point run


dahdi_genconf and

dahdi_genconf modules to generate the


/etc/dahdi/modules, /etc/dahdi/system.conf files for

cf42xxp driver
Install libpri :

Extract libpri source to folder :


tar -zxvf libpri-x.x.xx.tar.gz

Goto libpri folder :


cd libpri-x.x.xx

Execute commands :
sudo make

sudo make install


Note: After you add or remove pri cards run dahdi_genconf
command so that dahdi can detect the changes in spans.

Install Freeswitch and Integrate dahdi timer with freeswitch source

Before installing freeswitch from source you have to


build it with dahdi timer to avoid voice destrotion.
If youhttp://files.freeswitch.org/freeswitch-1.2.21.tar.bz2 dont have
freeswitch source download the latest FreeSWITCH source.
E.g :

Extract freeswitch source to folder :


tar -zxvf freeswitch-1.2.21.tar.bz2

Extract dahdi_timer to folder :


tar -zxvf mod_dahdi_timer-1.0.0.tar.bz2
Goto dahdi timer folder , Open src/mod/timers
Copy folder mod_dahdi_timer.
Goto freeswitch folder, open src/mod/timers and

paste copied dahdi folder here.


Come back to freeswitch folder . Open modules.conf
file
Add line : timers/mod_dahdi_timer
Goto line : #../../libs/freetdm/mod_freetdm and remove
# from begining of this line
do the same for line #/endpoints/mod_gsmopen

save file.
Goto src/mod/applications/mod_conference in
freeswitch folder
open file : mod_conference.c
Search for line timer_name = "soft"; and make it
timer_name = "dahdi";

save file.
Before building freeswitch do:
sudo apt-get install gsm-utils

sudo apt-get install libgsmme-dev


sudo apt-get install usb-modeswitch-data usbmodeswitch
then
Goto /usr/src/freeswitch
x.x.x/src/mod/endpoints/mod_gsmopen/libctb-o.16/build
sudo make DEBUG=0 GPIB=0
sudo make DEBUG=0 GPIB=0 install
sudo ldconfig
Come back to freeswitch folder
excecute command : ./configure
--prefix=/usr/local/freeswitch/
--prefix option used to specify where to install FreeSWITCH
[optional].
Open make file and append -lz in below line as shown
freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la \
$(am__append_19) $(am__append_20) -lz
excecute command : make
excecute command : make install
Now FreeSWITCH is installed at location /usr/local/freeswitch. Now install
FreeTDM

Indstall FreeTDM

Navigate to freetdm folder in FreeSWITCH source.


E.g. cd /usr/local/freeswitch-1.2.21/libs/freetdm/
excecute command : ./configure --with-libpri
--prefix=/usr/local/freeswitch/

execute command make


execute command make install
Note: If you are reinstalling the FreeSWITCH or freetdm with old or
new version run make clean command before make command.
Configure the FreeSWITCH
To handle the call on pri and internal extensions we have to set some configurations
in Freeswitchs xml files.
Once freetdm is ready and board is installed we have to define pri lines going to
connect FreeSWITCH in following location.
<FreeSWITCH dir>/conf/freetdm.conf
Sets up the spans from the driver and configures the library (the freetdm library)
Refer /etc/dahdi/system.conf file for spans detected by dahdi driver
For example if we have two pri card's installed, one is single span and another one is
dual span then we are having three spans and same number of spans will be shows in
/etc/dahdi/system.conf file. We have to configure thease spans in freetdm as below :
[general]
cpu_monitor => no
cpu_monitoring_interval => 1000
cpu_set_alarm_threshold => 80
cpu_reset_alarm_threshold => 70
cpu_alarm_action => warn
debugdtmf_directory=/usr/local/freeswitch/log/ftdm/
------------------[span zt ISDN_1] ;pri line one
trunk_type => E1
b-channel => 1-15 ; bearer channels
d-channel => 16 ; data channel
b-channel => 17-31

Now we have to define some more properties related to each span in following
location:
<FreeSWITCH dir>/autoload_configs/freetdm.conf.xml
Sets context and several parameters
Here we are making first span as user side and other two as a network side using

attribute node with value cpe and net.


We have to give name of the dialplan to execute when call arrived on that span
by setting the value of the attribute context.
<libpri_spans>
<span name="ISDN_1">
<param name="node" value="cpe"/>
<param name="switch" value="euroisdn"/>
<param name="opts" value="omit_redirecting_number"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
</span>

Create dialpaln
Refer following dial plan:
<FreeSWITCH DIR>\conf\dialplan\default.xml
<? xml version="1.0" encoding="utf-8"?>
<include>
<context name="default">
<extension name="any">
<condition field="destination number" expression="^">
<action application="socket" data="127.0.0.1:8022 async full"/>
</condition>
</extension>
</context>
</include>

Now if call arrives on pri span which context set to default will be parked on
FreeSWITCH and waits for outbound socket to issue commands.
Same way we can have n number of sip extensions defined in following location:
<FreeSWITCH DIR>\conf\directory\default\

Create conference profile


Conference profiles are the common settings used by any conference. Its not
declaring confernce. We can create n number of profiles. On creation of conferece we
have to specify any one of these profile name so conference takes its setting from it.

Edit file : <FreeSWITCH


DIR>/conf/autoload_configs/conference.conf.xml
Add the follow profile in file
<profile name="tsl">
<param name="domain" value="$${domain}"/>
<param name="rate" value="8000"/>
<param name="interval" value="20"/>
<param name="energy-level" value="30"/>
<param name="caller-controls" value="none"/>
<param name="auto-gain-level" value="1120" />
</profile>
Create the file gsmopen.conf.xml in <FreeSWITCH
DIR>/conf/autoload_configs/ directory and put below data
<configuration name="gsmopen.conf" description="GSMopen Configuration">
<global_settings>
<param name="debug" value="8"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="hold-music" value="$${moh_uri}"/>
<param name="destination" value="9999"/>
</global_settings>
<!-- one entry here per gsmopen interface -->
<per_interface_settings>
<interface id="1" name="interface0">
<param name="hold-music" value="$${moh_uri}"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="destination" value="5000"/>
<param name="controldevice_name" value="/dev/ttyUSB3"/>
<param name="controldevice_audio_name" value="/dev/ttyUSB2"/>
<param name="imei" value="353443043468086"/> <!-- if both imei and imsi
are correct, the two device names will be overridden with the discovered names
-->
<param name="imsi" value="220032500058601"/>
</interface>
<interface id="3" name="interfaceNICE">
<param name="hold-music" value="$${moh_uri}"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="destination" value="9996"/>
<param name="controldevice_name" value="/dev/ttyUSB7"/>
<param name="controldevice_audio_name" value="/dev/ttyUSB6"/>

</interface>
</per_interface_settings>
</configuration>

Load Modules
Open file <FreeSWITCH
DIR>/conf/autoload_configs/modules.conf.xml
add lines
<load module="mod_dahdi_timer"/>
<load module="mod_freetdm"/>
<load module="mod_gsmopen"/>
save.
Install mono framework
sudo apt-get install mono-complete
sudo apt-get install mono-vbnc
If any package could not be installed just update first.
sudo apt-get update -fix-missing
sudo apt-get install xvfb
sudo reboot now
Install Mysql database
sudo apt-get install mysql-server
set lower_case_table_names=1 and set bind-address= * in mysql configuration file
/etc/mysql/my.cnf' under mysqld section.
start mysql server
sudo service mysql start
login to mysql
sudo mysql -u root -p
add connect permission to any remote pc.
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY
'yourpassword';

Update the cvt database to mysql server


Open mysql
sudo mysql -u root -p
Now it will ask for password. Enter password given while installing it. On correct
password enterd mysql server command prompt will be opened.
mysql>
Now create database tslcvtmono
mysql>create database tslcvtmono;
Now use tslcvtmono databse
mysql>use tslcvtmono;
Now execute tbl.sql,view.sql,func.sql,proc.sql.inserts-min.sql files in mentioned order
mysql>source /path/to/sql/files/file.sql
mysql>source

/usr/local/telesuite/scripts/tbl.sql

mysql>source /usr/local/telesuite/scripts/view.sql
Execute all mentioned sql files like this.

Install java
To install JDK 8 on ubuntu first get the jdk from oracle download site or from tsl
repo :
Filename : jdk-8u5-linux-x64.tar.gz
Download location :
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads2133151.html
Its a compressed tar file.
Copy the tar.gz file to /usr/local/src/
Open terminal.
Extract jdk tar ffile.
tar -xvf /usr/local/src/jdk-8u5-linux-x64.tar.gz

Go to usr/local/src/.
Cd /usr/local/src/

Then run the commands below to create a folder for Java JDK 8 files in the
/usr/lib directory.
sudo mkdir -p /usr/lib/jvm/jdk1.8.0/

Then run the commands below to move JDK content to the new folder.
sudo mv jdk1.8.0_05/* /usr/lib/jvm/jdk1.8.0/

Next, run the commands below to begin configuring Java


sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac"
1
sudo update-alternatives --install "/usr/bin/javaws" "javaws"
"/usr/lib/jvm/jdk1.8.0/bin/javaws" 1

To verify if Java is fully installed, run the commands below to test it.
java version

If it shows some earlier version of java there is are already old version of java
installed and used as default. To change that execute below command and
select 1.8 version of java.
Sudo update-alternatives config java

Install tomcat7
sudo apt-get install tomcat7 tomcat7-admin
sudo apt-get install authbind -this step is optional if above
step doesnt install authbind by default.
sudo service tomcat7 restart
Configure tomcat7 and jdk(java)
Make tomcat to listen on port 80:
First goto /etc/default/tomcat7 file and uncomment AUTHBIND=no and make it

AUTHBIND=yes
Now edit file /etc/tomcat7/server.xml and make port number 80 in line
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />

Now execute following commands


sudo touch /etc/authbind/byport/80
sudo chmod 500 /etc/authbind/byport/80
sudo chown tomcat7 /etc/authbind/byport/80
sudo service tomcat7 restart
Once tomcat installed it may change java version to 1.7. we use 1.8. Check it
and change it back to 1.8
java version

If it shows some earlier version of java there is are already old version of java
installed and used as default. To change that execute below command and
select 1.8 version of java.
Sudo update-alternatives config java

Host cvt pages and cvt reports on tomcat7


The virtual path of tomcat7 will be /var/lib/tomcat7/webapps
Copy the cvt Pages folder and cvt reports folder to /var/lib/tomcat7/webapps
Suppose Ip of system is 192.168.1.195 and cvt pages folder name is Pages then you
can access the pages using url: 192.168.1.195/Pages/
Setup cvt server with all supporting apps.

Create one folder /usr/local/telesuite/


copy all apps to that folder. Directory structure is :
/usr/lcoal/telesuite/tslcvt/ - cvt server
/usr/lcoal/telesuite/PageServices/ - conf gateway service
/usr/lcoal/telesuite/cvtstatusservice/ - cvt status service
now copy startup scripts (freeswitch,tslcvt,tslpage,tslstatus) to /etc/init.d/ folder.
Now add those scripts to startup
sudo chmod 755 /etc/init.d/scriptname
sudo update-rc.d scriptname defaults
eg: sudo chmod 755 /etc/init.d/tslcvt
eg: sudo update-rc.d tslcvt defaults
Do this for all scripts
Change the ip address config in xap files of cvt pages.
On installation of system in client place we may have to change the ip in clientconfig
file of silverlight pages.
Location : /var/lib/tomcat7/webapps/Pages/Clientbin
Copy both xap files for PageService and status service to windows pc.
Rename them to rar and extract them.
Open extracted folder.
Edit servicereference.clientconfig file.
Change Ip in this entry <endpoint
address="http://192.168.100.141:8283/MyTestService" binding="basicHttpBinding"
to system ip.
select all files in folder and zip it and rename the zipped file back to original.xap
Configure the cvt runtimes.
Important setting to specify in app config file of cvt runtimes :
appconfig.xml in cvt server
<!--Maximum number of lines to be used by application.-->
<entry key="maxchannels">30</entry>
<!--Port numer for inbound connection with freeswitch as defined in event socket config file-->
<entry key="fsinboundport">8021</entry>

<!--Passsowrd for inbound connection with freeswitch as defined in event socket config file-->
<entry key="fspassword">ClueCon</entry>
<!--Port numer for outbound connection from freeswitch as defined in default dialpaln-->
<entry key="fsoutboundort">8022</entry>
<!--Address of Freeswitch server-->
<entry key="fsip">192.168.100.242</entry>
<!--Maximum length if extension numbers excluding fixed phone number. Length of pilot number-->
<entry key="MaxDIDLength">3</entry>
<!--Maximum timeout to wait for switch up-->
<entry key="fsuptimeout">3</entry>
<!-- Datbase ip and name format : ip/DBname-->
<entry key="dbconnstr">192.168.100.242/tslcvtmono</entry>
<!--Database password-->
<entry key="dbpassword">freeswitch</entry>
<!--Database user name-->
<entry key="dbuser">root</entry>
<!--conference record directory same as in page services.-->
<entry key="confrecordpath">/usr/local/telesuite/cvt/recordings/conf/</entry>
<!--Path where greetings stored-->
<entry key="greetDir">/usr/local/telesuite/cvt/eng/conf/greetings/</entry>
<!--Path where prompts stored-->
<entry key="promptDir">/usr/local/telesuite/cvt/eng/conf/prompts/</entry>
<!--Path where BG music stored-->
<entry key="bgmDir">/usr/local/telesuite/cvt/bgm/</entry>
<!--Profile to use in conference.-->
<entry key="profileName">tsl</entry>
<!--Spans to use. coma separated-->
<entry key="SpansToUse">2</entry>

<!--Url of page service to to call restfull services-->


<entry key="ServiceURL">http://192.168.100.196:8284</entry>
<!--List of log folders created by app-->
<entry key="LogDirs">Applog,FsApiLog,esllog</entry>
<!--Interval in dyas to purge the log files-->
<entry key="LogDeleteInterval">30</entry>
<!--Path to voice broadcast message record-->
<entry key="VbRecordDir">/usr/local/telesuite/tslcvt/recordings/voicemessage/</entry>

<!--Path to emergency message record-->


<entry key="EmrRecorDir">/usr/local/telesuite/tslcvt/recordings/emergency/</entry>
<!--Type of the line you are going to use (TDM for pri,GSM for gsmmodem and SIP for ip phones)-->
<entry key="LinkType">SIP</entry>

Cvt confgateway service app config


Mysql databse connectio string
<add key="tslcvtConString"
value="server=localhost;port=3306;database=tslcvtmono;uid=root;pwd=freeswitch" />

No of line sasme as in cvt server app config


<add key="MaximumLines" value="120" />

Path to folder where to create log files


<add key="LogFilePath" value="/usr/local/telesuite/PageServices" />

Path to folder usually tomcat virtual directory folder where to save the recordings. You can give http
url of that virtual directory if pages are accessed from network
<add key="VoiceFilePath" value="/var/lib/tomcat7/webapps/confrecords" />

or
<add key="VoiceFilePath" value="http://192.168.100.141/confrecords" />

Url of reports hosted in tomcat7.


<add key="ReportURL" value ="http://192.168.100.141/cvtreports/" />

Cvt conf status service app config


Mysql connection string. You can give ip as localhost if its in same pc.
<add key="DatabaseConnection"
value="server=192.168.100.141;port=3306;database=tslcvtmono;uid=root;pwd=freeswitch" />

Path to folder where to save log files


<add key="LogFilePath" value="/usr/local/telesuite/cvtstatusservice" />

Installing pipelight plugin to view silverlight pages in ubuntu :


sudo
sudo
sudo
sudo

apt-add-repository ppa:ehoover/compholio
apt-add-repository ppa:mqchael/pipelight
apt-get update -fix-missing
apt-get install pipelight

press tab to naviagte between buttons when license agreement asked on terminal

Installing midori browser to view silverlight pages in ubuntu :


sudo apt-add-repository ppa:midori/ppa && sudo apt-get update -qq && sudo apt-get
sudo apt-get update -fix-missing
sudo apt-get install midori

Now open midori browser


click menu button at left corner
goto preferences
goto behavior tab
check allow script open poopups
goto extensions tab
select silverlight plugin

You might also like