I can get load balancing and failover working fine *individually* but I have difficulty running them together. Ideally, load balancing should handle failover too.
Please provide cfg script sample of getting both load balancing and drouting working. On Tue, Mar 27, 2012 at 2:22 PM, [Digital^Dude] ® <[email protected]>wrote: > I see. Thanks. Is this the only way of accomplishing load_balanced > failover with opensips? > > On Tue, Mar 27, 2012 at 2:20 PM, Vlad Paiu <[email protected]> wrote: > >> ** >> Hello, >> >> 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. >> 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. >> >> Regards, >> >> Vlad Paiu >> OpenSIPS Developerhttp://www.opensips-solutions.com >> >> >> On 03/27/2012 12:12 PM, [Digital^Dude] ® wrote: >> >> How do I get a load balanced setup with failover (through drouting)..? >> 1. I have set up my routing logic in the main routing block. >> 2. Have set t_on_failure("1"); in is_method("INVITE ") >> >> this in my failure_route: >> >> if (!do_routing("10")) { >> send_reply("503", "No Rules matching the URI"); >> xlog("Do_Routing failed........\n"); >> exit; >> } >> >> if (use_next_gw()) { >> xlog("In use_next_gw\n"); >> t_relay(); >> exit; >> } >> else { >> xlog("In else case.... \n"); >> t_reply ("503", "Service not available"); >> exit; >> } >> But it only redirects the first few calls, as soon as the dr_status >> becomes enable=>no. I start getting 503... >> Please point out where I'm going wrong... >> >> Thanks. >> >> >> _______________________________________________ >> Users mailing >> [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
