Thursday, April 28, 2011

Asterisk Notes

Simple call file contents

Channel: Local@s/default
Callerid: 911
Extension: 12345

Then move the file to /var/spool/asterisk/outgoing (not by copying it) to make a call to default channel.

Creating an extension

exten => 12345,1,Answer()
exten => 12345,n,Wait(0.5)
exten => 12345,n,AGI(demo)
exten => 12345,n,Hangup()

This will create extension number 12345 at default channel, when dialled it will excecute an AGI file.

Connect to a SIP account

Edit /etc/asterisk/sip.conf and enter the registration information. For this example, I will add SIP server with extension 12345 to be dialled when the extension is called, remember that 12345 must be already defined.

register => username:password@

SIP server

First create the SIP account, in this example account will use user extension context.


then register it.

register => sip_user:1234@