[Asterisk-Users] AGI Channel Status

James Golovich james at wwnet.net
Thu Aug 21 09:04:00 MST 2003


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




More information about the asterisk-users mailing list