<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Dear AJS,<div><br></div><div>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.</div><div><br></div><div><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">Best
Regards,</span><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">------------------------------- <o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New"">Abid
Saleem</span></b><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">Technical Manager NGN<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";
color:#FE9700">Terminus Technologies</span><span style="font-size:10.0pt;
font-family:"Courier New";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600"
o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" alt="TerminusTechLogo"
style='width:120pt;height:30.75pt'>
<v:imagedata src="file:///C:\Users\ABIDSA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.jpg"
o:href="cid:image001.jpg@01CC3812.0F1960F0"/>
</v:shape><![endif]--><!--[if !vml]--><img width="160" height="41" src="file:///C:\Users\ABIDSA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.jpg" alt="TerminusTechLogo" v:shapes="_x0000_i1025"><!--[endif]--><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D"> <o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">Mobile</span></b><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">: +92 303 7777 648<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">Email</span></b><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">:</span><span style="font-size:10.0pt;font-family:"Courier New";
color:#999999"> </span><u><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D"><a href="mailto:abid@terminusbilling.com">abid@terminusbilling.com</a>
</span></u><span style="font-size:10.0pt;font-family:"Courier New";color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">MSN</span></b><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D">:</span><span style="font-size:10.0pt;font-family:"Courier New";
color:#999999"> </span><span style="font-size:10.0pt;font-family:"Courier New";
color:#1F497D"><a href="mailto:abid_saleem10@hotmail.com">abid_saleem10@hotmail.com</a>
<o:p></o:p></span></p>
<b><span style="font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:
Calibri;mso-fareast-theme-font:minor-latin;color:#1F497D;mso-ansi-language:
EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA">Web Site:</span></b><span style="font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;color:#999999;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA"> </span><u><span style="font-size:10.0pt;font-family:"Courier New";mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;color:#1F497D;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA"><a href="http://www.terminustech.com/">www.terminustech.com</a></span></u><br><br><div>> From: asterisk_list@earthshod.co.uk<br>> To: asterisk-users@lists.digium.com<br>> Date: Wed, 29 Jun 2011 16:07:25 +0100<br>> Subject: Re: [asterisk-users] Load Balance Trunks<br>> <br>> On Wednesday 29 Jun 2011, Abid Saleem wrote:<br>> > Hi All,<br>> > I have 100 Trunks from my Provider. My Provider is restricting me to make<br>> > only 120 minutes Call duration / trunk / day. So I want to load balance my<br>> > calls to these 100 trunks. Please advise in this regard ASAP. Thanks in<br>> > advance. Regards-----------Abid SaleemTechnical Manager NGNTerminus<br>> > Technologies<br>> <br>> What you will have to do is, set up a database keeping track of how much time <br>> has been used on each trunk; and create two AGI scripts. One, which you run <br>> immediately before your Dial() statement, sets a channel variable indicating <br>> which trunk to use. (Inside a loop, pick a trunk at random; and if there are <br>> minutes to spare on that trunk, and it's not in use, exit the loop. Then set <br>> a channel variable, and mark the trunk as in use.) Another, which you run in <br>> your h extensions, updates the database; subtracting the duration of the call <br>> just finished from the time allotted to that trunk, and marking it available.<br>> <br>> If you were pathologically dishonest, this technique probably would also work <br>> for leeching other people's bandwidth in doses small enough to go <br>> unnoticed ..... ;)<br>> <br>> -- <br>> AJS<br>> <br>> Answers come *after* questions.<br>> <br>> --<br>> _____________________________________________________________________<br>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>> http://www.asterisk.org/hello<br>> <br>> asterisk-users mailing list<br>> To UNSUBSCRIBE or update options visit:<br>> http://lists.digium.com/mailman/listinfo/asterisk-users<br></div></div>                                            </div></body>
</html>