Current Publication | x
Close

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. Its structure is a series of rules that read from left to right. Each digit map is composed of one or more rules surrounded by parentheses ( ). These parentheses MUST NOT be omitted.

Your phone applies the first rule that matches the format of the dialed number, so it’s important you get your rule order correct.

A digit map is a group of rules written in the following fashion:

Digit Map = ( rule | rule | rule | rule | rule)

A vertical bar | separates each rule. Once again, the digit map must include the parentheses ( ), or your phone won’t read the entered text as a digit map.

You can include “white space” within your digit map rule to make it more readable. Your phone ignores the spaces when reading the rules in the digit map. This helps 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)

The syntax used in this example is discussed later.

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 your 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 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 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 (according to the NANP), create the following rule from literals:

12125557722 or 1 212 555 7722 — spaces can 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 matt@sipservice.com, include ‘ ‘ to surround the address, because the address includes reserved characters. Write your matching rule as:

‘matt@sipservice.com’


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 that explicitly matches digits at the start of the number followed by any sequence of digits of a defined, fixed length. When dialing a number in the Dalton, Georgia area code of 706 from within North America, we would dial 1 706 then the following 7 digits of the number, as such we would write our matching rule as follows:

1 706 xxx xxxx



.

. Matching Function

The “full stop” or “dot” - . - matching function matches 0 or more of the previous element, such as x, X or @.

It’s typically used to capture a string of entered numbers or characters of arbitrary length.

Example:

The expression xx. would catch any number that is entered with 1 or more digits. Although we have used two x’s in our rule, the dot implies 0 or more x, so in the event of 0*x the rule xx. caters for a single digit number being entered. Let’s say we want to match any international numbers dialed to New Zealand (country code 64) but don’t want to define all the possibilities of the NZ number plan within our digit map. In this case we can write one of the following rules:

011 64 xx.        Using US international dialing notation

0011 64 xx.     Using Australian international dialing notation

00 64 xx.          Using Standardized international dialing notation


[   ]

Set

“Square brackets” – [ ] – enclose a set of numerals and/or characters that are used to match a single digit or character.

It’s useful to use a set to match specific digits that form part of a number. Alphanumeric and wildcard characters are allowed inside a set, such as [x], [X#], [@#], [a-zA-Zx] .

Example:

Let’s look at specifically matching the numbers 1,2,5,6,7 and 8. We can write this set as [125-8] where we have specified the digits 1 and 2, then written the numbers 5,6,7,8 as the sequence 5-8. To put this into context, let’s look at the London number range where each number can take the form of 020 3xxx xxxx, 020 7xxx xxxx, or 020 8xxx xxxx – while we could write each of these as individual rules, it is tidier to represent them as follows:

020 [378]xxx xxxx


[^    ]

Exclusion Set

An exclusion set includes a leading caret, or “hat”, within a set of “square brackets” - [^ ] .

An exclusion set matches any single alphanumeric character that is not within the set.

Example:

To match any arbitrarily long sequence of digits that does not start with * , write your matching rule as follows:

[^*]xx.

In the case of Sydney, Australia, local numbers are 8 digits long, starting with any digit between 3 and 9. We could write this rule as [3-9]xxx xxxx or using an exclusion set we could write:

[^0-2]xxx xxxx


!

! Call Bar

To bar users from calling numbers that match a rule, add an “exclamation mark” - ! - in front of that rule in the digit map. The rule is then referred to as a barring rule.

Example:

To bar all calls to 1900 numbers (regardless of length), use the following rule:

!1900xx.


< elements : literals >

Element to Literal Transformation

An element-to-literal transformation allows substituting the digit sequence matching elements with the given literals. The expression is contained within a set of “pointy brackets” - < > - and elements are separated from literals using a colon:

Usage Notes:

Single quote ‘ ‘ syntax is NOT needed or allowed for the literals in this context. Special characters may be used here as they do not apply in this context either.

Elements can be empty, in which case the colon - : - can be omitted. This case is useful for inserting some extra digits in certain part of the dialed digits.

The literals part can be empty also, but the colon - : - MUST NOT be omitted. This case is useful for removing part of the dialed digits. Elements and literals MUST NOT both be empty.

Example:

Use this rule to remove digits from a dialed number, add digits to a dialed number, or transform a dialed number. To transform one number into another, for example to transform the entered digits of 112 to send out 000, write:

<112:000> Take 112 and replace it with 000.

Next, strip off preceding digits in a number. In this case, if you dial 02 xxxx xxxx, this rule sends on just the xxxx xxxx without the 02:

<02:>xxxx xxxx Take 02, replace it with nothing, then match the next 8 digits.

To add to the start of a dialed number, for example to add 02 to the start of an 8-digit number, write:

<02>xxxx xxxx   or <:02>xxxx xxxx


S, S0, S1 … S9

Digit Timer

The digit timer should only be used either as the first element of a rule (for a hot or warm line implementation) or as the last element of a rule as a means of overriding the default inter-digit timer. The digit timer – S – is case-sensitive.

Example:

The notation S0, S1, S2, S9 gives digit timer values of 0, 1, 2 and 9 seconds respectively. S is equivalent to S1 (1 second). S0 is the same as “blank”. You can concatenate multiple S elements together if you need more than 9 seconds timeout, such as S9S5 for a 14-second timeout. To create a hotline to the number 1-408-890-6000 we would write:

<S0:14088906000>

The next two elements, (map) and (Mlabel), imply that the phone digit maps are recursive. Recursive digit maps allow digit maps to be reused and make their specification more compact and readable. It is important that you do not specify digit maps that lead to infinite recursion. For example, a digit map must not include a named embedded digit map that references itself.


(map)

Embedded Digit Map

An embedded digit map contains elements within a pair of brackets – ( ) – that are used to match subsequent digits.

Example:

To match any number that starts with *74, followed by 1 or 2 digits we would write our matching rule as follows:

*74(x|xx)


(Mlabel)

Named Embedded Digit Map

A named embedded digit map is used for matching subsequent digits, where label refers to one of abbreviated terminal names or a user-defined digit map label. As an example, (Msp1) refers directly to the digit map contained within Voice Services > SP1 Service of the phone’s native web portal.

Example:

Let’s consider one of the phone’s default digit map rules that directs a call preceded by **2 to SP2. We want to take all the digits after **2 to be matched with SP2’s digit map. To do this we write our rule as:

**2(Msp2)

The following advanced elements allow you to further compact your rules for more elegant digit map syntax:


X

X Wildcard

The “uppercase x” – X – wildcard matches any digit from 0-9 as well as * making it useful for use digit maps that include star codes. It is important to note that X is case-sensitive.

Usage Notes:

X is equivalent to [x*] or [0-9*x]

Example:

To catch all three digit numbers including star codes, write your matching rule as follows:

XXX


@

@ Wildcard

The “at symbol” - @ - wildcard matches any alphanumeric character except #.

Example:

To match any arbitrarily long alphanumeric sequence (except #) that does not start with * we would write our matching rule as follows:

[^*]@@.


?

? Matching Function

The “question mark” - ? - matching function matches zero or one of the previous element, such as x, X or @.

This function can be used to capture a string of entered numbers or characters of multiple known fixed lengths.

Example:

The expression xxxx? matches any entered number that is either 3 or 4 digits in length. Let’s say we live in an area where local numbers vary in length. This example uses the Brampton area in the UK that has 4- and 5-digit local numbers. Rather than using two rules in our digit map such as (…|xxxx|xxxxx|…) to match the local numbers, you can write a more elegant matching rule as follows:

xxxxx?

Digit Map Rule Examples

Here are some further examples of digit map rules:

Digit Map Rules

Function

Digit Map Rule

Match any 11-digit number starting with 1-408.
1 408 xxx xxxx
Match any 7-digit number and prepend 1408 to the number when making the call.
<1408> xxx xxxx 
or <:1408> xxx xxxx
Match any number that starts with 011 followed by one or more digits.
011xx.
Add ‘+’ to any 11-digit number that starts with 1.
<+>1xxxxxxxxxx
Match any number that starts with **1 020 3, 7 or 8 followed by 7 digits and remove the **1 prefix when making the call.
<**1:>020 [378]xxx xxxx
Create a hotline to 1234.
<:1234> or <S0:1234>
Create a warm line to 1234 that is called if the user doesn’t enter any digits within 4 seconds.
<S4:1234>
Match any number with at least 8 digits that ends with 8537683, such as
1 510 853 7683, 9 853 7683.
xx.853 7683
Match any number with at least 10 digits that ends in 408-890-6000, such as 1 408 890 6000, 001 408 890 6000, +1 408 890 6000.
@. 408 890 6000
Add a # to the end of any number with 1 or more digits.
xx.<#>
Bar calls to premium rate numbers beginning with 084, 087, and 09.
!08[47]x. and !09x.

Now we can create an example digit map using a few of the rules above. One important function of a digit map is to determine if the user has entered sufficient digits during dialing, given the array of number combinations available, a digit map normally contains more than one rule. To create a digit map that includes a few of the example rules in the table, we write our digit map enclosed in parentheses ( ) and with each rule separated by a | bar as follows:

(<1408> xxx xxxx | @. 408 890 6000 | xx.<#> | !08[47]x. | !09x.)

Spaces can be used in the digit map. It is fine to include spaces to help make your digit map more readable.

Matching Against Multiple Rules in Digit Map

One important function of a digit map is to determine if sufficient digits have been entered by the user during dialing. A digit map normally contains more than one rule. The Digit Map Processor (DMP) must return the best matched rule at some point, or declare the input digit sequence is invalid. The DMP keeps refining its decision as each digit is entered until it reaches a final decision, or is forced to make a timely decision when the interdigit timer expires.

The DMP restarts the interdigit timer on every newly entered digit. The duration of this timer can be either long or short. By default, the long and the short timer values are set to 10 seconds and 2 seconds, and are configurable under the Phone Settings group via the DigitMapLongTimer and DigitMapShortTimer parameters respectively. Whether to use the long or short interdigit timer depends on the current rule matching states. The DMP maintains a matching state for each rule in the digit map as it processes each input digit. The following states are defined:

Partially Matched (PM) – The rule partially matches the accumulated input sequence. Initially all rules are in this state before any digit is entered. Rules in this state have the potential of becoming EM or IM as more digits are entered. Example: 1234 partially matches the rules xxxxxxx, 1xxxx, 1234567, <123:>xxxx.

Exactly Matched (EM) – The rule exactly matches the accumulated input sequence. However, any further input digit turns this rule into the MM state. Example: 1234 exactly matches the rules xxxx, 1234, 1xxx, <123:5678>x

Indefinitely Matched (IM) – The rule matches the accumulated input sequence indefinitely, with a variable length such that the rule can potentially stay as IM as more matching digits are entered. Example: 011853 indefinitely matches the rules xx., 011xx., <011:>xx.

Mismatch (MM) – The rule does not match the accumulated input sequence. This state doesn’t change as more digits are entered. Example: 1234 mismatches the rules 123, 1xx, 12345

Rules in the EM or IM state are candidates to be selected by the DMP. After processing a new digit, the DMP returns a final decision if either of the following conditions holds:

All rules are in the MM state. DMP returns an error.

One or more rules are in the EM state with no rules in the IM state. DMP returns the best matched EM rule. If the best matched rule is a barring rule, DMP returns an error instead.

Otherwise, the DMP starts the short interdigit timer if there is at least one rule in the EM state, or else the long one. When the interdigit timer expires, the DMP makes a timely decision by returning the best matched rule at that moment if one is found, or else a timeout error. Again if the best matched rule in this case is a barring rule, the DMP returns an error instead.

 

The timer to wait for the first input digit is NOT governed by the interdigit timer, but the duration of dial tone being played and could be a lot lengthier than the long interdigit timer.

The best-matched rule is the one that has the most specific literals matching the input digit sequence. For example, the input sequence 1234 matches the rule 123x better than 1xxx. On the other hand, an EM rule is always selected over an IM rule.

Finally, the default interdigit timer can be overridden by appending the Sn element at the end of the rule where n = 0–9 designating the number of seconds to wait before triggering the rule with a timer event.

Here are some more examples:

Consider the simple digit map ( <1408>xxx xxxx). As soon as 7 digits are entered, the DMP returns a complete number by prepending the accumulated digits with 1408.

Consider another simple map (xx.). After the user dials one or more digits, the DMP returns the accumulated digits as a complete number when the long interdigit timer expires.

If we combine the last two maps into one: (xx. | <1408>xxx xxxx). After the user dials 1 or more digits but fewer than 7 digits, the DMP returns the accumulated digits as a complete number when the (long) interdigit timer expires. As soon as 7 digits are entered, the DMP returns 1408 followed by the accumulated 7-digits when the (short) interdigit expires. On the 8th digit and beyond, however, the DMP considers the first rule only, and returns the accumulated digits as-is when the (long) interdigit timer expires.

Now add an S4 timer to the second rule: (xx. | <1408>xxx xxxxS4). In this case, the DMP behaves exactly the same as the last, except that the short interdigit timer the DMP uses upon receiving the seventh digit is overridden by a 4-second timer. Hence, the user has as long as 4 seconds instead of 2 to dial the eighth digit.

Forcing Interdigit Timeout With The Hash/Pound (#) Key

When dialing, you can force an interdigit timeout with a # key instead of waiting for the DMP to timeout its own long or short timer. This is allowed as long as the # key does not match the current element of any PM rules. Otherwise, the # key is consumed by the DMP instead of triggering a timeout.

Consider the digit map (33xx.). If the user enters 333#, the DMP returns immediately with the number 333.

Now consider the digit map (33xx.|333#1234x.). If the user enters 333#, the DMP doesn’t return, but continues to wait for further input or its interdigit timer to expire.

 

The first rule “33xx.” is now in the MM state since the digit # does not match “x”. You can continue to enter 1234#, or 1234 and wait for a long interdigit timeout for the DMP to successfully return 333#1234.

Invoke Second Dial Tone in Digit Map

You can tell the phone to start a tone after a certain pattern of digits have been dialed by specifying the element {t=<tone>} within a digit map, where <tone> is a 1- to 3-letter name of the tone to play. The tone stops when the next digit is entered. For example:

(**1{t=di2}(Msp)|**8{t=od}(Msp4))

tells the device to play Second Dial Tone when **1 is dialed, or play Outside Dial Tone when **8 is dialed.

Here is a full list of acceptable (case insensitive) values of <tone>:

bu = Busy Tone

cf = Call Forwarded Dial Tone

cm = Confirmation Tone

co = Conference Tone

cw1 – cw10 = Call Waiting Tone 1 through10, respectively

di = Dial Tone

di2 = Second Dial Tone

fb = Fast Busy Tone

ho = Holding Tone

od = Outside Dial Tone

pr = Prompt Tone

rb = Ringback Tone

ro = Reorder Tone (same as fast busy)

si1 – si4 = SIT TONE 1 – 4, respectively

st = Stutter Tone

0 – 9, *, #, a – d = DTMF 0 – 9, *, #, A – D, respectively

Change Interdigit Long Timer Dynamically After Partial Match

Your phone starts off with the interdigit long timer set to the configured DigitMapLongTimer value when processing a new digit sequence by a digit map. You may change the long timer as some patterns are partially matched by embedding the syntax {L=<time>} within a rule in the digit map, where <time> is the desired number of seconds for the long timer.

For example: (011 853 xxxx xxxx{L=5}x. |xx.). Here the long timer is shortened to 5 seconds after the user has entered 011 853 + 8 digits. Hence, your phone declares that a complete number is collected in 5 seconds when no more digits are received. Without the {L=5} syntax, you have to wait for 10 seconds (by default) for the same to happen.

User-defined Digit Maps

There are 10 user definable digit maps available under the User Settings – User Defined Digit Maps section of the device configuration web page. These digit maps are referred to as User Defined Digit Map 1 to 10. Each user-defined digit map is specified with 2 parameters:

Label: An arbitrary string for referencing this digit map in other digit map specification. The value should be 2 to 16 characters long. For example, “friends”. In this case, (Mfriends) can be referenced in other digit maps, such as Phone Settings::DigitMap

DigitMap

By default both parameters are empty, except for User Defined Digit Map 1 (see below).

A User-defined Digit Map For IPv4 Dialing

The default values of the parameters for User Defined Digit Map 1 are set the following values to support IPv4 dialing:

Label = ipd

Digit Map = (xx.<*:@>xx?x?<*:.>xx?x?<*:.>xx?x?<*:.>xx?x?|

xx.<*:@>xx?x?<*:.>xx?x?<*:.>xx?x?<*:.>xx?x?<*::>xx?x?x?x?)

The map (Mipd) is referenced in the default setting of the DigitMap in ITSP Profile A and B. It supports the following two forms of IPv4 dialing:

<user-id>*<a>*<b>*<c>*<d>

<user-id>*<a>*<b>*<c>*<d>*<port>

where <user-id> is an arbitrary length numeric user-id, such as 100345, <port> is a port number in the range 0–65535, and each of <a>,<b>,<c>,<d> is a 1- to 3-digit pattern in the range 1–255 that identifies one byte of an IP address. The dialed number is translated into <user-id>@<a>.<b>.<c>.<d> and <user-id>@<a>.<b>.<c>.<d>:<port>, respectively. Here are some examples:

1234*192*168*15*113  maps to 1234@192.168.15.113

123456*192*168*15*180*5061 maps to 123456@192.168.15.180:5061

Related Topics

Machine Translation

You are cautioned that the translation of this document is generated by a machine; therefore, the translated document may have errors and be inconsistent with the original English language version of the document.

The English language version of this document shall be considered the governing document related to the Polycom product.

If there is any contradiction between the English language version of the document and the translated version of the document, the English language version of the document shall take precedence.

The translation is provided for your convenience only. Neither Google nor Polycom shall be responsible for translated content or for the performance of the translation tool. If you require further assistance on non-translation issues, please contact Polycom support.

Translated documents are not available in PDF format.