1:53 PM

Installation of Asterisk

Installation of Asterisk:
Asterisk Used three main packages:
1. Asterisk
2. Zaptel
3. libpri
If only looking for pure VoIP network, then only asterisk packages in required.
Compile requirement:
1. gcc,gcc-c++
2. C,C++ development library
3. Kernel Sources
4. Kernel headers
5. bison,bison-devel
6. libnewt,libnewt-devel
7. zlib,zlib-devel
8. openssl,openssl-devel,libssl-devel

Download Source:
# cd /usr/src
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.2.*.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2.*.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/zaptel/zaptel-1.4.12.*.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.10.*.tar.gz

Extract the Source Code:
# tar -xzvf zaptel-1.4.12.*.tar.gz
# tar -xzvf asterisk-1.6.2.*.tar.gz
# tar -xzvf asterisk-addons-1.6.2.*.tar.gz
# tar -xzvf libpri-1.4.10.*.tar.gz

Compile libpri
# cd /usr/src/libpri-version && make && make install
libpri is used by many manufacturer of PCI TDM Cards it is always safe to compile it even if card is not installed/used.

Compile Zaptel:
# cd /usr/src/zaptel-version && ./configure --prefix=/usr && make && make install && make config
make config install some tools:
$ ztcfg : reads the config in /etc/zaptel.conf to configure the Hardware.
$ zttool : for monitoring installed hardware
$ ztmonitor : for monitoring active calls
$ zttest: testing the latency and accuracy of Card.
$ ztscan : Print Configuration of Zaptel Spans.

Configuring /etc/zaptel.conf
span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
span=2,2,0,ccs,hdb3,crc4
bchan=32-46,48-62
dchan=47
span=3,3,0,ccs,hdb3,crc4
bchan=63-77,79-93
dchan=78
span=4,4,0,ccs,hdb3,crc4
bchan=94-108,110-124
dchan=109

Compile Asterisk:
# cd /usr/src/asterisk-version && ./configure && make && make install && make samples

Asterisk File Locations:
* /etc/asterisk/ --> Asterisk configuration files directory
* /usr/lib/asterisk/modules/ --> all loadable modules: codecs, channels, formats etc.
* /var/lib/asterisk/ --> contains astdb , sounds, firmware, images and keys.
* /var/spool/asterisk/ --> temporary files and voicemails
* /var/run/ --> contains process Id of running prcess including Asterisk.
* /var/log/asterisk/ --> Asterisk log files
* /var/log/asterisk/cdr-csv/ --> Asterisk call details records

Asterisk Basics:
Asterisk is a Hybrid TDM and packet voice PBX.
Interface any piece of telephony hardware or software to any telephony application.
Prime components: channels and /etc/asterisk/extensions.conf - the Asterisk dial plan.
Channels can be many different technologies - SIP,IAX,H323,Skinny,Zaptel etc.
extensions.conf is powerful programming language controlling the flow of the call.
Application do the work - answering channels , ringing a channels , providing a voicemail system etc.

Telephony Hardware:
Digium makes several digital and analog PCI Cards.
* T/E1 single to quad span card.
* FXO and FXS interface upto 24 ports.
* One port FXO Card - PCI Intel Winmodem.
* plus the usual array of SIP and IAX Phones and analouge apapters.(ATAs)
* Even Interface to proprietary digital key phones are available.

0 comments: