Asterisk Voip

Make a basic call


Rename the sip.conf file (Location: /etc/asterisk/sip.conf) to sip_old.conf for example. Create a new sip.conf empty file and insert the following lines into the file:
context = incoming        ; Default context for incoming calls 
allowguest = no        ; Allow or reject guest calls (default is yes, this can also be set to 'osp' 

bindport = 5060          ; UDP Port to bind to (SIP standard port is 5060) 
bindaddr =        ; IP address to bind to ( binds to all) 
srvlookup = yes          ; Enable DNS SRV lookups on outbound calls 
disallow = all        ; First disallow all codecs 
allow = ulaw        ; Allow codecs in order of preference 
allow = alaw 
allow = gsm 
dtmfmode = rfc2833        ; Set default dtmfmode for sending DTMF. 

Create SIP account



The second file to configure is the extensions.conf file (Location: /etc/asterisk/extensions.conf). Rename it to extensions_old.conf and create a new extensions.conf empty file. Insert the following lines into the file:
; If static is set to no, or omitted, then the pbx_config will rewrite 
; this file when extensions are modified.  Remember that all comments 
; made in the file will be lost when that happens. 
; if static=yes and writeprotect=no, you can save dialplan by 
; CLI command 'save dialplan' too 
; If autofallthrough is set, then if an extension runs out of 
; things to do, it will terminate the call with BUSY, CONGESTION 
; or HANGUP depending on Asterisk's best guess (strongly recommended). 
; If clearglobalvars is set, global variables will be cleared 
; and reparsed on an extensions reload, or Asterisk reload. 
; If priorityjumping is set to 'yes', then applications that support 
; 'jumping' to a different priority based on the result of their operations 
; will do so (this is backwards compatible behavior with pre-1.2 releases 
; of Asterisk). Individual applications can also be requested to do this 
; by passing a 'j' option in their arguments. 
exten => 100,1,Dial(SIP/100) 
exten => 100,2,Hangup() 
exten => 101,1,Dial(SIP/101) 
exten => 101,2,Hangup()

Reload the asterisk configuration:

Reload the asterisk configuration by running the following command in the CLI console: (Run "asterisk -r" to connect to the asterisk console)
  • core reload

Download Softphone

X-Lite (First computer - Windows)

Now, the basic installation is done. Download X-Lite (free sip phone) and install it. Download it by following this link:

X-Lite (First computer -Linux)   Configuration xlite: configuration xlite
xlite phone
Display name : frankc (or whatever you want) User name  : 100 password : 100 Author ....: 100 Domain: IP address of the asterisk server. Do the same with seconds xlite phone. After registration, the sip phone is now ready to make calls.
xlite phone
  1. RegistrationsIn a CLI console, run the following command: [root@]# sip show peers
    Name/username           Host                       Dyn Forcerport ACL Port     Status
    frankc/100              192.168.1.x                D   N              38116     xyz ms
    101/101                 192.168.1.y                D   N               5061     xyz ms
  2. CallMake a call with sip phone1 (number 100) and dial number 101 Make a call with sip phone2 (number 101) and dial number 100
  3. Don't forget to open SIP UDP 5060 ports in both computer firewalls.

Title Post: Make a basic call
5/5 5

: We on G+

Thanks for read this post.

Post a Comment

Return to top of page Copyright © 2013