[Asterisk-Users] agi and stream_file

Robert Boardman robb at boardman.me.uk
Sat Mar 27 15:34:36 MST 2004


Hi,
 I trying to get agi with perl  to stream a gsm file , and wait for a 
digit , the agi gets to the stream but doesn't play back, could some one 
explain how this works

 here is a snip it of code

open(DAT,">/etc/asterisk/1571.log") || die("Cannot Open File");


while( $sth->fetch() ) {
print DAT "in while loop\r\n";

$AGI->stream_file('demo-echotest','6');
print DAT "got past stream\r\n";

my $testfor = $AGI->say_number($clid, '36');
print DAT "got past say number\r\n";

 if ($testfor == 3) {
                $AGI->exec('Dial', 'Zap/1/$clid');
                exit;
                }
};
$AGI->hangup();
$sth->finish();
$dbh->disconnect();
close(DAT);


the Got past stream never gets printed to the log file
Any advice would be appreciated

Thanks
Robb



More information about the asterisk-users mailing list