To deal with this problem, I've used DeadAGI in the h, t, and i events (as appropriate) to detect and call the script again.

As such:
exten => h,1,DeadAgi,perlscript.pl|${UNIQUEID}|hangup

I pass the word "hangup" as the second word to flag to the AGI script that this is a hangup event, not a normal one. I track the call using UNIQUEID so I can refer to it again after the call.

I have not tried any callback'ing.  This seems to work relatively well.

Nathan

I'm wondering if there is a way using AGI or the Perl AGI library to catch the event of a call drop or hangup so I create the MySQL row and properly close all database connections. I tried using the $AGI- >setcallback() and putting code in the referenced callback function but that doesn't seem to do it. Am I missing something?


--
-------------------------------------
Nathan E. Pralle
Give the Director a Serpent Deflector
www.nathanpralle.com
-------------------------------------
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to