Thanks Kevin. 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. Am I right or have I missed something?<br>
<br>
Thanks,<br>
Hugh <br><br><div><span class="gmail_quote">On 9/13/05, <b class="gmail_sendername">Kevin P. Fleming</b> <<a href="mailto:kpfleming@digium.com">kpfleming@digium.com</a>> 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>> Curious whether the ChanIsAvail command is thread safe. By that I mean, if I<br>> use ChanIsAvail to determine which channel to use, can I be sure that it<br>> will still be available when I go to Dial it on the next line? It occurs to
<br>> me that there's a possibility the channel could get used by a competing<br>> thread AFTER my thread has determined it is available and BEFORE my thread<br>> 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">Asterisk-Dev@lists.digium.com</a><br><a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev
</a><br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br>