When the channel is in any state &gt; 1 , i.e. up and connected, the value of the relevant channel variables is as follows:-<br clear="all">AVAILCHAN=&quot;&quot;<br>AVAILORIGCHAN=&quot;&quot;<br>AVAILSTATUS=(the enumerated value corrosponding to the state)<br>
<br><span style="font-family: courier new,monospace;">enum ast_channel_state {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        AST_STATE_DOWN,                 /*!&lt; Channel is down and available */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        AST_STATE_RESERVED,             /*!&lt; Channel is down, but reserved */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        AST_STATE_OFFHOOK,              /*!&lt; Channel is off hook */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        AST_STATE_DIALING,              /*!&lt; Digits (or equivalent) have been dialed */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        AST_STATE_RING,                 /*!&lt; Line is ringing */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        AST_STATE_RINGING,              /*!&lt; Remote end is ringing */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        AST_STATE_UP,                   /*!&lt; Line is up */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        AST_STATE_BUSY,                 /*!&lt; Line is busy */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        AST_STATE_DIALING_OFFHOOK,      /*!&lt; Digits (or equivalent) have been dialed while offhook */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        AST_STATE_PRERING,              /*!&lt; Channel has detected an incoming call and is waiting for ring */</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        AST_STATE_MUTE = (1 &lt;&lt; 16),     /*!&lt; Do not transmit voice data */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">};</span><br style="font-family: courier new,monospace;">
<br><br><br>Looking at the code, the application does not set the AVAILCHAN &amp; AVAILORIGCHAN channel variables (tmp_availchan and tmp_availorig) when the state is &gt; 1<br>Any clues why its been done so?<br><br>For reference:-<br>
<span style="font-family: courier new,monospace;">host123f4a*CLI&gt; core show application ChanIsAvail</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">host123f4</span><span style="font-family: courier new,monospace;">a*CLI&gt;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  -= Info about application &#39;ChanIsAvail&#39; =-</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[Synopsis]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Check channel availability</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[Description]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  ChanIsAvail(Technology/resource[&amp;Technology2/resource2...][,options]):</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">This application will check to see if any of the specified channels are</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">available.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  Options:</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    a - Check for all available channels, not only the first one.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    s - Consider the channel unavailable if the channel is in use at all.</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    t - Simply checks if specified channels exist in the channel list</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        (implies option s).</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">This application sets the following channel variable upon completion:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  AVAILCHAN     - the name of the available channel, if one exists</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  AVAILORIGCHAN - the canonical channel name that was used to create the channel</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">  AVAILSTATUS   - the status code for the available channel</span><br style="font-family: courier new,monospace;">
<br><br><br>-- <br>Regards,<br>Prince Singh<br>Drishti-Soft Solutions Pvt Ltd<br><a href="http://www.drishti-soft.com">http://www.drishti-soft.com</a><br><a href="http://blog.drishti-soft.com">http://blog.drishti-soft.com</a><br>