<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 Steve Edward,<div><br></div><div>I appreciate your response and help. Here are the answers inline to your questions. Please help me in writing an AGI script or whatever required if you can as I am not a programmer.</div><div><br></div><div>Is your intent to 'load balance' between 100 trunks or will you fill up&nbsp;<br style="text-indent: 0px !important; ">&gt; one before moving on to the next? Can unused capacity be 'rolled over' to&nbsp;<br style="text-indent: 0px !important; ">&gt; the next day?<br style="text-indent: 0px !important; "><b><font class="Apple-style-span" color="#00b050">Abid -&gt; 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.</font></b></div><div>&nbsp;<br style="text-indent: 0px !important; ">&gt; What happens if you 'go over?' Will the call in flight be terminated? Will&nbsp;<br style="text-indent: 0px !important; ">&gt; the next origination fail? Will you get a nasty rate spike?</div><div><b><font class="Apple-style-span" color="#00b050">Abid -&gt; If we go over, the call will not be terminated nor the next origination will fail nor we will get nasty rate spike but they will send us warnings and then finally block our trunks.</font></b><br><br><p class="ecxMsoNormal"><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"></span></p>

<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Courier New';color:#1F497D">-------------------------------&nbsp;</span></p>

<p class="ecxMsoNormal"><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"></span></p>

<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Courier New';color:#1F497D">Technical Manager NGN</span></p>

<p class="ecxMsoNormal"><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"></span></p>

<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Courier New';color:#1F497D">&nbsp;</span></p>

<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Courier New';color:#1F497D"><img width="160" height="41" src="file:///C:\Users\ABIDSA~1\AppData\Local\Temp\msohtmlclip1\01\clip_image001.jpg" alt="TerminusTechLogo"></span></p>

<p class="ecxMsoNormal"><span style="font-size:10.0pt;font-family:'Courier New';color:#1F497D">&nbsp;</span></p>

<p class="ecxMsoNormal"><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">: &nbsp;+92&nbsp;303&nbsp;7777 648</span></p>

<p class="ecxMsoNormal"><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"></span></p>

<p class="ecxMsoNormal"><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>&nbsp;&nbsp;
</span></p>

<b><span style="font-size:10.0pt;font-family:'Courier New';color:#1F497D">Web Site:</span></b><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="http://www.terminustech.com/" target="_blank">www.terminustech.com</a></span></u><br><br><div>&gt; Date: Wed, 29 Jun 2011 07:42:55 -0700<br>&gt; From: asterisk.org@sedwards.com<br>&gt; To: asterisk-users@lists.digium.com<br>&gt; Subject: Re: [asterisk-users] Load Balance Trunks<br>&gt; <br>&gt; On Wed, 29 Jun 2011, Abid Saleem wrote:<br>&gt; <br>&gt; &gt; I have 100 Trunks from my Provider. My Provider is restricting me to <br>&gt; &gt; make only 120 minutes Call duration / trunk / day. So I want to load <br>&gt; &gt; balance my calls to these 100 trunks. Please advise in this regard ASAP. <br>&gt; &gt; Thanks in advance.<br>&gt; <br>&gt; The arrangement sounds 'sketchy' to me :)<br>&gt; <br>&gt; You will need to use a database (MySQL, ASTDB, etc) of some sort to keep <br>&gt; persistent (surviving a crash or restart) track of the usage. You will <br>&gt; also need some sort of lock mechanism (usually a feature of a 'real' <br>&gt; database) to prevent race conditions with <br>&gt; regard to simultaneous calls.<br>&gt; <br>&gt; While you can code up database access in dialplan, my personal preference <br>&gt; is to wrap database code up in an AGI because you have better control, <br>&gt; robustness and maintainability. Also, database access in dialplan is just <br>&gt; plain ugly.<br>&gt; <br>&gt; Is your intent to 'load balance' between 100 trunks or will you fill up <br>&gt; one before moving on to the next? Can unused capacity be 'rolled over' to <br>&gt; the next day?<br>&gt; <br>&gt; What happens if you 'go over?' Will the call in flight be terminated? Will <br>&gt; the next origination fail? Will you get a nasty rate spike?<br>&gt; <br>&gt; -- <br>&gt; Thanks in advance,<br>&gt; -------------------------------------------------------------------------<br>&gt; Steve Edwards       sedwards@sedwards.com      Voice: +1-760-468-3867 PST<br>&gt; Newline                                              Fax: +1-760-731-3000<br>&gt; <br>&gt; --<br>&gt; _____________________________________________________________________<br>&gt; -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>&gt; New to Asterisk? Join us for a live introductory webinar every Thurs:<br>&gt;                http://www.asterisk.org/hello<br>&gt; <br>&gt; asterisk-users mailing list<br>&gt; To UNSUBSCRIBE or update options visit:<br>&gt;    http://lists.digium.com/mailman/listinfo/asterisk-users<br></div></div>                                               </div></body>
</html>