返回列表 發帖

一個asterisk裡放多個2b號碼問題

剛剛試在同一台asterisk裡放了多個2b號碼...
但是打入的時候不知是否設定錯了甚麼...總是沒有認到對應號碼的dialplan...

如果以下的設定的話...361AAAAA是可以打入的...

但是BBBBB會顯示:
[Mar 12 13:49:21] NOTICE[6244]: chan_sip.c:21358 handle_request_invite: Call from '361AAAAAhk' to extension '361BBBBB' rejected because extension not found in context 'DLPN_IC_DialPlan'.


sip.conf
  1. register => 361AAAAAhk:password@s2hkbntel.net:5060/361AAAAA

  2. register => 361BBBBBhk:password@s2hkbntel.net:5060/361BBBBB

  3. [hkbn2b361AAAAA]
  4. type=peer
  5. ;type=friend
  6. nat=yes
  7. username=361AAAAAhk
  8. secret=password
  9. port=5060
  10. host=s2hkbntel.net
  11. fromuser=361AAAAAhk
  12. fromdomain=s2hkbntel.net
  13. canreinvite=no
  14. insecure=invite
  15. disallow=all
  16. allow=alaw
  17. allow=ulaw
  18. dtmfmode=auto
  19. context=DLPN_IC_DialPlan
  20. outboundproxy = 203.80.89.139
  21. quality = no

  22. [hkbn2b361BBBBB]
  23. type=peer
  24. nat=yes
  25. username=361BBBBBhk
  26. secret=password
  27. port=5060
  28. host=s2hkbntel.net
  29. fromuser=361BBBBBhk
  30. fromdomain=s2hkbntel.net
  31. canreinvite=no
  32. insecure=invite
  33. disallow=all
  34. allow=alaw
  35. allow=ulaw
  36. dtmfmode=auto
  37. context=DLPN_IC_DialPlan_BBBB
  38. outboundproxy = 203.80.89.139
  39. quality = no
複製代碼
extensions.conf
  1. [DLPN_IC_DialPlan]
  2. include = default
  3. include = local
  4. include = parkedcalls
  5. include = conferences
  6. include = ringgroups
  7. include = voicemenus
  8. include = queues
  9. include = voicemailgroups
  10. include = directory
  11. include = from-hkbn

  12. [DLPN_IC_DialPlan_BBBB]
  13. include = default
  14. include = local
  15. include = parkedcalls
  16. include = conferences
  17. include = ringgroups
  18. include = voicemenus
  19. include = queues
  20. include = voicemailgroups
  21. include = directory
  22. include = from-hkbn_BBBB

  23. [from-hkbn]
  24. exten => 361AAAAA,1,NoOp(Incoming call from 361AAAAA)
  25. exten => 361AAAAA,n,Answer()
  26. exten => 361AAAAA,n,Dial(SIP/AAAA,30,Ttr)

  27. [from-hkbn_BBBB]
  28. exten => 361BBBBB,1,NoOp(Incoming call from 361BBBBB)
  29. exten => 361BBBBB,n,Answer()
  30. exten => 361BBBBB,n,Dial(SIP/BBBB,30,Ttr)
複製代碼

Incoming call的話致電361BBBBB號碼好像總是用了361AAAAA的DialPlan...
是我設定錯誤了嗎?

TOP

回復 2# 電腦超人

哈哈!答案是无限个!!!

你的问题是,不能有多from-hkbn,应该只有一个。

TOP

噢...抱歉好像有點打錯了......
sip.conf那裡context應該一個是DLPN_IC_DialPlan,另一個是DLPN_IC_DialPlan_BBBB
然後兩個在extensions.conf裡分別include"from-hkbn"和"from-hkbn_BBBB"...

先修正一下......抱歉......

TOP

要同一个才可以,不能分开。

TOP

返回列表