<pre>
#!/usr/bin/perl
use strict;
use Asterisk::AGI;
$|=1;
# Setup some variables
my %AGI; my $tests = 0; my $fail = 0; my $pass = 0;
my $astagi = new Asterisk::AGI;
while(<STDIN>) {
chomp;
last unless length($_);
if (/^agi_(\w+)\:\s+(.*)$/) {
$AGI{$1} = $2;
}
}
#$astagi->say_alpha($AGI{'callerid'});
#while( (my $name, my $value) = each %AGI ){
# $astagi->verbose("$name, $AGI{$name}");
#}
#
# Language Settings
#
$astagi->set_variable("CHANNEL(language)","ja");
</pre>