SIP基本注册配置
extensions.conf配置
启动命令
/usr/sbin/asterisk –c
SIP基本注册配置
设置了两个用户,一个叫john,一个叫ben
[general]
context=default
srvlookup=yes
[john]
type=friend
secret=welcome
qualify=yes
nat=yes
host=dynamic
canreinvite=no
context=johncoming
[ben]
type=friend
secret=welcome
qualify=yes
nat=yes
host=dynamic
canreinvite=no
context=bencoming
extensions.conf配置
[johncoming]
exten=>7,1,Answer()
exten=>7,n,Background(/var/lib/asterisk/sounds/en/enter-num-blacklist)
exten=>1,1,Playback(/var/lib/asterisk/sounds/en/hello-world)
exten=>1,2.Goto(johncoming,7,1)
exten=>i,1,Playback(/var/lib/asterisk/sounds/en/goodbye)
exten=>i,2,Goto(johncoming,7,1)
exten=>t,1,Playback(/var/lib/asterisk/sounds/en/goodbye)
exten=>t,2,Hangup()
exten=>100,1,Dial(SIP/ben,10)
exten=>100,2,Playback(/var/lib/asterisk/sounds/en/vm-nobodyavail)
exten=>100,3,Hangup()
exten=>100,102,Playback(/var/lib/asterisk/sounds/en/call-fwd-on-busy)
exten=>100,103,Hangup()
[bencoming]
exten=>7,1,Answer()
exten=>7,2,Background(/var/lib/asterisk/sounds/en/enter-num-blacklist)
exten=>1,1,Playback(/var/lib/asterisk/sounds/en/hello-world)
exten=>1,2.Goto(bencoming,7,1)
exten=>i,1,Playback(/var/lib/asterisk/sounds/en/goodbye)
exten=>i,2,Goto(bencoming,7,1)
exten=>t,1,Playback(/var/lib/asterisk/sounds/en/goodbye)
exten=>t,2,Hangup()
exten=>200,1,Dial(SIP/john,10)
exten=>200,2,Playback(/var/lib/asterisk/sounds/en/vm-nobodyavail)
exten=>200,3,Hangup()
exten=>200,102,Playback(/var/lib/asterisk/sounds/en/call-fwd-on-busy)
exten=>200,103,Hangup()