asterisk 能打电话的配置
若使用的是chan_sip.so模块,则在sip.conf里添加:
[10]
type=friend
;context=phones
context=public
host=dynamic
secret=12345678
[11]
type=friend
;context=phones
context=public
host=dynamic
secret=12345678
若使用的是chan_sip.so模块,则在extensions.conf里添加:
; hzh add,其中,只有10和11是用户名,其余的不用改变
exten => 10,1,Log(NOTICE,"10/hzh ACCOUNT")
exten => 10,n,Dial(SIP/10,120,Tt)
exten => 11,1,Log(NOTICE,"11/hzh ACCOUNT")
exten => 11,n,Dial(SIP/11,120,Tt)
===================
若使用的是chan_pjsip.so模块,则在pjsip.conf里添加:
[simpletrans] type=transport protocol=udp bind=0.0.0.0 [10] type = endpoint transport = simpletrans context = public disallow = allow = all aors = 10 auth = auth10 [10] type = aor max_contacts = 1 contact = sip:10@192.168.23.100:5060 [auth10] type=auth auth_type=userpass password=123456 username=10 [11] type = endpoint transport = simpletrans context = public disallow = allow = all aors = 11 auth = auth11 [11] type = aor max_contacts = 1 contact = sip:11@192.168.23.100:5060 [auth11] type=auth auth_type=userpass password=123456 username=11 [12] type = endpoint transport = simpletrans context = public disallow = allow = all aors = 12 auth = auth12 [12] type = aor max_contacts = 1 contact = sip:12@192.168.23.100:5060 [auth12] type=auth auth_type=userpass password=123456 username=12
若使用的是chan_pjsip.so模块,则在extensions.conf里添加(可以添加在demo里):
; hzh add,其中,只有10和11是用户名,其余的不用改变 exten => 10,1,Log(NOTICE,"10/hzh ACCOUNT") ;exten => 10,n,Dial(SIP/10,70,Tt) exten => 10,n,Dial(PJSIP/${EXTEN}) exten => 11,1,Log(NOTICE,"11/hzh ACCOUNT") ;exten => 11,n,Dial(SIP/11,70,Tt) exten => 11,n,Dial(PJSIP/${EXTEN}) exten => 12,1,Log(NOTICE,"12/hzh ACCOUNT") ;exten => 11,n,Dial(SIP/11,70,Tt) exten => 12,n,Dial(PJSIP/${EXTEN})
; 将exten 10 的状态与 PJSIP/10的用户联系起来,之间等同 exten => 10,hint,PJSIP/10 exten => 11,hint,PJSIP/11 exten => 12,hint,PJSIP/12
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
支付宝扫一扫捐赠
支付宝扫一扫捐赠
微信公众号: 共鸣圈
欢迎讨论,邮件: 924948$qq.com 请把$改成@
QQ群:263132197
QQ: 924948