sip.confRename 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:
[general] 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 = 0.0.0.0 ; IP address to bind to (0.0.0.0 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. canreinvite=no nat=yes //////////////////////////////// Create SIP account  type=friend context=incoming defaultuser=100 secret=100 host=dynamic callerid="Phone1"  type=friend context=incoming defaultuser=101 secret=101 host=dynamic callerid="Phone2"
extensions.confThe 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:
[general] ; ; 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. static=yes ; ; if static=yes and writeprotect=no, you can save dialplan by ; CLI command 'save dialplan' too ; writeprotect=yes ; ; 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). ; autofallthrough=yes ; ; If clearglobalvars is set, global variables will be cleared ; and reparsed on an extensions reload, or Asterisk reload. ; clearglobalvars=no ; ; 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. ; priorityjumping=yes ; ;[globals] ; [incoming] 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
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: http://asteriskvoipsystem.org/downloads/X-Lite.exe
X-Lite (First computer -Linux)http://asteriskvoipsystem.org/downloads/X-Lite_Install.tar.gz Configuration xlite:
- 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
- CallMake a call with sip phone1 (number 100) and dial number 101 Make a call with sip phone2 (number 101) and dial number 100
- Don't forget to open SIP UDP 5060 ports in both computer firewalls.