Asterisk - executing agi script if call is not answerd?

為{幸葍}努か 提交于 2019-12-10 17:11:27

问题


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()

my .call file look like this

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

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?


回答1:


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

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

Create context

[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.



来源:https://stackoverflow.com/questions/17592250/asterisk-executing-agi-script-if-call-is-not-answerd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!