Running an app. after hangup?

Hi Guys…this is kinda a development thing, but only partially and I debated if this was the right place to ask this, but anyway, here we go.

What I am wanting to do is, when ever a call ends, internal, outbound, sip, IAX, pstn…it doesnt matter what type of call, I want to run a wee app or even prob. just a PHP script or something, that will do something custom for me that I will handle.

My question is, is there a conf file I can alter to specify to run this wee app. etc? OR is there another method I would need to employ?

THanks, Jeremy

copy macro-hangup to extensions_custom.conf. Then modify it to run what you need run. By putting it in extensions_custom.conf it will override the version in extensions.conf.

Thanks Philippe, I will take a look at that. p.s. did you see I made a fix for the custom-contexts too.


hmm…ok, I thought there was a command like APP() that ran an application as per what i want to do above.
Can I only use AGI to run an app/script? its no big deal, I just wanted confirmation.


you can use an agi (usually preferable) or you can use System() which will just run a Linux command.

Ok, thanks. I will prob. try both.