Asterisk - executing agi script if call is not answerd? -


here context ch1 want call .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 this

channel: dahdi/1/somemumber callerid:xyz maxretries: 3 retrytime: 40 waittime: 25 context:ch1 extension: 9367 priority: 1 

so problem if 1 not answer call, agi script not execute, there way execute agi script if call not answered after 3 retries?

no way 3 retries. posible each retry.

in call file change channel 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 higly not recomend create dialling if not guru in asterisk. use opensource engines. have realy allot of issues never think about.


Comments