挂机后的 Asterisk IVR

标签 asterisk pbx freepbx elastix

我想在调用号码挂断后将调用者重定向到 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 命令后运行。

提前致谢。

最佳答案

“core show application Dial”指出:

    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' 是一个扩展名,而不是一个优先级

关于挂机后的 Asterisk IVR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34960506/

相关文章:

asterisk - 使用 MixMonitor 在 Asterisk 中进行通话录音

asterisk - Asterisk 中的自定义 IVR 操作

voip - FusionPBX 外部 SIP 配置文件配置无效

Asterisk 拨号方案 : How to detect when a call has been successfully answered?

Freepbx:以编程方式添加扩展

ios - 如何在使用 pjsip 来电时唤醒 iOS 应用程序

node.js - Nodejs 与 Asterisk 的工作

mysql - Asterisk 从数据库中读出值

asterisk - 从分机发起调用

audio - Asterisk - 将插件写入 "catch"语音流