[Asterisk-Dev] Re: Is the ChanIsAvail command thread safe?

Tony Mountifield tony at softins.clara.co.uk
Tue Sep 13 09:22:18 MST 2005


In article <c471e4e30509130913138aa701 at mail.gmail.com>,
hugolivude <hugolivude at gmail.com> wrote:
> 
> 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?

Sounds to me like a useful pair of apps would be ChanReserve and
ChanRelease, where ChanReserve operates like ChanIsAvail, but if the
channel is available it atomically reserves it for the calling channel,
until the calling channel either does a Dial, ChanRelease or is hung up.

I don't have time to produce them, but thought I'd toss the idea out in
case anyone feels like picking it up.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-dev mailing list