This document is about setup voip using open source packages
Building your own corporate phone system using the Asterisk open source telephony suite could result in massive cost savings for your company
Downloading Asterisk/Dahdi/LibPRI
Go to http://www.asterisk.org/downloads and download Asterisk/Dahdi/LibPRI (Look for Asterisk downloads on right-hand side) .
You can use wget command to download sources (tar ball) on your local directory.
For example:
#>wget http://downloads.digium.com/pub/telephony/dahdi-linux/dahdi-linux-2.0.0.tar.gz
#>wget http://downloads.digium.com/pub/telephony/dahdi-tools/dahdi-tools-2.0.0.tar.gz
#>wget http://downloads.digium.com/pub/libpri/releases/libpri-1.4.7.tar.gz
#>wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.6.0.1.tar.gz
Installing Asterisk/Dahdi/Libpri
- Dahdi Installation
Download Dahdi into arbitrary directory (/usr/src) and untar it.#>tar xvfz dahdi-linux-<version>
#>tar xvfz dahdi-tools-<version>#>cd dahdi-<version>
#>make
#>make install
#>cd ..
#>cd dahdi-tools-<version>
#>./configure
#>make
#>make install - LibPRI Installation
Download libpri into arbitrary directory (/usr/src) and untar it.#>tar xvfz libpri-<version>
#>cd libpri-<version>
#>make
#>make install - Asterisk Installation
If you are upgrading Asterisk make sure that old asterisk modules are removed from /usr/lib/asterisk/modules#> cd /usr/lib/asterisk
Download Asterisk into arbirary directory (/usr/src/) and untar it.
#> mv modules modules.old
Untar Asterisk and proceed with installation#>tar xvfz asterisk-<version>.tgz
#>cd asterisk-<version>
#>./configure
#>make
#>make install
#>make samples (in case of very first install)
Please note: <version> refers to the specific release of your program. For instance, dahdi-linux-2.0.0.tar.gz, once untarred will create the folder dahdi-linux-2.0.0.
When the system comes back up, Asterisk should start automatically. To check that everything is working, check DAHDI is loaded by opening a terminal window and, with root privileges, typing:
# lsmod | grep dahdi
You should see references to several dahdi modules, including dahdi_dummy, dahdi_transcode, crc_ccitt, and dahdi_voicebus.
Check Asterisk is running and log on to the Asterisk command line with:
#asterisk –r
You should see some version and license information along with a "Connected to Asterisk" message and prompt.
To stop asterisk from the Asterisk command line type
CLI> stop now
or from the Linux command prompt type
# service asterisk stop
Setting up an X-Lite client on Asterisk
X-Lite and Asterisk Ver 1.00 Page 1
1) Adding a client entry to Asterisk’s SIP configuration
* edit the SIP configuration file /etc/asterisk/sip.conf
% sudo vi /etc/asterisk/sip.conf
*enter an entry for each X-Lite client, for example
[12345] ; X-Lite client 12345
type=friend
secret=blah
auth=md5
nat=yes ; we assume clients are behind NAT
host=dynamic ; and have dynamic IP addresses
reinvite=no ; if so, we need to make them
canreinvite=no ; always go through Asterisk
qualify=1000
dtmfmode=inband
callerid="Fred Flintstone" <12345>
disallow=all
allow=gsm ; add whatever other codecs we fancy
context=theflintstones ; use a context that exists ;-)
*save the changes
2) Adding extensions for X-Lite clients
* edit the Extensions configuration file /etc/asterisk/extensions.conf
% sudo vi /etc/asterisk/extensions.conf
*enter one catch-all extension, for example
[theflintstones] ; Our context for X-Lite clients
;
; Catch all five digit numbers, no leading zeroes
exten => _[123456789]XXXX,1,NoOp(“call for “${EXTEN})
exten => _[123456789]XXXX,2,Dial(SIP/${EXTEN},60,tr)
exten => _[123456789]XXXX,3,Congestion
* alternatively, enter one specific extension for each client
* save the changes
3) Reload the new configuration
* on the Asterisk console, reload the configuration files
switch1*CLI> reload
No comments:
Post a Comment