Skip to main content

How To Install Asterisk For Your First PBX Solution

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.

Installation of asterisk server:

Pre-requites for asterisk installation:

Asterisk requires a system running with kernel 2.6 and the header files must be present to compile asterisk on our system. Asterisk is written in c; we require gcc with the supporting libs 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 all files:

  1. Zaptel
  2. libpri
  3. asterisk
  4. asterisk-sounds
  5. asterisk-addones

Installation of asterisk:

Copy all the files to you server (I'm assuming you have copied all files to /usr/src/).
31 Steps for installing asterisk on your 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 installed a new asterisk server on our system.

Creating first sip extension:

Please add the following lines to sip.conf (/etc/asterisk/sip.conf):
[common](!) ; this is template.
type=friend
context=internal
host=dynamic
disallow=all
allow=ulaw
allow=alaw
allow=g723
allow=g729
dtmfmode=rfc2833
 
[1000](common)
username=1000
secret=1000
 
[1001](common)
username=1001
secret=1001
 
[1002](common)
username=1002
secret=1002
 
[1003](common)
username=1003
secret=1003
 
[1004](common)
username=1004
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:
[trunk]
type=friend
context=internal
host=<providers IP>
disallow=all
allow=ulaw
allow=alaw
allow=g723
allow=g729
dtmfmode=rfc2833
After the update our sip.conf looks as follows:
[common](!) ; this is template.
type=friend
context=internal
host=dynamic
disallow=all
allow=ulaw
allow=alaw
allow=g723
allow=g729
dtmfmode=rfc2833
 
[1000](common)
username=1000
secret=1000
 
[1001](common)
username=1001
secret=1001
 
[1002](common)
username=1002
secret=1002
 
[1003](common)
username=1003
secret=1003
 
[1004](common)
username=1004
secret=1004
 
[trunk]
type=friend
context=internal
host=<providers IP>
disallow=all
allow=ulaw
allow=alaw
allow=g723
allow=g729
dtmfmode=rfc2833
Now you have to add one line to extension.conf:
exten => _XXXXXXX.,1,Dial(SIP/trunk1/${EXTEN})
So our extension.conf looks like:
[internal]
exten=> _XXXX,1,Dial(SIP/${EXTEN})
exten => _XXXXXXX.,1,Dial(SIP/trunk1/${EXTEN})
With the above settings it is simple to create an IP-PBX with outbound trunk.
For any queries write us: skype: manhatel
For More….
www.manhatel.com


Comments

Popular posts from this blog

Best web design tips for beginners

Web outline traps are utilized by Professional web creators; to make compelling site page plans however above all to hotshot lovely code. A web planner's occupation is to create pages that impart viable configuration, while additionally exhibiting information of html and CSS. Web creators can use a mixed bag of web configuration traps there are huge amounts of outline related assets accessible for nothing to planners, visual originators or anybody looking for information of making or finding out about site outline traps. Expert web architects, for example, Molly, Lynda, and Eric Meyer, regularly have writes or have composed books, committed to helping other people figure out how to make web configuration traps. I have discovered an incredible rundown of web configuration traps & assets and have recorded them on my site, you can look at the article it's called "Valuable sites that offer free web outline tips & traps" I have additionally included in this ar...

Hyper-V Virtual Dedicated Server Vs Shared Hosting

Hyper-V Virtual dedicated server has numerous points of interest over Shared Hosting . On account of Hyper-V virtual devoted server facilitating , we find that a server is split into independent virtual substances. Each of these substances goes about as a server free of one another. Each Virtual committed server has its own particular one of a kind domain with plate space, data transfer capacity, applications, the web server , programming and other related instruments. Hyper-V virtual committed server puts the customer at an awesome point of interest, the reasons being that if any of the other virtual devoted servers on the same physical server get to be adulterated, it has truly no influence on your server. The consequence of this is your information and sites are protected. Shared facilitating then again gives administrations which are extremely not at all like Hyper-V virtual committed servers. You have a wide range of shared facilitating records having the same physical ...

Is It a Sage Decision to Lease a Dedicated Server?

With a specific end goal to touch the apex of progress, it is basic to actualize right methodologies, instruments, and systems that supplement your business fame. Trust me; there is no alternate way to achievement. Absence of part or frail consistence stratum is sufficiently adequate to foment your business standing, or bring up a major issue mark on your believability. For the very reason, diving on the online temporary fad has turned into a genuine requirement for each association. It offers numerous advantages, which customary stages don't. These online prerequisites are basically cooked by an extensive variety of web facilitating choices, for example, shared server, committed server, VPS, and cloud server facilitating. Despite the fact that every one of the arrangements offers same usefulness, they can be separated on the premise of burden bearing abilities, controlling limits offered to the customers, and figuring assets. Since Confidential or Serious Data Dema...