[asterisk-users] Load Balance Trunks

Abid Saleem abid_asterisk at hotmail.com
Fri Jul 1 08:33:05 CDT 2011


Dear AJS,
Thank you for your response with good idea. Unfortunately I am not good at programming. Can you please write this AGI script for me. Please help if you can.
Best
Regards,

------------------------------- 

Abid
Saleem

Technical Manager NGN

Terminus Technologies

 



 

Mobile:  +92 303 7777 648

Email: abid at terminusbilling.com


MSN: abid_saleem10 at hotmail.com  


Web Site: www.terminustech.com

> From: asterisk_list at earthshod.co.uk
> To: asterisk-users at lists.digium.com
> Date: Wed, 29 Jun 2011 16:07:25 +0100
> Subject: Re: [asterisk-users] Load Balance Trunks
> 
> On Wednesday 29 Jun 2011, Abid Saleem wrote:
> > Hi All,
> > 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. Regards-----------Abid SaleemTechnical Manager NGNTerminus
> > Technologies
> 
> What you will have to do is, set up a database keeping track of how much time 
> has been used on each trunk; and create two AGI scripts.  One, which you run 
> immediately before your Dial() statement, sets a channel variable indicating 
> which trunk to use.  (Inside a loop, pick a trunk at random; and if there are 
> minutes to spare on that trunk, and it's not in use, exit the loop.  Then set 
> a channel variable, and mark the trunk as in use.)  Another, which you run in 
> your h extensions, updates the database; subtracting the duration of the call 
> just finished from the time allotted to that trunk, and marking it available.
> 
> If you were pathologically dishonest, this technique probably would also work 
> for leeching other people's bandwidth in doses small enough to go 
> unnoticed .....  ;)
> 
> -- 
> AJS
> 
> Answers come *after* questions.
> 
> --
> _____________________________________________________________________
> -- 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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110701/03967515/attachment.htm>


More information about the asterisk-users mailing list