Unless I'm missing something too, the inability to lock an available
channel appears to invalidate any potential use of ChanIsAvail.<br>
<br>
It would be nice to be able to tell ChanIsAvail to lock an available channel until Dial is used or the dialplan logic ends.<br><br><div><span class="gmail_quote">On 9/13/05, <b class="gmail_sendername">hugolivude</b> &lt;
<a href="mailto:hugolivude@gmail.com">hugolivude@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks Kevin.&nbsp; It doesn't seem that it would be very useful to use
ChanIsAvail in a dial plan to determine which line to use because a
line that tests as AVAILABLE could get snatched by another user before
it can get used.&nbsp; Am I right or have I missed something?<br>
<br>
Thanks,<br>
Hugh <div><span class="e" id="q_106504347cbca609_1"><br><br><div><span class="gmail_quote">On 9/13/05, <b class="gmail_sendername">Kevin P. Fleming</b> &lt;<a href="mailto:kpfleming@digium.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
kpfleming@digium.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hugolivude wrote:<br>&gt; Curious whether the ChanIsAvail command is thread safe. By that I mean, if I<br>&gt; use ChanIsAvail to determine which channel to use, can I be sure that it<br>&gt; will still be available when I go to Dial it on the next line? It occurs to
<br>&gt; me that there's a possibility the channel could get used by a competing<br>&gt; thread AFTER my thread has determined it is available and BEFORE my thread<br>&gt; gets a chance to Dial.<br><br>This has nothing to do with 'thread safety' at all, please don't mis-use
<br>terminology.<br><br>The simple answer to your question is no. ChanIsAvail only tells you<br>whether the channel is available, it does not make any attempt to 'lock'<br>it for your use.<br>_______________________________________________
<br>Asterisk-Dev mailing list<br><a href="mailto:Asterisk-Dev@lists.digium.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Asterisk-Dev@lists.digium.com</a><br><a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.digium.com/mailman/listinfo/asterisk-dev
</a><br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.digium.com/mailman/listinfo/asterisk-dev
</a><br></blockquote></div><br>

</span></div><br>_______________________________________________<br>Asterisk-Dev mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Asterisk-Dev@lists.digium.com">Asterisk-Dev@lists.digium.com
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>To UNSUBSCRIBE or update options visit:
<br> &nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br><br></blockquote></div>
<br><br clear="all"><br>-- <br>&quot;We hold [...] that all men are created equal; that they are<br>endowed [...] with certain inalienable rights; that among<br>these are life, liberty, and the pursuit of happiness&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- Thomas Jefferson