Copyright 2010-2015 Obihai Technology, Inc.
158
Digit Map Configuration
A digit map can be used to match digits to ensure a complete number is dialed, transform dialed digits and block
numbers from being dialed. It is structured as a series of rules that are read from left to right. The OBi will apply the
first rule that matches the format of the dialed number, so it’s important you get your rule order correct. Each digit
map is composed of one or more rules surrounded by round brackets ( ) these brackets MUST NOT be omitted.
We can define a digit map as a group of rules written in the following fashion:
Digit Map = ( rule | rule | rule | rule | rule)
We use a vertical bar | to separate each rule. Once again, the digit map must include enclosing brackets ( ) or the
device will not read the entered text as a digit map.
You can include “white space” within your digit map rule to make it more readable - the OBi will ignore the spaces
when reading the rules in the digit map. This can help make it easier to read your rules. The following example shows
a rule to match phone numbers dialed to the London area code from within the United Kingdom:
(020[378]xxxxxxx)
is equivalent to
(020 [378]xxx xxxx)
We will cover the syntax used in this example further on.
Digit Map Elements
The digit map rule serves to match numbers based on the characteristics of the form and content the entered number
(or alphanumeric string, for example, when entering a SIP URI on the OBi IP Phone).
A rule is made up of a series of elements. Each element of the rule is matched from left to right in sequence with the
entered string of numbers (or characters).
The following series of tables detail all available elements with which to create a rule:
Any combination of:
0-9 * # + - A-Z a-z
Excluding:
m M s S x X
Literals
It matches digit sequences with exactly the same literals.
m, M, s, S, x, X which have special meaning in the digit map syntax. Use
literals to explicitly match a string.
Example:
To explicitly match the New York phone number 1-212-555-7722 as dialed from within North America
(ie according to the NANP) we would create the following rule from literals:
12125557722
or
1 212 555 7722
as spaces may be added for clarity
‘ ‘
‘Quoted Literals’
Everything inside a pair of single quotes is treated as a literal except for
the single quote ‘ character itself.
Example:
To explicitly match the SIP URI [email protected] we need to include ‘ ‘ as the address includes
reserved characters. We would write our matching rule as:
x
x Wildcard
The “lowercase x” – x – wildcard matches any digit from 0-9
It is important to note that x is CASE SENSITIVE.
Example:
If we consider phone numbers within a specific area code, all of the same length, we can write a rule