Displaying 2 results from an estimated 2 matches for "myperl".
Did you mean:
my_perl
2007 Mar 01
2
How can I use the "GET VARIABLE variablename" in AGI
Hi,All,
I wang to use AGI in asterisk1.4.
AGI file / myperl.agi
#!/usr/bin/perl
use strict;
......
print STDERR "7. Testing GET VARIABLE...";
print "GET VARIABLE EXTEN \"\"\n";
my $result = <STDIN>;
&checkresult($result);
......
when the agi execute; asterisk conosle show that :
AGI Rx << GET VARIAB...
2004 Jan 31
0
Using an additional modem to get CallerID information
.....
#!/usr/bin/perl
$PortName = "/dev/ttyn00";
$PortObj = open(MODEM,$PortName) || die "Can't open $PortName: $!\n";
while (1==1) {
local $/ = "\n";
while ($line=<MODEM>) {
chomp;
if ($line =~ s/NMBR = //) {
open(OUTFILE, ">/usr/src/myperl/callerid.txt") or die "Can't open
callerid.txt: $!";
print OUTFILE "$line";
close OUTFILE;
};
}
}
depending on your setup, you'll need to amend the $portName variable to
point to the port that you've installed the modem on. You also may want t...