You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say we are translating a destination matching two dialplan rules, the first working on exact string match and the second working on regexp match: I'm getting selected the exact match rule ONLY IF its priority is bigger (>) than the regexp rule; the regexp rule is selected otherwise.
I would have expected the opposite behaviour.
I'm facing this issue on 1.11.5 version but, looking at the source code, the problem should be present also in 2.1.X.
In detail, I suppose that replacing this code snippet into the function "translate" (dp_repl.c):
/* pick the rule with lowest table index if both match and prio are equal */
if ((string_res | regexp_res) == 0) {
if (rulep->pr < rrulep->pr) {
rulep = rrulep;
with:
/* pick the rule with lowest table index if both match and prio are equal */
if ((string_res | regexp_res) == 0) {
if (rrulep->pr < rulep->pr) {
rulep = rrulep;