源自宏中的标签

  • 本文关键字:标签 macros asterisk
  • 更新时间 :
  • 英文 :


如何从宏中的标签发起调用?

我知道这是不对的,但我不确定如何将呼叫维京线路放入发起 cmd 中。

宏的最后两行包含我想要发生的代替"本地/callviking@..."的内容。

[macro-Paginator]
exten => s,1,Answer()
exten => s,n,System(asterisk -rx "channel originate Local/callviking@${MACRO_CONTEXT}/n extension ${ARG1}@soundeffects")
exten => s,n,Hangup()
exten => s,n(callviking),Dial(SIP/100,10,D(${ARG2}))
exten => s,n,Hangup()
[soundeffects]
exten => wakeupbell,1(wakeupbell),Answer()
same => n,Playback(custom/bells/daytimebell)
same => n,Hangup()

宏的调用方式如下:

[from-internal-custom]  ;freepbx custom context
exten => 23333,1,Macro(Paginator,angelusbell,1) ;Angelus Bell

这是一个有效的方法示例,除了我想将其转换为宏,以便我可以使用相同的例程和不同的 dtmf 音调 (arg2) 和声音文件 (arg1)

[AngelusBell]
exten => startbell,1,Answer()
exten => startbell,n, NoOp(Ringing-zee dee bell! ${CHANNEL} dialed: ${MACRO_EXTEN})
exten => startbell,n,System(asterisk -rx "channel originate Local/callviking@AngelusBell/n extension ting@soundeffects")
exten => startbell,n,Hangup()
exten => callviking,1,Dial(SIP/100,10,D(5))
exten => callviking,2,Hangup()

好吧,这将起作用,尽管它不是很优雅。 它不是一个宏,但至少它都在一个地方:

[from-internal-custom]  ;freepbx custom context
exten => 21005,1,Goto(Paginator,test,1)         ;Test Sound     via destination 2005 (is a custom-device-extension so as to be included as a Destination)

[Paginator]
exten => officebell,1,Answer()
exten => officebell,n,System(asterisk -rx "channel originate Local/callviking@${CONTEXT}/n extension ting@soundeffects")
exten => officebell,n,Hangup()
exten => startofficebell,1,Answer()
exten => startofficebell,n,System(asterisk -rx "channel originate Local/callviking1@${CONTEXT}/n extension ting@soundeffects")
exten => startofficebell,n,Hangup()
exten => angelusbell,1,Answer()
exten => angelusbell,n,System(asterisk -rx "channel originate Local/callviking1@${CONTEXT}/n extension ting@soundeffects")
exten => angelusbell,n,Hangup()
exten => test,1,Answer()
exten => test,n,System(asterisk -rx "channel originate Local/callviking1@${CONTEXT}/n extension ting@soundeffects")
exten => test,n,Hangup()
exten => callviking1,1,Dial(SIP/100,10,D(1))
exten => callviking1,n,Hangup()
exten => callviking5,1,Dial(SIP/100,10,D(5))
exten => callviking5,n,Hangup()
;------------------------------------------------------
[soundeffects]
exten => wakeupbell,1(wakeupbell),Answer()
same => n,Playback(custom/bells/daytimebell)
same => n,Hangup()

相关内容

  • 没有找到相关文章

最新更新