Skip to main content

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.


Popular posts from this blog

Asterisk – CLI commands

Agent commands agent logoff  - Sets an agent offline agent show  - Show status of agents agent show online  - Show all online agents AGI commands agi dump html  - Dumps a list of AGI commands in HTML format agi exec  - Add AGI command to a channel in Async AGI agi set debug [on|off]  - Enable/Disable AGI debugging agi show commands [topic]  - List AGI commands or specific help dnsmgr refresh  - Performs an immediate refresh dnsmgr reload  - Reloads the DNS manager configuration dnsmgr status  - Display the DNS manager status Calendar commands calendar dump sched  - Dump calendar sched context calendar show calendar  - Display information about a calendar calendar show calendars  - Show registered calendars Channel commands channel originate  - Originate a call channel redirect  - Redirect a call channel request hangup  - Request a hangup on a given channel Cli commands cli check permissions  - Try a permissions config for a user cli reload permi

Step by step: Configure call recording - Asterisk tutorials

This article will cover enabling asterisk to record calls. You may want this to interview people over the phone, podcast, or some other purpose. In features.conf, under: [featuremap] uncomment the line that looks like this: automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor — Make sure to set the X and/or x option in the Dial() or    Queue() app call! Then, enable the X option for Dial() in your dialplan in extensions.conf: PLEASE NOTE:  change you need to make – add the X  your dial rule make look different with me. exten => s,n,Dial(SIP/100,60) make it this instead: exten => s,n,Dial(SIP/100,60,X) The X is what tells Asterisk to allow callers to dial *3 during a call to enable or disable recording. From the asterisk console (run asterisk -r), you should see a line like this appear when the user starts a recording: – User hit ‘*3′ to record call. filename: auto-xxxxx-EXTENSION-DIALEDNUMBER When the recording ends, un

Making video calls – Asterisk tutorial

sip.conf To be able to send video during a call, codec h263 and video support must be enabled. This is done by adding three lines in the sip.conf file (Location: /etc/asterisk/sip.conf). Add the following lines in the [general] tab of the file. videosupport = yes ; Enable video allow = h263 ; H.263 is our video codec allow = h263p ; H.263p is the enhanced video codec Reload Reload the sip.conf file by running the following command in the CLI console:  reload Config in Softphone  Click “Softphone”  Click “Preferences”    Click “Video Codecs”  Verify that h263 and h263+ are selected Click “OK”  Click the video (Webcam) icon to display the video  Dial the other sip phone (number 1002)  Click “Show Video” on the two sip phones.