In the class org.mobicents.protocols.ss7.sccp.impl.router.RuleComparator
The function comapreLength.
if (digits1.length() == digits2.length()) { return 0;}
Because it return 0 then in some case, the rulesMap is not correct in order
example config: Test_sccprouter2.txt
The rule ID = 22 MUST be above the rule with ID = 2 because they have the same called digits = "326" and the rule ID = 22 has pattern calling digit, and in the rule ID = 2 is null. But with this Comparator, the rule with ID = 2 allway on top in this case
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Remove the condition digits1.length() == digits2.length() or just return digits1.compareTo(digits2)
Is this a BUG REPORT or FEATURE REQUEST?:
kind bug
What happened:
In the class org.mobicents.protocols.ss7.sccp.impl.router.RuleComparator
The function comapreLength.
if (digits1.length() == digits2.length()) { return 0;}
Because it return 0 then in some case, the rulesMap is not correct in order
example config: Test_sccprouter2.txt The rule ID = 22 MUST be above the rule with ID = 2 because they have the same called digits = "326" and the rule ID = 22 has pattern calling digit, and in the rule ID = 2 is null. But with this Comparator, the rule with ID = 2 allway on top in this case
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Remove the condition digits1.length() == digits2.length() or just return digits1.compareTo(digits2)
Anything else we need to know?:
Environment: