3

我想在拨打的号码挂断后将呼叫者重定向到 IVR。我进行了研究,发现了一个叫做deadAGI但我无法让它工作的东西。你可以在下面找到我的extensions_custom.conf文件。

[from-internal-custom]
exten => 80,1,AGI(custom/agi.php)
exten => 80,2,MixMonitor(${FILE}.WAV)
exten => 80,3,Dial(SIP/custom/${NUMBER})
exten => 80,4,Hangup()
exten => h,1,deadAGI(custom/finish)

我的 AGI 文件是正确的,我敢肯定。我只需要在 hangup 命令后正确运行。

提前致谢。

4

4 回答 4

4

“核心显示应用程序拨号”状态:

    g: Proceed with dialplan execution at the next priority in the current
extension if the destination channel hangs up.

因此,将您的代码更改为:

[from-internal-custom]
exten => 80,1,AGI(custom/agi.php)
exten => 80,2,MixMonitor(${FILE}.WAV)
exten => 80,3,Dial(SIP/custom/${NUMBER},,g)
exten => 80,4,deadAGI(custom/finish)
exten => 80,5,Hangup()

如果你想运行你的脚本不管调用者或被调用者挂断:

e: Execute the 'h' extension for peer after the call ends

所以:

[from-internal-custom]
exten => 80,1,AGI(custom/agi.php)
exten => 80,2,MixMonitor(${FILE}.WAV)
exten => 80,3,Dial(SIP/custom/${NUMBER},,ge)
exten => 80,4,deadAGI(custom/finish)
exten => 80,5,Hangup()
exten => h,1,deadAGI(custom/finish)

你的想法几乎没问题。'h' 是扩展名,而不是优先级

于 2016-01-23T22:41:01.130 回答
0

请记住,无法在死频道上播放任何媒体,因此请保留您要播放 IVR 的频道。

于 2016-01-29T06:30:57.070 回答
0

如果您使用的是 FreePBX,并且在 FreePBX Gui 中定义了 IVR,则可以通过调用适当的拨号方案上下文来访问它,您可以在生成的 extensions.conf 中轻松找到它

exten => h,1,Goto(the_ivr_context,${EXTEN},1)

于 2016-01-23T19:01:45.460 回答
0

您不能在死通道上玩耍,星号线程将传递/转储所有与通道相关的变量/值 deadAGI 文件,以便我们记录调用的历史记录。

于 2016-01-29T06:34:46.307 回答