I know this is not a perl user list but it has to do with something I'm
trying to get working with Asterisk. I'm trying to create an AGI script
that can play all files in a directory. Hopefully get it to the point
where the user can hit '2' to continue and 'anyotherkey' to exit.
This is what I have so far.... Any ideas?

#!/usr/bin/perl

use Asterisk::AGI;

$AGI = new Asterisk::AGI;

my %input = $AGI->ReadParse();
my $directory = '/var/lib/asterisk/test';
my $file =0;

{
opendir(DIR, $directory) || die "can't opendir $directory: $!";
foreach grep {/^msg} readdir(DIR) $file="$message";

close DIR;
}
print "STREAM FILE $message";


I know it's sloppy I need serious perl lessons, can anyone give some
advice?


_______________________________________________
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