RULE
Abstract
Rule check verify the validity of a number based on its length.
If a number matches our rules database, the call should be rejected.
Call blocking reason
SFR
Data example
rule.txt is a CSV file containing three columns
0041,17,7:8:12:13:14
Fields description
# | name | description | mandatory |
---|---|---|---|
1 | PREFIX | prefix for which the rule apply | YES |
2 | MAXIMUM LENGTH | Information This column is not relevant for the prefix verification. Prefix is included in the maximum length. | YES |
3 | INVALID SIZE | list of invalid size separated by the Colon “:” | NO |
Verification
Longest prefix match
If multiple rules matches the A_NUMBER the longest prefix match algorithm should be used to determine which rule to use.
Test data
00,19
0041,17,7:8:12:13:14
0039,17,12:14:16
0049,17
0086,18,6:12:13:14
008615,13,10:11
A_NUMBER | SIZE | PREFIXES | LONGEST | RULES | ACTION |
---|---|---|---|---|---|
008615000999 | 12 | 0086 008615 | 008615 | - | NEXT CHECK |
00861500099 | 11 | 0086 008615 | 008615 | match invalid size 11 | REJECT CALL |
0033655443322 | 13 | - | - | - | NEXT CHECK |
004999988855544430 | 18 | 0049 | 0049 | > max length 17 | REJECT CALL |
00319998887776665554 | 20 | 00 |
| > max length 19 | REJECT CALL |
Done !
If call is rejected there is no need to process the next check modules.
If call is not rejected next checks modules are processed.