Running agi script if call doesn't answer?

Here is the CH1 context that I want to call from the .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 is as follows

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

So my problem is that if someone does not answer the call, my AGI script will not be executed, so is there a way to execute my AGI script if the call does not answer after 3 attempts?

+4
source share
1 answer

In no case do this for 3 attempts. But it’s possible for every attempt.

In the call file change channel in 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 DO NOT recommend creating a kit if you are not a guru in an asterisk. Use open source mechanisms. It has REAL highlighting problems you never think about.

+2
source

Source: https://habr.com/ru/post/1490885/


All Articles