返回列表 發帖
但是我给出的scripts是我根据ck的superdial macro,而我也没有什么更改就直接用。

TOP

回復 16# 角色


    好的,我試試

TOP

回復 13# orangelau

你在superdial macro 加入的你想打出的次聚就可以。

例子如下:
; dial-out via UK IP01
exten => _44.,1,Macro(superdial,SIP/ip01-sip/90${EXTEN:2},,m,,,1,,,,)
exten => _44.,n,Macro(superdial,IAX2/ip01-iax/90${EXTEN:2},,m,,,1,,,,)
exten => _44.,n,Hangup

TOP

回復 18# ckleea
Thanks,CK兄

TOP

回復 19# orangelau

客氣

TOP

回復 20# ckleea

是否在 extensions_marco.conf內加[macro-superdial]
exten=s,1,Set(GROUP()=${ARG5})
exten=s,2,Set(GROUPCOUNT=${GROUP_COUNT(${ARG5})})
exten=s,3,GotoIf($[${GROUPCOUNT} > ${ARG6}]?104)
exten=s,4,GotoIf($["${ARG7}" = ""]?macro-superdial,s,6)
exten=s,5,Set(CALLERID(name)=${ARG7})
exten=s,6,GotoIf($["${ARG8}" = ""]?macro-superdial,s,8)
exten=s,7,Set(CALLERID(number)=${ARG8})
exten=s,8,GotoIf($["${ARG9}" = ""]?macro-superdial,s,10)
exten=s,9,SetAccount(${ARG9})
exten=s,10,Dial(${ARG1},${ARG2},${ARG3},${ARG4})
exten=s,11,Goto(s-${DIALSTATUS},1)
exten=s,104,Goto(s-CHANUNAVAIL,1)
exten=s-BUSY,1,Noop
exten=s-NOANSWER,1,GotoIf($["${ARG10}" = ""]?macro-superdial,s-NOANSWER,3)
exten=s-NOANSWER,2,Voicemail(${ARG10})
exten=s-NOANSWER,3,Noop
exten=_s-.,1,Noop
exten=_9.,1,Macro(superdial,SIP/1060/852${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1062/1852${EXTEN:},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1088/2852${EXTEN:},,m,,,1,,,,)
exten=_9.,n,Hangup

TOP

我原本的extensions_marco.conf 應該有。

如果沒有的話,加回然後 reload

你留意你的syntax
line1 = 852XXXXXXXX
line2 = 91852XXXXXXXX
line3 = 92852XXXXXXXX
如果是正確,就ok

TOP

本帖最後由 orangelau 於 2014-5-20 14:50 編輯

回復 22# ckleea

試左唔得,會唔會係1060/1064/1088輸入錯誤,呢個位置應該入d咩?

exten=s,1,Set(GROUP()=${ARG5})
exten=s,2,Set(GROUPCOUNT=${GROUP_COUNT(${ARG5})})
exten=s,3,GotoIf($[${GROUPCOUNT} > ${ARG6}]?104)
exten=s,4,GotoIf($["${ARG7}" = ""]?macro-superdial,s,6)
exten=s,5,Set(CALLERID(name)=${ARG7})
exten=s,6,GotoIf($["${ARG8}" = ""]?macro-superdial,s,8)
exten=s,7,Set(CALLERID(number)=${ARG8})
exten=s,8,GotoIf($["${ARG9}" = ""]?macro-superdial,s,10)
exten=s,9,SetAccount(${ARG9})
exten=s,10,Dial(${ARG1},${ARG2},${ARG3},${ARG4})
exten=s,11,Goto(s-${DIALSTATUS},1)
exten=s,104,Goto(s-CHANUNAVAIL,1)
exten=s-BUSY,1,Noop
exten=s-NOANSWER,1,GotoIf($["${ARG10}" = ""]?macro-superdial,s-NOANSWER,3)
exten=s-NOANSWER,2,Voicemail(${ARG10})
exten=s-NOANSWER,3,Noop
exten=_s-.,1,Noop
exten=_9.,1,Macro(superdial,SIP/1060/853${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1062/1853${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1088/2853${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Hangup


syntax
line1 = 853XXXXXXXX
line2 = 1853XXXXXXXX
line3 = 2853XXXXXXXX
Screen Shot 2014-05-20 at 2.41.48 pm.jpg

TOP

Try this

exten=_9.,1,Macro(superdial,SIP/1060/**8${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1062/**8${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1088/**8${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Hangup

TOP

回復 24# ckleea

都係唔得,會否有其他要設定呢?

Screen Shot 2014-05-20 at 3.27.49 pm.jpg

TOP

你有問題。

請在extensions_macro.conf 加入
  1. [macro-superdial]
  2. ; add some abilities to Dial(Technology/resource[&Technology2/resource2...][|timeout][|options][|URL]):
  3. ;       ${ARG1} - Technology/resource[&Technology2/resource2...] (like SIP/2201)
  4. ;       ${ARG2} - timeout in seconds
  5. ;       ${ARG3} - Dial command options
  6. ;       ${ARG4} - URL (see Dial command for info)
  7. ;       ${ARG5} - Group name (used if you want to limit the number of calls in any way)
  8. ;       ${ARG6} - Max. group number (maximum number of concurrent calls you want to allow for that group)
  9. ;       ${ARG7} - Caller ID name (typically for outgoing calls only)
  10. ;       ${ARG8} - Caller ID number (typically for outgoing calls only)
  11. ;       ${ARG9} - CDR account name (over-rides account group setting in sip.conf or iax.conf)
  12. ;       ${ARG10} - voicemail to send to if noanswer (typically for incoming calls only)
  13. ; Usage instructions:
  14. ;       for an outgoing call, in extensions.conf you just list multiple lines like:
  15. ;               exten => s,1,Macro(superdial,IAX2/voipjet/${tfnumber},,,,voip,${MAXVOIPCALLS},yourname,8005551234,voipjet)
  16. ;               exten => s,2,Macro(superdial,IAX2/alpeh-com/${tfnumber},,,,voip,${MAXVOIPCALLS},yourname,8005551234,aleph)
  17. ;       and it will take the first one that is available
  18. ;
  19. ;       it also works for incoming like so ..
  20. ;               exten => s,1,Wait(2)
  21. ;               exten => s,2,Macro(superdial,${PHONE1},15,Ttm,,pstn,${MAXPSTNCALLS},${CALLERIDNAME},${CALLERIDNUM},pstn,u${GENERALVM})
  22. ;               exten => s,3,Macro(superdial,${PHONE1},15,Ttm,,pstn,${MAXPSTNCALLS},${CALLERIDNAME},${CALLERIDNUM},pstn,u${GENERALVM})
  23. ;               exten => s,4,Voicemail(b${GENERALVM})
  24. ;       and then goes to unavailable voicemail if one times out .. otherwise (eg if busy) it tries the next extension
  25. ;       if all are busy or unavailable .. it gets to the last priority which is the busy voicemail
  26. ;
  27. exten => s,1,Set(GROUP()=${ARG5})
  28. exten => s,2,Set(GROUPCOUNT=${GROUP_COUNT(${ARG5})})
  29. exten => s,3,GotoIf($[${GROUPCOUNT} > ${ARG6}]?104)
  30. exten => s,4,GotoIf($["${ARG7}" = ""]?macro-superdial,s,6)
  31. exten => s,5,Set(CALLERID(name)=${ARG7})        ; skip this if ARG7 is empty
  32. exten => s,6,GotoIf($["${ARG8}" = ""]?macro-superdial,s,8)
  33. exten => s,7,Set(CALLERID(number)=${ARG8})              ; skip this if ARG8 is empty
  34. exten => s,8,GotoIf($["${ARG9}" = ""]?macro-superdial,s,10)
  35. exten => s,9,SetAccount(${ARG9})        ; skip this if ARG9 is empty
  36. exten => s,10,Dial(${ARG1},${ARG2},${ARG3},${ARG4})
  37. exten => s,11,Goto(s-${DIALSTATUS},1)
  38. exten => s,104,Goto(s-CHANUNAVAIL,1)
  39. exten => s-BUSY,1,Noop
  40. exten => s-NOANSWER,1,GotoIf($["${ARG10}" = ""]?macro-superdial,s-NOANSWER,3)
  41. exten => s-NOANSWER,2,Voicemail(${ARG10})
  42. exten => s-NOANSWER,3,Noop
  43. exten => _s-.,1,Noop
複製代碼
然後有在 extensions.conf 加入你最後幾句dialplan
  1. exten=_9.,1,Macro(superdial,SIP/1060/852${EXTEN:1},,m,,,1,,,,)
  2. exten=_9.,n,Macro(superdial,SIP/1062/1852${EXTEN:},,m,,,1,,,,)
  3. exten=_9.,n,Macro(superdial,SIP/1088/2852${EXTEN:},,m,,,1,,,,)
  4. exten=_9.,n,Hangup
複製代碼
你的混淆咗。

TOP

記住reload

TOP

本帖最後由 orangelau 於 2014-5-20 16:30 編輯

回復 27# ckleea


reboot過都係唔得,我已經試過剷走原來既:
(1)extensions.conf裡面關於呢個既dialplan後,重新再加入去
(2)extensions_marco.conf裡面個既"macro-superdial後,重新再加入去

之後都試過將 853/1853/2853用**8取代,都係唔得

Screen Shot 2014-05-20 at 4.10.29 pm.jpg
Screen Shot 2014-05-20 at 4.10.15 pm.jpg

TOP

回復 27# ckleea


    剛試過用LOCAL取代SIP語法都係唔得

TOP

回復 16# 角色

回復 27# ckleea

終於搞掂,再次多謝 ck兄 及 角色兄 鼎力相助

要修改地方如下:

係 extensions.conf

[CallingRule_Macro_OBiPSTN]
exten=_9.,1,Macro(superdial,SIP/1060/**8${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1062/**8${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Macro(superdial,SIP/1088/**8${EXTEN:1},,m,,,1,,,,)
exten=_9.,n,Hangup

[DLPN_DialPlan1]
include=CallingRule_Dongle0
include=CallingRule_Comnet_HK
include=CallingRule_51dyt
include=CallingRule_Macro_OBiPSTN
include=default
include=parkedcalls
include=conferences
include=ringgroups
include=voicemenus
include=queues
include=voicemailgroups
include=directory
include=pagegroups
include=page_an_extension

係 extensions-macro.conf

[macro-superdial]
exten=s,1,Set(GROUP()=${ARG5})
exten=s,2,Set(GROUPCOUNT=${GROUP_COUNT(${ARG5})})
exten=s,3,GotoIf($[${GROUPCOUNT} > ${ARG6}]?104)
exten=s,4,GotoIf($["${ARG7}" = ""]?macro-superdial,s,6)
exten=s,5,Set(CALLERID(name)=${ARG7})
exten=s,6,GotoIf($["${ARG8}" = ""]?macro-superdial,s,8)
exten=s,7,Set(CALLERID(number)=${ARG8})
exten=s,8,GotoIf($["${ARG9}" = ""]?macro-superdial,s,10)
exten=s,9,SetAccount(${ARG9})
exten=s,10,Dial(${ARG1},${ARG2},${ARG3},${ARG4})
exten=s,11,Goto(s-${DIALSTATUS},1)
exten=s,104,Goto(s-CHANUNAVAIL,1)
exten=s-BUSY,1,Noop
exten=s-NOANSWER,1,GotoIf($["${ARG10}" = ""]?macro-superdial,s-NOANSWER,3)
exten=s-NOANSWER,2,Voicemail(${ARG10})
exten=s-NOANSWER,3,Noop
exten=_s-.,1,Noop

然後係 CLI : reload
                  sip reload
再reboot raspberry 即可

TOP

返回列表