Resolving to the Longest Match in the User Database
The Oracle Enterprise Communications Broker (ECB) user database supports resolution of overlapping numbers during lookups by selecting entries with the longest matches.
Flexibility in creating user database records allows for overlapping records, which can create ambiguity when the ECB looks for a match. To resolve such ambiguity, the ECB selects the entry that matches the most digits. As you build your user database, consider how you create user database entries to take advantage of flexible matching while preventing ambiguity.
The following table shows a set of overlapping user number entries in the Pattern column. The Match column shows the corresponding number of digits that must exactly match the pattern. Note that the match length does not include number ranges and wildcards.
Pattern | Match |
---|---|
17815551111 | 11 |
17815551[000-999] | 8 |
17815551[111-999] | 8 |
17815551xxx | 8 |
1781555(x)xxx | 7 |
xxxxxxxxxxx | 0 |
When performing a user database lookup, the system uses the entry that matches the pattern with the longest match length. The following table explains how different dialed numbers match the numbers configured in the user database. The Dialed Number column lists examples of dialed numbers. The Matching Pattern column lists the configured pattern to match. the Reason column explains how the match does or does not work.
Dialed Number | Matching Pattern | Reason |
---|---|---|
17815551111 | 17815551111 | This dialed number matches all patterns with an exact match and has the highest match length (11). |
17815551112 |
17815551[000-999] or 17815551[111-999] or 17815551xxx |
This dialed number matches all but the first pattern, but the three patterns have the longest match length of 8. When multiple entries have the same match length, the selection between them is undefined and causes an unsuccessful lookup due to the ambiguity. |
17815552111 | 1781555(x)xxx | This number matches only the last two patterns, but this pattern has a higher match length (7). |
22222222222 | xxxxxxxxxxx | This number matches only the last pattern. |