Routing challenge

Hi all,

I’ve got the following challenge, perhaps someone can help me with this.
Say we have a tag ‘Tag A’. And we want to add this tag upon same country origin/destination.
Thus from Dutch number to Dutch number, match if prefix of source and destination is 31.
If so, append ‘Tag A’.

For destination we have a mobile number (31612345678). This has a valid destination (316) with rates.
When looking for dialpeers yeti appears to search for a match with as much as possible digits in the prefix.

Thus say we have the following dialpeers, then Yeti in this case routes it over the more expensive route (also with the routing simulation);
Prefix, rate, tags

  1. 316, 0.02 EUR, Tag A + any tag
  2. 31612, 0.05 EUR, any tag

Thing is that I need to have route 2 available as ‘last resort’ option. Thus this route also includes the ‘any tag’ option.

How would I be able to tackle this? Any hints in the good direction?

I’ve thought about adding a ‘Tag B’ that would result in the more expensive route. However, this would make adding routing tags detection rather complex.

Would it be possible to set the priority of the Routing Tag Detection?
If I can make sure that tags are appended in a certain order, I would be able to resolve the issue quite easily.

For others having the same issue, it appears that the Routing Tags Detection rules are applied in order of creation.

You are wrong. Yeti applies only one most specific (with longest src/dst prefix) Routing Tags Detection rule for call.

Yeti will include to routeset only one route(with longest prefix and better tags) per vendor in 1.7 version and one route per vendor + routeset discriminator in 1.8 version. So your second dialpeer should be owned by different vendor. Also you don’t need tags to solve this.