>>$status = $AGI->channel_status('Zap/1-1');
I did try to do that, but it doesn't work for some reason.
 
What I did was change $AGI->channel_status('Zap/1-1'); to score($AGI->channel_status('Zap/1-1'));
 
Then I added
sub score{
     my ($returncode) = @_;
     print STDERR "Return code for Zap/1-1 is $returncode\n\n";
}



James Golovich <[EMAIL PROTECTED]> wrote:


On Thu, 21 Aug 2003, jerk face wrote:

> I'm having some trouble getting the channel status with an AGI script.
>
> #!/usr/bin/perl
>
> use Asterisk::AGI;
> $AGI = new Asterisk::AGI;
>
> my %input = $AGI->ReadParse();
>
> $AGI->channel_status('Zap/1-1');
>
> I am now stuck, and don't know how to get the return codes:

Well assuming that you are using version 0.08 of asterisk-perl (because
channel_status previously only worked on the current channel before then),
then all you need to do is:

$status = $AGI->channel_status('Zap/1-1');

and $status will contain the return value

James

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Reply via email to