返回列表 發帖

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
  1. [2403]
  2. type=friend
  3. username=2403
  4. secret=2403_password
  5. qualify=yes
  6. nat=yes
  7. host=dynamic
  8. canreinvite=no
  9. disallow=all
  10. allow=ulaw,alaw,gsm
  11. context=internal
複製代碼
Asterisk B side

sip.conf
  1. [general]
  2. disallow=all
  3. allow=ulaw,alaw,gsm
  4. nat=yes
  5. canreinvite=no
  6. qualify=yes
  7. context=fron-desk

  8. register => 2403:2403_password@server_A.abc.org/from-2403

  9. [6001]
  10. type=friend
  11. secret=6001_password
  12. host=dynamic
  13. context=internal

  14. [6002]
  15. type=friend
  16. secret=6002_password
  17. host=dynamic
  18. context=internal

  19. [serva-A]
  20. type=friend
  21. username=2403
  22. secret=2403_password
  23. host=serva_A.abc.org
  24. insecure=port,invite
  25. context=from-server-A
複製代碼
extensions.conf
  1. [to-server-A]
  2. exten => _7.,1,Dial(SIP/server-A/${EXTEN:1},,)

  3. [internal]
  4. include => to-server-A

  5. exten => 6001,1,Dial(SIP/6001,,r)
  6. exten => 6002,1,Dial(SIP/6002,,r)

  7. [from-server-A]
  8. from-2403,1,Dial(SIP/6002,,)
複製代碼
角色

返回列表