Get in Touch

Installation Overview

Asterisk is one of the best telephony solutions which is free to use. There are others such as yate that provide same type of solutions and even more custom ones. Due to the easy of implementation Asterisk has become more popular than anything else. Asterisk is very easy to use and lots of open source and closed source panels provide a GUI for it. Pre-requisites for Asterisk installation: Asterisk requires a system running with kernel 2.6 and the header files must be present to compile asterisk on your system. Complete Asterisk is written in C so we require gcc compiler with the supporting libraries such as termcap, and openssl. Asterisk add-ons require the mysql header files so please install mysql lib, mysql client and the headers to compile asterisk-addons.

Download files:

Download below mentioned files as pre-requisites steps for the asterisk installation. a. Zaptel (http://downloads.asterisk.org/pub/telephony/zaptel/zaptel-1.4.12.1.tar.gz) b. libpri (http://downloads.digium.com/pub/libpri/libpri-1.4-current.tar.gz) c. asterisk (http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.8.30.0.tar.gz) d. asterisk-sounds ( http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-sounds-1.2.1.tar.gz) e.asterisk-addones(http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-addons-1.4.7.tar.gz)

Creating First SIP Extension:

Please add the following lines to sip.conf (/etc/asterisk/sip.conf)

Installation of Asterisk:

Copy all the files into you server (assuming you have copied all files into /us/src/) 30 Steps for installing asterisk on system:
    1. tar -xzf zaptel-1.4.12.1.tar.gz
    2. tar -xzf libpri-1.4.9.tar.gz
    3. tar -xzf asterisk-1.4.20.tar.gz
    4. tar -xzf asterisk-sounds-1.2.1.tar.gz
    5. tar -xzf asterisk-addons-1.4.7.tar.gz
    6. cd zaptel-1.4.12.1
    7. ./configure
    8. make
    9. make install
    10. make config
    11. service zaptel start
    12. cd ..
    13. cd libpri-1.4.9
    14. make
    15. make install
    16. cd ..
    17. cd asterisk-1.4.20
    18. ./configure
    19. make
    20. make install
    21. make samples
    22. make config
    23. cd ..
    24. cd asterisk-sounds
    25. make install
    26. cd ..
    27. cd asterisk-addons-1.4.7
    28. ./configure
    29. make
    30. make install
    31. service asterisk start
If all above comands run well then we have be installed new asterisk server at current system.
    1. [common](!) ; this is template.
    2. type=friend
    3. context=internal
    4. host=dynamic
    5. disallow=all
    6. allow=ulaw
    7. allow=alaw
    8. allow=g723
    9. allow=g729
    10. dtmfmode=rfc2833
    11. [1000](common)
    12. username=1000
    13. secret=1000
    14. [1001](common)
    15. username=1001
    16. secret=1001
    17. [1002](common)
    18. username=1002
    19. secret=1002
    20. [1003](common)
    21. username=1003
    22. secret=1003
    23. [1004](common)
    24. username=1004
    25. secret=1004
Above we have created 5 extensions that can be used any sip client (xlite,cisco sip phone, ATA). All users will get registered. If it does not work then check out the firwall settings. Please disable those settings until setup is completed.

Creating First Dialplan:

No extension can talk to each other unless we configure its dial plan. We have to open extension.conf (/etc/asterisk/extension.conf). Add the following lines: [internal] exten=> _XXXX,1,Dial(SIP/${EXTEN}) Now all configured phones can talk. This makes asterisk a simple platform in PBX; not many skills are required to develop an office PBX.

Creating First SIP Trunk:

Asterisk can make outbound and inbound calls, for outbound we require a provider to terminate our calls and to get calls routed to our system so for that we need a public IP.

Add following code to sip.conf:

    1. [trunk]
    2. type=friend
    3. context=internal
    4. host=
    5. disallow=all
    6. allow=ulaw
    7. allow=alaw
    8. allow=g723
    9. allow=g729
    10. dtmfmode=rfc2833
    11. After the update our sip.conf looks as follows:
    12. [common](!) ; this is template.
    13. type=friend
    14. context=internal
    15. host=dynamic
    16. disallow=all
    17. allow=ulaw
    18. allow=alaw
    19. allow=g723
    20. allow=g729
    21. dtmfmode=rfc2833
    22. [1000](common)
    23. username=1000
    24. secret=1000
    25. [1001](common)
    26. username=1001
    27. secret=1001
    28. [1002](common)
    29. username=1002
    30. secret=1002
    31. [1003](common)
    32. username=1003
    33. secret=1003
    34. [1004](common)
    35. username=1004
    36. secret=1004
    37. [trunk]
    38. type=friend
    39. context=internal
    40. host=
    41. disallow=all
    42. allow=ulaw
    43. allow=alaw
    44. allow=g723
    45. allow=g729
    46. dtmfmode=rfc2833
    47. Now you have to add one line to extension.conf:
    48. exten => _XXXXXXX.,1,Dial(SIP/trunk1/${EXTEN})
    49. So our extension.conf looks like:
    50. [internal]
    51. exten=> _XXXX,1,Dial(SIP/${EXTEN})
    52. exten => _XXXXXXX.,1,Dial(SIP/trunk1/${EXTEN})
With the above settings it is simple to create an IP-PBX with outbound trunk.

Related Post

FreeSwitch

The Future Prospect of Telephony Freeswitch is an open- standards VoIP telecom platform. It can be…

Read More

OpenSip

Opensips is one of the best solution that are present in opensource, it provide you ITSP…

Read More

Kamailio

Kamailio (successor of OpenSER and SER) is an Open Source SIP Server released under GPL, able…

Read More

Installation

Asterisk is one of the best telephony solutions which is free to use. There are others…

Read More

IVR Setting

Interactive Voice Response (IVR) allows your organizations to interact with customers through voice and DTMF tones…

Read More

Open Source

Elastix Elastix is appliance server software that integrates the most effective tools available for Asterisk-based PBXs…

Read More

MySql

Currently we are doing replication between two servers i.e. VPN3 and VPN4. Our project needed persistent…

Read More

Apache

Apache HTTP Server is an open-source HTTP server to develop and maintain modern operating systems including…

Read More

Subversion

Subversion is a open-source version control tool. It is open-source and distributed as free software over…

Read More

Copyright © 2016 GVenture Technology Pvt. Ltd., All Rights Reserved.