I want to execute an AGI script for calling party after called party hangs up. For example, for doing a survey for customers I am going to run an AGI script after agent hangs up. Unfortunately, when AGI scripts runs the agi debug output says: "511: The command cannot be executed on a dead channel" I use commands like "ANSWER" or "STREAM FILE" in my agi script which need a channel to run on. I know that calling channel hangs up as soon as called party hangs up. I tried DeadAGI instead of AGI and also "g" option in dial command but none of them works. So, I think I have to search for a solution that keep the calling channel up so that I can run my script on that. Any suggestion please?
问问题
2283 次
2 回答
0
最后我找到了答案。问题是我们不必在 h 扩展名中执行 agi 脚本,否则我们会在 agi 中的 answer 或 streamfile 等某些函数中得到错误。我们必须在 h 扩展之前将呼叫重定向到某个扩展,为此在 elastix 中我必须更改 extensions.conf。
于 2016-03-02T12:31:37.533 回答
0
在这种情况下,您不应该使用“g”参数,因为它是 CALLER 挂断。你应该使用“F”
F([[context^]exten^]priority): When the caller hangs up, transfer
the *called* party to the specified destination and *start* execution
at that location.
NOTE: Any channel variables you want the called channel to inherit
from the caller channel must be prefixed with one or two underbars ('_').
F: When the caller hangs up, transfer the *called* party to the next
priority of the current extension and *start* execution at that location.
NOTE: Any channel variables you want the called channel to inherit
from the caller channel must be prefixed with one or two underbars ('_').
NOTE: Using this option from a Macro() or GoSub() might not make
sense as there would be no return points.
g: Proceed with dialplan execution at the next priority in the current
extension if the destination channel hangs up.
于 2016-03-02T04:29:15.817 回答