Yes, our configuration calls do_routing multiple times for different failover 
cases. You may want to verify this but I believe that the additional calls will 
append to the relevant AVPs used by the module, so if you haven’t routed to all 
destinations, you may need to clear out the AVPs prior to calling it again. I’m 
not positive on that part though; it may overwrite existing values.

We created a little helper route to do this:

route[clear_dr_avps]
{
  avp_delete("$avp(dr_ruri)/g");
  avp_delete("$avp(dr_gw_id)/g");
  avp_delete("$avp(dr_gw_prfx)/g");
  avp_delete("$avp(dr_rule_id)/g");
  avp_delete("$avp(dr_rule_prfx)/g");
  avp_delete("$avp(dr_carr_id)/g");
}

Ben Newlin

From: Users <[email protected]> on behalf of Vic Jolin 
<[email protected]>
Reply-To: OpenSIPS users mailling list <[email protected]>
Date: Thursday, June 25, 2020 at 10:49 AM
To: "[email protected]" <[email protected]>
Subject: [OpenSIPS-Users] do_routing with failover to shorter prefix

Hi,

So I have this in my opensips.cfg

if ( !do_routing($(avp(drgID){s.int<http://s.int>}),,,,,$var(gw_attributes)) ) {
send_reply(404,"No Route found");
exit;
}

And I know that do_routing will match on the longer prefix on dr_rules table 
first.

My question is

Now after failing on all the routes, can we still do another do_routing with 
shorter prefix matching?
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to