AFAIK, in simple words if you are forwarding the call to a provider and if that one provider returns negative response you can reach into any of the failure_route as per your script.<div><br><div>....</div><div>t_on_failure("carrier-fail");</div>
<div>t_relay()</div><div>...</div><div>then do logic in failure route.</div><div><br></div><div>OR </div><div><br></div><div>if(!t_relay())</div><div>{</div><div> xlog("L_NOTICE","I couldnt send traffic to the destination now try with other carrier\n");</div>
<div> $avp(carrier_index) = $avp(carrier_index) +1;</div><div> route(send_to_carrier);</div><div>}</div><div><br></div><div><br></div><div><a href="http://www.opensips.org/index.php?n=Resources.DocsCoreRoutes">http://www.opensips.org/index.php?n=Resources.DocsCoreRoutes</a>
</div><div><br></div><div>Regards,</div><div>Sammy</div><div><br></div><div>Thats just an example so list spare me for the syntax and rest of the exception handling.</div><div><br></div><div><br></div><div><div class="gmail_quote">
On Wed, Feb 22, 2012 at 5:18 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 21/02/12 9:33 PM, Matt Riddell 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 load<br>
balancing rules but don't see how I can log the failures/failure codes<br>
for providers after I've called load_balance().<br>
</blockquote>
<br></div>
I can see that I could do a failure_route if load_balance returns a negative but as far as I'm aware that only happens when all providers fail?<br>
<br>
True/false?<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>