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
