asterisk - 通过中继拨出(呼出路由配置)

前情提要:
假定本机IP为:192.168.2.133
注册中继的IP为:192.168.2.113
注册账号:1999
注册密码:Aa111111

pjsip.conf

[trunk-registered](!)
type=registration
retry_interval=60

[trunk-auth](!)
type=auth
auth_type=userpass

[trunk-aor](!)
type=aor

[trunk-endpoint](!)
type=endpoint
context=from-internal
disallow=all
allow=ulaw
allow=alaw
allow=g729

[trunk-identify](!)
type=identify

[1001](endpoint_internal)
auth=1001
aors=1001
outbound_auth=1001
[1001](auth_userpass)
password=1001 ; put a strong, unique password here instead
username=1001
[1001](aor_dynamic)

[1002](endpoint_internal)
auth=1002
aors=1002
[1002](auth_userpass)
password=1002 ; put a strong, unique password here instead
username=1002
[1002](aor_dynamic)

[mytrunk](trunk-endpoint)
outbound_auth=mytrunk
server_uri=sip:1999@192.168.2.113:5060
client_uri=sip:1999@192.168.2.133:5060
contanct_user=1999
[mytrunk](trunk-auth)
password=Aa111111
username=1999
[mytrunk](trunk-aor)
contact=sip:192.168.2.113:5060
[mytrunk](trunk-endpoint)
outbound_auth=mytrunk
aors=mytrunk
from_user=1999
[mytrunk](trunk-identify)
endpoint=mytrunk
match=192.168.2.113


extensions.conf

exten => _9X.,1,Dial(PJSIP/${EXTEN:1}@mytrunk,20)
        same => n,Hangup

你可能感兴趣的:(asterisk)