[Amportal-devel] running script after call is hung up

That is easy. Just copy macro-hangupcall into extensions_custom.conf. Then add the call to your AGI script using DeadAGI() - remember, not all channel variables are still around. I do this all them time, here is an example of my modified macro. Note - by putting it in _custom.conf, it will override what is in extensions.conf as Asterisk uses the first copy of a context it encounters so you don’t have to edit extensions.conf and id doesn’t get blasted during upgrades.


exten => s,1,ResetCDR(w)
exten => s,n,NoCDR()
exten => s,n,GotoIf($["${OUT_${DIAL_TRUNK}}" = “IAX2/voipjet”]?voip)
exten => s,n,GotoIf($["${OUT_${DIAL_TRUNK}}" = “IAX2/voxee”]?vox:finished)
exten => s,n(vox),DeadAGI(custom/checkvoxee.php)
exten => s,n,Goto(finished)
exten => s,n(voip),DeadAGI(custom/checkvoipjet.php)
exten => s,n(finished),Wait(5)
exten => s,n,Hangup

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Post generated using Mail2Forum (http://www.mail2forum.com)

Thanks for your reply.

I have two test phones in a queue. If the call is not picked up by the first in the queue then the macro-hangupcall is run.
And then the caller is sent to the next agent in the queue.

Is there a way to have the macro-hangupcall run after the agent has picked up the call and hangs up ?