SIP Trunk from another Asterisk server
假如有两个Asterisk Servers, Asterisk A and B. Asterisk A有很多资源给Asterisk B拨打。那么我们在Asterisk A建立一个SIP account。
Asterisk A (hostname: server_A.abc.org)
sip.conf- [2403]
- type=friend
- username=2403
- secret=2403_password
- qualify=yes
- nat=yes
- host=dynamic
- canreinvite=no
- disallow=all
- allow=ulaw,alaw,gsm
- context=internal
複製代碼 Asterisk B side
sip.conf- [general]
- disallow=all
- allow=ulaw,alaw,gsm
- nat=yes
- canreinvite=no
- qualify=yes
- context=fron-desk
- register => 2403:2403_password@server_A.abc.org/from-2403
- [6001]
- type=friend
- secret=6001_password
- host=dynamic
- context=internal
- [6002]
- type=friend
- secret=6002_password
- host=dynamic
- context=internal
- [serva-A]
- type=friend
- username=2403
- secret=2403_password
- host=serva_A.abc.org
- insecure=port,invite
- context=from-server-A
複製代碼 extensions.conf- [to-server-A]
- exten => _7.,1,Dial(SIP/server-A/${EXTEN:1},,)
- [internal]
- include => to-server-A
- exten => 6001,1,Dial(SIP/6001,,r)
- exten => 6002,1,Dial(SIP/6002,,r)
- [from-server-A]
- from-2403,1,Dial(SIP/6002,,)
複製代碼 角色 |