Anyways yes you can call failure route while using the load_balancer too. just use <div><br></div><div>t_on_failure("record-stats");</div><div>before calling the </div><div>if(!load_balancer("1","10"))</div>
<div><br></div><div>what it should do is send the call to an active destination and if that active destination returns negative stats you can do something about those in failure route.</div><div><br></div><div>Also her's some piece of code I collected from searching in 10 minutes.<br>
<div><br></div><div># SELECT AN ACTIVE DESTINATION FROM LOAD_BALANCER ---RESULTSET GOES TO $du</div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (!load_balance("1","mygws","0")) {</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>sl_send_reply("480","Temporarily Unavailable: service full");</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>exit;</div>
<div> }</div><div> ......</div><div> .......</div><div> # SEND THE CALL TO $du </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>if (!t_relay("0x09")) {</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>xlog("L_ERR", "Carrier termination failed with status code $rs: $rr using outbound carrier: '$du' \n");</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>sl_reply_error();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>};</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><br></div><div>Regards,</div><div>Sammy</div><br><div class="gmail_quote">On Wed, Feb 22, 2012 at 10:27 AM, Matt Riddell <span dir="ltr"><<a href="mailto:lists@venturevoip.com">lists@venturevoip.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 22/02/12 6:22 PM, Sammy Govind wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I can take care of the logic of changing the DB and resizing the<br>
load balancing rules but don't see how I can log the<br>
failures/failure codes for<br>
<br>
<br>
Yes why not, give it a try. If the carrier is already down in<br>
load-balancer list then it won't even try the itsp but if its available<br>
and return congestion you can definitely lock the response.<br>
<br>
hmmm..give it a try first. Why don';t you try the LCR module for this !<br>
usually load_balancer is used for distributed load to internal servers,<br>
but you are using inverse..<br>
see this: <a href="http://www.opensips.org/html/docs/modules/1.7.x/drouting.html" target="_blank">http://www.opensips.org/html/<u></u>docs/modules/1.7.x/drouting.<u></u>html</a><br>
</blockquote>
<br></div>
Problem with LCR is that we're needing to go to a max number of simultaneous channels to a provider - requiring dialog support rather than just dispatching.<div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Cheers,<br>
<br>
Matt Riddell<br>
______________________________<u></u>_________________<br>
<br>
<a href="http://www.venturevoip.com/news.php" target="_blank">http://www.venturevoip.com/<u></u>news.php</a> (Daily Asterisk News)<br>
<a href="http://www.venturevoip.com/pabx_on_disk.php" target="_blank">http://www.venturevoip.com/<u></u>pabx_on_disk.php</a> (PABX on a Disk)<br>
<a href="http://www.venturevoip.com/exchange.php" target="_blank">http://www.venturevoip.com/<u></u>exchange.php</a> (Full ITSP Solution)<br>
<a href="http://www.venturevoip.com/cc.php" target="_blank">http://www.venturevoip.com/cc.<u></u>php</a> (Call Centre Solutions)<br>
<br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<u></u>bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div></div>