星号 - 如果未接听电话,则执行 agi 脚本? [英] Asterisk - executing agi script if call is not answerd?

查看:30
本文介绍了星号 - 如果未接听电话,则执行 agi 脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我想从 .call 文件调用的上下文 CH1

Here is context CH1 which i want to call from .call file

[CH1]
exten=>9367,1,Playback(welcome);
same =>  n,Agi(agi://localhost/openlock.agi)
same =>  n,Background(CH1_WAVE1)
same =>  n,Hangup()

我的 .call 文件看起来像这样

my .call file look like this

Channel: DAHDI/1/somemumber
CallerID:xyz
MaxRetries: 3
RetryTime: 40
WaitTime: 25
Context:CH1
Extension: 9367
Priority: 1

所以我的问题是,如果一个人不接听电话,我的 AGI 脚本将无法执行,那么如果在 3 次重试后没有接听电话,有没有办法执行我的 AGI 脚本?

So my problem is this if one does not answer the call, my AGI script will not get execute, so is there any way to execute my AGI script if the call is not answered after 3 retries?

推荐答案

3 次重试不行.但每次重试都可以这样做.

No way do it for 3 retries. But posible do for each retry.

在通话文件中将频道更改为 Local/somenumber@dialout/n

In call file change channel to Local/somenumber@dialout/n

创建上下文

[dialout]
exten => _X.,1,Dial(DAHDI/1/${EXTEN},,g)
exten => _X.,2,Goto(${DIALSTATUS},1)
exten => BUSY,1,AGI(busy.agi)
exten => CONGESTION,1,AGI(fail.agi)
exten => FAILED,1,AGI(fail.agi)
exten => NOANSWER,1,AGI(noanaswer.agi)

此外,如果您不是星号中的大师,我强烈不建议您创建拨号.使用开源引擎.它确实有很多你从未想过的问题.

Also i higly NOT recomend create dialling if you are not guru in asterisk. Use opensource engines. It have REALY allot of issues you never think about.

这篇关于星号 - 如果未接听电话,则执行 agi 脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆