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       [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