[asterisk-users] Load Balance Trunks
Steve Edwards
asterisk.org at sedwards.com
Wed Jun 29 09:42:55 CDT 2011
On Wed, 29 Jun 2011, Abid Saleem wrote:
> I have 100 Trunks from my Provider. My Provider is restricting me to
> make only 120 minutes Call duration / trunk / day. So I want to load
> balance my calls to these 100 trunks. Please advise in this regard ASAP.
> Thanks in advance.
The arrangement sounds 'sketchy' to me :)
You will need to use a database (MySQL, ASTDB, etc) of some sort to keep
persistent (surviving a crash or restart) track of the usage. You will
also need some sort of lock mechanism (usually a feature of a 'real'
database) to prevent race conditions with
regard to simultaneous calls.
While you can code up database access in dialplan, my personal preference
is to wrap database code up in an AGI because you have better control,
robustness and maintainability. Also, database access in dialplan is just
plain ugly.
Is your intent to 'load balance' between 100 trunks or will you fill up
one before moving on to the next? Can unused capacity be 'rolled over' to
the next day?
What happens if you 'go over?' Will the call in flight be terminated? Will
the next origination fail? Will you get a nasty rate spike?
--
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