[asterisk-users] Load Balance Trunks

Faisal Hanif faisal at vopium.com
Tue Jul 5 06:33:28 CDT 2011


Hi,

One of my college "Gohar Ahmed" suggested an intelligent solution to your
problem. I am coping his words below,

Create SIP trunks and create a queue [distributor] and register trunks in it
as static agents with strategy "rrmemory" , 
To keep track of number of calls served per trunk as well as time on each
trunk can be monitored via any queue monitoring tool. !!
 or better use queue_log in realtime DB

As per my view this is most easy and optimized approach while keeping all
possible data in queue logs. Hope this will helpful for you.

Regards,

Faisal Hanif

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Steve Edwards
Sent: Saturday, July 02, 2011 1:32 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Load Balance Trunks

On Fri, 1 Jul 2011, Abid Saleem wrote:

> The intention is to load balance between 100 or even more trunks. 
> Filling up one trunk may have another problem because we have another 
> restriction on 5 simultaneous calls per trunk. Yes unused capacity can 
> be rolled over to the next day. Anything is fine that does not break 
> these two restrictions of 120 mins/day/trunk and 5 simultaneous 
> calls/trunk.

> Please help me in writing an AGI script or whatever required if you 
> can as I am not a programmer.

If you don't consider yourself a 'programmer' then you don't have the skills
to start. You should hire a competent programmer. It will be much cheaper in
the long run and you can focus on what you are good at instead of what you
are not.

It's not that the requirements are all that challenging, it's just that the
probability of success when you lack the skills is small.

These skills include, but are not limited to:

1) An understanding of Asterisk, dialplan logic, and applications.

2) An understanding of the AGI interface including reading and setting
channel variables.

3) MySQL programming and administration skills.

4) The ability and experience to write well thought out, clearly presented,
robust and maintainable code.

What service are you offering?

Are the calls delivered by SIP or PSTN?

Is this a 24x7 operation?

If I was asked to design a 500 simultaneous call system with SIP delivery I
would probably start with 2 OpenSIPS servers, 2 Asterisk instances (possibly
on the same servers as the OpenSIPS servers), and at least 1 MySQL server.

You could cram everything on to a single system, I just don't like to put
all my eggs in a single basket.

I like 'front-ending' Asterisk servers with OpenSIPS because it gives me the
flexibility to handle a host failure or take a host out of production for
maintenance.

AJS (previous poster) has the right approach -- 2 AGIs. One AGI to determine
which trunk to use (I would use a 'select' to determine which trunk instead
of 'random') and one executed at the end of the call to update the database.

--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at 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




More information about the asterisk-users mailing list