When the channel is in any state > 1 , i.e. up and connected, the value of the relevant channel variables is as follows:-<br clear="all">AVAILCHAN=""<br>AVAILORIGCHAN=""<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, /*!< Channel is down and available */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> AST_STATE_RESERVED, /*!< Channel is down, but reserved */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> AST_STATE_OFFHOOK, /*!< Channel is off hook */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> AST_STATE_DIALING, /*!< Digits (or equivalent) have been dialed */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> AST_STATE_RING, /*!< Line is ringing */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> AST_STATE_RINGING, /*!< Remote end is ringing */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> AST_STATE_UP, /*!< Line is up */</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> AST_STATE_BUSY, /*!< Line is busy */</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> AST_STATE_DIALING_OFFHOOK, /*!< 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, /*!< 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 << 16), /*!< 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 & AVAILORIGCHAN channel variables (tmp_availchan and tmp_availorig) when the state is > 1<br>Any clues why its been done so?<br><br>For reference:-<br>
<span style="font-family: courier new,monospace;">host123f4a*CLI> 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></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> -= Info about application 'ChanIsAvail' =-</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[&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>