<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.24.5">
</HEAD>
<BODY>
Hello list.<BR>
<BR>
ChanIsAvail returns 20 for ${AVAILSTATUS}. What does this '20' mean ??<BR>
<BR>
...<BR>
<FONT SIZE="2">exten =&gt; 1,n,ChanIsAvail(SIP/sin10)</FONT><BR>
<FONT SIZE="2">exten =&gt; 1,n,NoOp(chanisavail == ${AVAILSTATUS})</FONT><BR>
...<BR>
<BR>
<FONT SIZE="2">[Mar&nbsp; 4 15:10:16]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [1@sin:7] ChanIsAvail(&quot;IAX2/testlocal-14088&quot;, &quot;SIP/sin10&quot;) in new stack</FONT><BR>
<FONT SIZE="2">[Mar&nbsp; 4 15:10:16]&nbsp;&nbsp;&nbsp;&nbsp; -- Executing [1@sin:8] NoOp(&quot;IAX2/testlocal-14088&quot;, &quot;chanisavail == 20&quot;) in new stack</FONT><BR>
<BR>
<BR>
What does it mean when ChanIsAvail returns '20' ???<BR>
<BR>
This is what inside /usr/src/asterisk-1.4.25.1/main/devicestate.c :<BR>
<BR>
<FONT SIZE="2">/*! \brief Device state strings for printing */</FONT><BR>
<FONT SIZE="2">static const char *devstatestring[] = {</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 0 AST_DEVICE_UNKNOWN */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Unknown&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*!&lt; Valid, but unknown state */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 1 AST_DEVICE_NOT_INUSE */&nbsp;&nbsp;&nbsp; &quot;Not in use&quot;,&nbsp;&nbsp; /*!&lt; Not used */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 2 AST_DEVICE IN USE */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;In use&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*!&lt; In use */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 3 AST_DEVICE_BUSY */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Busy&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*!&lt; Busy */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 4 AST_DEVICE_INVALID */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Invalid&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*!&lt; Invalid - not known to Asterisk */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 5 AST_DEVICE_UNAVAILABLE */&nbsp; &quot;Unavailable&quot;,&nbsp; /*!&lt; Unavailable (not registered) */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 6 AST_DEVICE_RINGING */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;Ringing&quot;,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*!&lt; Ring, ring, ring */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 7 AST_DEVICE_RINGINUSE */&nbsp;&nbsp;&nbsp; &quot;Ring+Inuse&quot;,&nbsp;&nbsp; /*!&lt; Ring and in use */</FONT><BR>
<FONT SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 8 AST_DEVICE_ONHOLD */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;On Hold&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*!&lt; On Hold */</FONT><BR>
<FONT SIZE="2">};</FONT><BR>
<BR>
<BR>
Jonas.
</BODY>
</HTML>