<br><br><div class="gmail_quote">On Wed, Oct 17, 2012 at 8:43 AM, Raj Mathur (राज माथुर) <span dir="ltr"><<a href="mailto:raju@linux-delhi.org" target="_blank">raju@linux-delhi.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Our client has DAHDI groups with 4 PRIs in each group (one 4-port<br>
interface per group), up to 6 groups per server. When we dial, we can<br>
specify the group to be used for dialling, and our dial plan<br>
automatically distributes calls over multiple servers and multiple<br>
groups within a server.<br>
<br>
The way Asterisk dials by default is to use the lowest-numbered free<br>
line in a group to place a call. This is technically fine. However,<br>
what it means for our client is that the first couple of PRIs in a group<br>
tend to get the bulk of calls, the other two remain more-or-less<br>
unutilised. This is a problem, since there are call commitments to the<br>
Telco for each PRI line. The Telco tends to get all soggy and hard to<br>
light if some of the PRIs are used way below committed call levels.<br>
<br>
One solution is to group at the individual PRI level, so the load<br>
balancing automatically takes care of fair utilisation of each PRI.<br>
However, for various reasons we'd prefer not to do this.<br>
<br>
Another solution would be if Asterisk could choose a random (or LRU or<br>
LCU or round-robin or any other scheme) PRI within a group when<br>
dialling. Any roughly fair way to distribute calls to PRIs within a<br>
DAHDI group would be fine. Is there some way to achieve this?<br>
<br>
Asterisk 1.8.8 on Debian Squeeze.<br>
<br>
Regards,<br>
<br>
-- Raj<br>
--<br>
Raj Mathur || <a href="mailto:raju@kandalaya.org">raju@kandalaya.org</a> || GPG:<br>
<a href="http://otheronepercent.blogspot.com" target="_blank">http://otheronepercent.blogspot.com</a> || <a href="http://kandalaya.org" target="_blank">http://kandalaya.org</a> || CC68<br>
It is the mind that moves || <a href="http://schizoid.in" target="_blank">http://schizoid.in</a> || D17F<br></blockquote><div><br></div><div>Taken from the wiki searching with the exact terms you used. <a href="http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels">http://www.voip-info.org/wiki/view/Asterisk+ZAP+channels</a></div>
<div><br></div><div>Thanks,</div><div>Steve Totaro</div><h3 id="DialingaGroup" style="font-size:16px;font-family:'Trebuchet MS',Verdana,Arial,Helvetica,sans-serif;background-color:rgb(255,255,255)">Dialing a Group</h3>
<span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">In the Zap Channel Module's configuration file (</span><a title="Asterisk config zapata.conf" href="http://www.voip-info.org/wiki/view/Asterisk+config+zapata.conf" style="color:rgb(67,105,118);font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">zapata.conf</a><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">), you can define groups of Zap channels that get treated as a single channel as far as the </span><a title="Asterisk cmd Dial" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial" style="color:rgb(67,105,118);font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">Dial</a><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">command is concerned. You specify which of four methods the Zap channel module is to use to select a non-busy channel from the channel group by prefixing the group number with one of the letters </span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">g</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">, </span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">G</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">, </span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">r</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">, or </span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">R</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">:</span><br style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">
<br style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)"><ul style="margin-top:0px;margin-bottom:0px;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">
<li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
<em>g</em>: select the lowest-numbered non-busy Zap channel (aka. ascending sequential hunt group).</li><li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
<em>G</em>: select the highest-numbered non-busy Zap channel (aka. descending sequential hunt group).</li><li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
<em>r</em>: use a round-robin search, starting at the next highest channel than last time (aka. ascending rotary hunt group).</li><li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
<em>R</em>: use a round-robin search, starting at the next lowest channel than last time (aka. descending rotary hunt group).</li></ul><br style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">
<span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">The round-robin searches make the Zap channel module start looking for an available channel from a different channel number each time. For each channel group, the Zap channel module keeps track of the last round-robin start point, and this time starts checking availability from either the next (lowercase </span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">r</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">)) or the previous uppercase </span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">R</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)"> channel in the group. Which channel it actually finds available (if any) does not affect the starting point for the next round-robin search. Calls to the </span><a title="Asterisk cmd Dial" href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial" style="color:rgb(67,105,118);font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">Dial</a><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)"> command using ordinary (</span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">g</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)"> or </span><em style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">G</em><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">) group selections do not affect future round-robin starting points either.</span><br style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">
<br style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)"><span style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">For example, if you have defined channel group 2 as containing Zap channels 1, 2, 5 and 8, and the last round-robin search for this group (group 2) began searching from channel 5, this is the order of searching that the Zap channel module will use for the four possible selection methods:</span><br style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">
<br style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)"><ul style="margin-top:0px;margin-bottom:0px;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;background-color:rgb(255,255,255)">
<li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
Dial(Zap/g2...): Looks in order 1, 2, 5, 8</li><li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
Dial(Zap/G2...): Looks in order 8, 5, 2, 1</li><li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
Dial(Zap/r2...): Looks in order 8, 1, 2, 5</li><li style="margin:0.15em 0px;padding:1px 0px 1px 1em;list-style-type:none;background-image:url(http://www.voip-info.org/voip_info_drupal/themes/garland/images/menu-leaf.gif);background-color:transparent;background-repeat:no-repeat no-repeat">
Dial(Zap/R2...): Looks in order 2, 1, 8, 5</li></ul></div>