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;
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users