On Wed, 20 Aug 2014, Jerry Geis wrote:

I have a question about dispatching calls...
If I try to dispatch a call on line 1 using the AMI
and I check in my table to see if line 1 is available and it is....
So I have done my checking now I dispatch my call 
and at that same time a call comes in on line 1 and now its no longer available 
for me to make a call, I connect on AMI and my call fails....

How do I prevent this from happening? Sure I can start at 23 instead of 1 and 
work down
instead of up  but eventually the same thing may happen.

If you're using something like MySQL, use 'get_lock/release_lock.'

If you're using some other database, see what locking features you have available.

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to