Asterisk Config – Attempt 1

My first attempt at configuring Asterisk has finally been a success. I have started out with the sample configurations and have then emptied and re-written extensions.conf and sip.conf to setup my SIP users and dialplan … I have the following:

sip.conf

[general]
context=default
port=5060
bindaddr=0.0.0.0
srvlookup=yes

[guest]
type=friend
host=dynamic
context=guest

[user1]
type=friend
secret=password
host=dynamic
context=internal

[user2]
type=friend
secret=password
host=dynamic
context=internal

extensions.conf

[default]
exten => s,1,Playback(tt-weasels)
exten => s,n,Hangup()
 
[guest]
exten => 0,1,Zapateller(nocallerid)
exten => 0,n,Answer()
exten => 0,n,Background(vm-enter-num-to-call)
exten => 0,n,WaitExten(30)
 
exten => 1,1,Playback(tt-monkeys)
exten => 1,n,Goto(guest,0,1))
 
exten => 2,1,Playback(tt-monkeys)
exten => 2,n,Goto(guest,0,1))
 
exten => i,1,Playback(tt-weasels)
exten => i,n,Goto(guest,0,1)
 
exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup()
 
[internal]
exten => 1013,1,Zapateller(nocallerid)
exten => 1013,n,Dial(SIP/user1)
exten => 1013,n,Playback(vm-nobodyavail)
exten => 1013,n,Hangup()
 
exten => 1005,1,Zapateller(nocallerid)
exten => 1005,n,Dial(SIP/user2)
exten => 1005,n,Playback(vm-nobodyavail)
exten => 1005,n,Hangup()

As with the install I am sure this may not be the best way to do things and I have a lot still to learn about configuring Asterisk.

What I would like to get working is ‘Device and User’ mode which is a concept that exists in TrixBox separating the services from the users. So that a user can sign into any hardphone or softphone and their extension will follow them regardless of the device. However this doesn’t seem to be a trivial task using pure Asterisk … if I get it working I’ll post up the config.

Enjoy

 

  • Facebook
  • Print
  • Twitter
  • email
  • del.icio.us
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • PDF
  • RSS
  • StumbleUpon

Comments are closed.