[Asterisk-Dev] AGI script - Hang up
James Golovich
james at wwnet.net
Tue Sep 16 10:32:49 MST 2003
On 16 Sep 2003, Areski wrote:
> Someone know if it's possible in an agi to run a function when the user
> hang up the phone.
Unfortunately when the call has hungup all AGI functions stop working.
If the call is in an AGI script you can detect the call hangup by checking
the return value of the AGI calls and take action based on that, but you
are unable to execute any AGI commands.
I tried modifying app_agi.c to allow the AGI commands to continue to
function but its not exactly trivial to do this. I was able to make *
continue to accept AGI commands after hangup, but I couldn't come up with
a good way to get * to stop servicing the AGI commands without some kind
of timeout.
James
More information about the asterisk-dev
mailing list