<font face="trebuchet ms,sans-serif">I can get load balancing and failover working fine <b>individually</b> but I have difficulty running them together. Ideally, load balancing should handle failover too.<br><br>Please provide cfg script sample of getting both load balancing and drouting working.<br>
</font><br><div class="gmail_quote">
On Tue, Mar 27, 2012 at 2:22 PM, [Digital^Dude] ® <span dir="ltr"><<a href="mailto:millennium.bug@gmail.com" target="_blank">millennium.bug@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font face="trebuchet ms,sans-serif">I see. Thanks. Is this the only way of accomplishing load_balanced failover with opensips?<br></font><div><div></div><div><br><div class="gmail_quote">On Tue, Mar 27, 2012 at 2:20 PM, Vlad Paiu <span dir="ltr"><<a href="mailto:vladpaiu@opensips.org" target="_blank">vladpaiu@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
In failure_route, there is no need to call again do_routing() if you
want to route the call based on the same gw list matched the first
time in request route. It is enough to just call use_next_gw() until
it fails. <br>
Also, make sure to call t_on_failure("1") even in failure_route() ,
so you can keep repeating the same process of choosing the next GW,
in case more than one of your GWs fail.<br>
<br>
Regards,<br>
<br>
<pre cols="72">Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre><div><div></div><div>
<br>
On 03/27/2012 12:12 PM, [Digital^Dude] ® wrote:
</div></div><blockquote type="cite"><div><div></div><div><font face="trebuchet ms,sans-serif">How do I get a
load balanced setup with failover (through drouting)..?<br>
1. I have set up my routing logic in the main routing block. <br>
2. Have set t_on_failure("1"); in is_method("INVITE ")<br>
<br>
this in my failure_route:<br>
<br>
<span style="font-family:courier new,monospace"> if
(!do_routing("10")) {</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
send_reply("503", "No Rules matching the URI");</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
xlog("Do_Routing failed........\n");</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
exit;</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> }</span><br style="font-family:courier new,monospace">
<br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> if
(use_next_gw()) {</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
xlog("In use_next_gw\n");</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
t_relay();</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
exit;</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> }</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> else {</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
xlog("In else case.... \n");</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
t_reply ("503", "Service not available");</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
exit;</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace"> }</span><br style="font-family:courier new,monospace">
But it only redirects the first few calls, as soon as the
dr_status becomes enable=>no. I start getting 503...<br>
Please point out where I'm going wrong...<br>
<br>
Thanks.<br>
</font>
</div></div><pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
<br>_______________________________________________<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-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br>
</div></div></blockquote></div><br>