[asterisk-users] Load balance outgoing calls
Steve Edwards
asterisk.org at sedwards.com
Tue Feb 23 09:36:26 CST 2010
On Tue, 23 Feb 2010, Alejandro Recarey wrote:
> If I use a global variable like
>
> --> IF GLB > 2 GLB = 0
> dial(iax2/isp${GLB}/${EXTEN})
> --> GLB = GLB +1
>
> I believe this could cause a race condition if two calls are sent to the
> carrier at the same time?
Yes. If that's an issue for your carrier, use the decimal part of
${UNIQUEID}. It's incremented every time Asterisk creates a channel so
there would be no race condition.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list