<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>What version of Asterisk are you using?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I think this might be related to an issue that was resolved in
version 1.4.27<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><a
href="http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.4.27-summary.html">http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.4.27-summary.html</a>
- look in the list of Closed Items, second one down.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><a href="https://issues.asterisk.org/view.php?id=14426">https://issues.asterisk.org/view.php?id=14426</a>
– link to the issue<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hope that helps.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Dan Journo<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> asterisk-users-bounces@lists.digium.com
[mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>ABBAS
SHAKEEL<br>
<b>Sent:</b> 25 November 2009 09:59<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br>
<b>Subject:</b> [asterisk-users] ChanIsAvail querry<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hello <o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>We need to know if a channel is not in use and can be used
to dial a number etc.. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>I have tried the ChanIsAvail function with different
parameters.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>ie ChanIsAvail(DAHDI/1&DAHDI/2)
,ChanIsAvail(DAHDI/1,s) etc <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>no matter the channel is busy or not it always return 0
. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Please suggest <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>FYI<o:p></o:p></p>
</div>
<div>
<div>
<p class=MsoNormal> ChanIsAvail(Technology/resource[&Technology2/resource2...][,options]):<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>This application will check to see if any of the specified
channels are<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>available.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> Options:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> a - Check for all available channels, not
only the first one.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> s - Consider the channel unavailable if
the channel is in use at all.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> t - Simply checks if specified channels
exist in the channel list<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> (implies option s).<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>This application sets the following channel variable upon
completion:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> AVAILCHAN - the name of the
available channel, if one exists<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> AVAILORIGCHAN - the canonical channel name that
was used to create the channel<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> AVAILSTATUS - the status code for the
available channel<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
-- <br>
Best Regards<br>
Shakeel Abbas<o:p></o:p></p>
</div>
</div>
</body>
</html>