[asterisk-users] AGI - calling functions, CHANNEL STATUS broken?
David Van Ginneken
davevg at gmail.com
Wed Mar 12 13:05:03 CDT 2008
Kevin DeGraaf wrote:
>> I am writing an AGI script that needs to check on the idle/busy status
>> of a number of SIP peers (mostly SPA9xx phones, with a few Polycoms and
>> Snoms thrown in for fun).
>>
>
> I ended up grabbing this info from the manager interface, within an AGI
> script. A little back-asswards, but it works.
>
> I still would like to know whether it's possible to call Asterisk
> functions from within AGI scripts...
>
>
This worked for me on * 1.6 where 1223 is the sip peer I wanted to get
status from.
#!/usr/bin/perl
use strict;
use Asterisk::AGI;
my $AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
my $peer = $AGI->get_variable("SIPPEER(1223,status)");
$AGI->verbose("We Received $peer",3);
exit;
More information about the asterisk-users
mailing list