I'm using the module successfully except for callbacks. I need to setup
a callback to catch hangups and run some cleanup routines. I've read
the docs and some example code, none of which I can get to work(the
callback seems to never be called).
$AGI = new Asterisk::AGI;
$AGI->setcallback(\&hangup_callback);
my %input = $AGI->ReadParse();
....some code here.....
sub hangup_callback {
my ($returncode) = @_;
unlink "$uniqid.wav";
print STDERR "MYCALLBACK: User Hungup ($returncode)\n";
exit($returncode);
}
Any idea what I'm doing wrong?
--
Matthew Gregg <[EMAIL PROTECTED]>