一、增加sip账号
sip.conf
[9908]
type = friend
host = dynamic
nat = yes
language = cn
canreinvite=no
context = test1 //拨号规则
disallow = all
allow = ulaw
allow = ilbc
allow = gsm
allow = g723
allow = ulaw
username = 9908 //sip账号
secret = 9908 //密码
requirecalltoken = no
canreincite=no
dtmfmode=rfc2833
二、增加iax账号
iax.conf
[9906]
type = friend
host = dynamic
requirecalltoken=no
nat = yes
language=cn
canreinvite = no
context = test2
disallow = all
allow = ulaw
allow = gsm
allow = ilbc
allow = g726
allow = g729
username =9906
secret = 9906
三、增加拨号规则
extensions.conf
sip拨打给iax的规则
[test1]
exten => _X.,1,Set(CHANNEL(language)=cn)
exten => _X.,n,Dial(IAX/${EXTEN},40,Ttr)
exten => _X.,n,Hangup()
exten => t,1,Playback(/opt/IVRnew/IVR/hangup)
exten => t,2,Hangup()
exten => T,1,Playback(/opt/IVRnew/IVR/hangup)
exten => T,2,Hangup()
exten => h,1,Playback(/opt/IVRnew/IVR/hangup)
exten => h,2,Hangup()
iax拨打给sip的规则
[test2]
exten => _X.,1,Set(CHANNEL(language)=cn)
exten => _X.,n,Dial(SIP/${EXTEN},40,Ttr)
exten => _X.,n,Hangup()
exten => t,1,Playback(/opt/IVRnew/IVR/hangup)
exten => t,2,Hangup()
exten => T,1,Playback(/opt/IVRnew/IVR/hangup)
exten => T,2,Hangup()
exten => h,1,Playback(/opt/IVRnew/IVR/hangup)
exten => h,2,Hangup()
阅读(2798) | 评论(0) | 转发(0) |