Priority on RouteSet route over static route

Hi all,

We have uploaded a routeset definition and digitmap to match certain DIDs.

dids.csv:

called,calling,routeset_name
441214681658,to_pbx

def.csv:

routeset_name,priority
to_pbx,2

After generating the route we can see it with a priority of 2

We also have a static route (Priority 100) to match whatever does not match routeset_0:

V0r7WodNrRmb41YE

Currently when we test a inbound call with the “called” parameter matching the DID in the csv file we uploaded, the static route with a much higher priority always wins and it should match the generated route from the routeset.

In the CDR we can see a match for both routes.

Currently only enabled scripts are:

base_routing.rb
forward_sip_domain.rb
priority_and_weight_load_balancer.rb
routesets_routing.rb
simple_routing_sbc.rb
sips_routing.rb

Thanks

Hello hd99,

A couple of things we can start with right away. Your routeset doesn’t look correct to me.

called,calling,routeset_name
441214681658,to_pbx

Should look more like this:

called,calling,routeset_name
441214681658,,to_pbx

also just to make another note:

The priority field, lowest value has highest priority. 1 is the highest priority.
For load sharing, when priority is equal, calls will be distributed according to the weight field. When using 100 / 50, calls will be sent twice as much to the first route than the second.

Let me know if this change in your routeset works, and if you are still having problems you can upload your tbreport directly to me.

dpuckett@telcobridges.com

Cheers,
Support

Hi Dave,

I saw that too, I tried to edit the post on this thread when I originally submitted to add a extra “,” but it wont let me.

Also we are not using weight, only priority. Routeset has value of 2 assigned and the static route has a value of 100.

I have just sent you my tbreport.

Thank you

Hello Henry,

I recieved your tbreport, thank you. I will load this up in my lab environment today and have a look at your configuration.

Cheers,
Support

Hi Henry,

I think this issue is due to the fact your
def_cidari.csv (37 Bytes) file had a strange error. I have eddited it for you. Update this file with the existing one and test it.

Testing Script:

$trace_level = 2 

@call_params = {
  :calling => '01384981063', 
  :called  => '441214681658', # The DID from your CSV
  :nap     => 'Bandwidth_in'  # The inbound entry point
}

@nap_list = [
  {:availability_percent=>"100", :name=>"Bandwidth_in"}, 
  {:availability_percent=>"100", :name=>"Cidari_IN"}, 
  {:availability_percent=>"100", :name=>"Hetz_dev_fs"}
]

My output test appears to be working correctly now.

Let me know if that works for you.

Cheers,
Dave

Hi Dave,

Yeah that now works thanks! what was the error in the file.

Also, inside the route, hovering over “Routeset Name” it says “Adds static route to the routeset with this name. (Used only when routeset_routing script is enabled”.

If I enable the script the calls default again back to Hetz_DEV_FS NAP.

When should that script be used? currently disabled it works as simply priority/weight is being taken into account with the Simple Routing script.

Thanks!

Hi Henry,

Sorry for the late reply; it’s been a busy week. :slight_smile:

Oh, I think I overwrote the original file. :slight_smile: There were simply garbage characters in front of the routeset name on the first line.

I believe you need to choose whether you want to use the simple logic with routesets or invoke route scripting, which will change how the call router treats each incoming and outgoing call.

Let me give you a link so you can do a deeper dive into our routing scripts: Routing script tutorial - TB Wiki

-Support