[Asterisk-Dev] Module detect hangup?

Matthew Boehm mboehm at cytelcom.com
Fri Sep 3 20:00:04 MST 2004


I am writing a module that is writing info to mysql. The problem that I am
forseeing is that what happens when a caller calls in, they enter some
digits as their 'login' which updates a 'loggedin' column. The module then
gets more info, sound files are played back, the loggedin column is updated
to a 'logged out' status and the module hangs up the call.

What happens if the person hangs up (or call dropped) in the middle of this
linear sequence?

How can the module "catch" or be notified that the person hungup (or the
call somehow dissappeard) so that I can preform some database cleanup (like
logging them out)?

It seems to me (from what I observe of notice and warning logs) is that if a
person hangs up inside a module then the module instance that was running
just dies.

Is this true? Is there no way to clean up a dropped call?

Thanks,
Matthew




More information about the asterisk-dev mailing list