Wednesday, November 5, 2014

how to setup VoIP server, asterisk

1- install asterisk
root@voip-server# apt-get install asterisk

2- create sip account by adding the following line to /etc/asterisk/sip.conf



3- create dialplan extentions by adding the following line to /etc/asterisk/extensions.conf  (to call user1 use extension 6001 and extention 6002 to call user2)


4- use asterisk commandline to verify configuration

root@voip-server:/etc/asterisk# asterisk -r -c
Asterisk, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
[ Booting...
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
Connected to Asterisk currently running on deb1-cln-voip2 (pid = 10425)
voip-server*CLI>  sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status    
user1/user1                                 D   N             5060     Unmonitored
user2/user2                                  D   N             5060     Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
voip-server*CLI>  dialplan show inside-context
[ Context 'inside-context' created by 'pbx_config' ]
  '6001' =>         1. Dial(SIP/user1,20)                         [pbx_config]
  '6002' =>         1. Dial(SIP/user2,20)                         [pbx_config]

-= 2 extensions (2 priorities) in 1 context. =-

4- client configuration example using microsip

5- testing calling

No comments:

Post a Comment