Monday, September 14, 2009

Simplest Way to VOIP Set Up

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 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:


Installing Asterisk/Dahdi/Libpri

  1. 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 install
    #>cd ..
    cd dahdi-tools-<version>
    #>make install
  2. LibPRI Installation
    Download libpri into arbitrary directory (/usr/src) and untar it.
    #>tar xvfz libpri-<version>
    #>cd libpri-<version>
    #>make install
  3. Asterisk Installation

    If you are upgrading Asterisk make sure that old asterisk modules are removed from /usr/lib/asterisk/modules
    #> cd /usr/lib/asterisk
    #> mv modules modules.old
    Download Asterisk into arbirary directory  (/usr/src/) and untar it.
    Untar Asterisk and proceed with installation
    #>tar xvfz asterisk-<version>.tgz
    #>cd asterisk-<version>
    #>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
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
callerid="Fred Flintstone" <12345>
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