[Asterisk-Users] Problem with $AGI->record_file for CVS-HEAD-10/18/04

Darren Sessions dsessions at ionosphere.net
Thu Oct 21 08:00:37 MST 2004


When I execute the following AGI command in *, if the caller hangs up 
during the "record" - it fails to run the callback sub -BUT- during any 
other portion of the call, if the caller hangs up then it gets called 
just fine.

Here are some code excerpts:

use Asterisk::AGI;
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
$AGI->setcallback(\&mycallback);
...
$AGI->stream_file("beep");
$rc = $AGI->record_file("tmp_msgs/$sessionId", 'wav', '#*0', 70000, 1);
...
sub mycallback {
   my ($returncode) = @_;
   print STDERR "User Hungup ($returncode)\n";
   exit($returncode);
}

Like I said - worked before. I'm going to update to the latest CVS and 
see if that fixes it.

Any ideas would be appreciated.

Thanks,

  - Darren




More information about the asterisk-users mailing list