VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
geisj at pagestation.com Guest
|
Posted: Wed Aug 20, 2014 3:53 pm Post subject: [asterisk-users] Dispatching calls question |
|
|
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.
I'm using Asterisk 11.11 if that matters.
Thanks,
Jerry |
|
Back to top |
|
|
asterisk.org at sedwar... Guest
|
Posted: Wed Aug 20, 2014 4:01 pm Post subject: [asterisk-users] Dispatching calls question |
|
|
On Wed, 20 Aug 2014, Jerry Geis wrote:
Quote: | 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 sedwards@sedwards.com 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 |
|
Back to top |
|
|
EWieling at nyigc.com Guest
|
Posted: Wed Aug 20, 2014 5:33 pm Post subject: [asterisk-users] Dispatching calls question |
|
|
-----Original Message-----
From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Steve Edwards
Sent: Wednesday, August 20, 2014 9:01 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Dispatching calls question
Quote: | On Wed, 20 Aug 2014, Jerry Geis wrote:
Quote: | 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.
|
Asterisk 1.8 and later have lock functions available in the dialplan. This might be better if you have a single Asterisk server.
pbx*CLI> core show functions like LOCK
Matching Custom Functions:
--------------------------------------------------------------------------------
LOCK LOCK(lockname) Attempt to obtain a named mutex.
TRYLOCK TRYLOCK(lockname) Attempt to obtain a named mutex.
UNLOCK UNLOCK(lockname) Unlocks a named mutex.
3 matching custom functions installed.
--
_____________________________________________________________________
-- 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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|