The problem with these instructions are that they only describe setting up one line and the configurations are a bit cryptic. To help any others out there here are my example instructions for multiple sip registrations using BraodVoice and Asterisk.
You will need a register line for each BroadVoice line:
register => 5555551234@sip.broadvoice.com:mysecret:5555551234@line1-broadvoice/5555551234
register => 5555551235@sip.broadvoice.com:mysecret:5555551235@line2-broadvoice/5555551235
Then you need an entry for each peer:
[line1-broadvoice]
authname=5555551234
canreinvite=no
context=line1
dtmf=inband
dtmfmode=inband
fromdomain=sip.broadvoice.com
fromuser=5555551234
host=sip.broadvoice.com
insecure=very
qualify=yes
secret=mysecret
type=peer
user=phone
username=5555551234
[line2-broadvoice]
authname=5555551235
canreinvite=no
context=line2
dtmf=inband
dtmfmode=inband
fromdomain=sip.broadvoice.com
fromuser=5555551235
host=sip.broadvoice.com
insecure=very
qualify=yes
secret=mysecret
type=peer
user=phone
username=5555551235
Once you have that setup you can now need to setup the contexts in extensions.conf:
[line1]
include => line1out
exten => 5555551234,1,Macro(stdexten,${EXTEN},SIP/${EXTEN})
[line1out]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}}@line1-broadvoice,30)
exten => _1NXXNXXXXXX,2,Congestion()
exten => _1NXXNXXXXXX,102,Busy()
exten => _011.,1,Dial(SIP/${EXTEN}@line1-broadvoice,30)
exten => _011.,2,Congestion()
exten => _011.,102,Busy()
[line2]
include => line2out
exten => 5555551235,1,Macro(stdexten,${EXTEN},SIP/${EXTEN})
[line2out]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}}@line1-broadvoice,30)
exten => _1NXXNXXXXXX,2,Congestion()
exten => _1NXXNXXXXXX,102,Busy()
exten => _011.,1,Dial(SIP/${EXTEN}@line1-broadvoice,30)
exten => _011.,2,Congestion()
exten => _011.,102,Busy()
These are greatly simplified, but they should help anyone else wanting to use multiple lines and wasn't sure of the syntax. These are all working on an Asterisk 1.2.1 system running on my favorite OS FreeBSD!
Technorati Tags: voip

0 comments:
Post a Comment