<DIV>&gt;&gt;$status = $AGI-&gt;channel_status('Zap/1-1');</DIV>
<DIV>I did try to do that, but it doesn't work for some reason.</DIV>
<DIV>&nbsp;</DIV>
<DIV>What I did was change&nbsp;$AGI-&gt;channel_status('Zap/1-1'); to&nbsp;score($AGI-&gt;channel_status('Zap/1-1'));</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then I added</DIV>
<DIV>sub score{</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; my ($returncode) = @_;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; print STDERR "Return code for Zap/1-1 is $returncode\n\n";</DIV>
<DIV>}<BR></DIV>
<DIV><BR><BR><BR><B><I>James Golovich &lt;james@wwnet.net&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR><BR>On Thu, 21 Aug 2003, jerk face wrote:<BR><BR>&gt; I'm having some trouble getting the channel status with an AGI script.<BR>&gt; <BR>&gt; #!/usr/bin/perl<BR>&gt; <BR>&gt; use Asterisk::AGI;<BR>&gt; $AGI = new Asterisk::AGI;<BR>&gt; <BR>&gt; my %input = $AGI-&gt;ReadParse();<BR>&gt; <BR>&gt; $AGI-&gt;channel_status('Zap/1-1');<BR>&gt; <BR>&gt; I am now stuck, and don't know how to get the return codes:<BR><BR>Well assuming that you are using version 0.08 of asterisk-perl (because<BR>channel_status previously only worked on the current channel before then),<BR>then all you need to do is:<BR><BR>$status = $AGI-&gt;channel_status('Zap/1-1');<BR><BR>and $status will contain the return value<BR><BR>James<BR><BR>_______________________________________________<BR>Asterisk-Users mailing
 list<BR>Asterisk-Users@lists.digium.com<BR>http://lists.digium.com/mailman/listinfo/asterisk-users</BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/evt=10469/*http://sitebuilder.yahoo.com">Yahoo! SiteBuilder</a> - Free, easy-to-use web site design software