R
Ramon F Herrera
Anyone familiar with the Asterisk open source PBX out there? Read
on...
An AGI (Asterisk Gateway Interface) Perl script is very similar to a
CGI Perl script. My problem is introduced by the code commented out
below. As soon as the code is executed, the rest of the script doesn't
work anymore because the prompt is either not payed or (most likely)
it is played nut I cannot hear it.
-Ramon
---------------------
#!/bin/perl -w
use Asterisk::AGI;
$|=1;
my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
sleep(1);
# while(<STDIN>) {
# chomp;
# last unless length($_);
# if (/^agi_(\w+)\:\s+(.*)$/) {
# $AGI{$1} = $2;
# }
# }
#
# $CallerID = $AGI{"agi_callerid"};
# $CallerIdName = $AGI{"agi_calleridname"};
$Welcome = "faxback/Welcome";
$enterFaxNumber = "faxback/EnterFaxNumber";
$Farewell = "faxback/Farewell";
$AGI->stream_file("$Welcome", "*");
$FaxNumber = $AGI->get_data($enterFaxNumber, "10000", "11");
on...
An AGI (Asterisk Gateway Interface) Perl script is very similar to a
CGI Perl script. My problem is introduced by the code commented out
below. As soon as the code is executed, the rest of the script doesn't
work anymore because the prompt is either not payed or (most likely)
it is played nut I cannot hear it.
-Ramon
---------------------
#!/bin/perl -w
use Asterisk::AGI;
$|=1;
my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
sleep(1);
# while(<STDIN>) {
# chomp;
# last unless length($_);
# if (/^agi_(\w+)\:\s+(.*)$/) {
# $AGI{$1} = $2;
# }
# }
#
# $CallerID = $AGI{"agi_callerid"};
# $CallerIdName = $AGI{"agi_calleridname"};
$Welcome = "faxback/Welcome";
$enterFaxNumber = "faxback/EnterFaxNumber";
$Farewell = "faxback/Farewell";
$AGI->stream_file("$Welcome", "*");
$FaxNumber = $AGI->get_data($enterFaxNumber, "10000", "11");