6. Appendix I: Dial Plan
The SPA allows each line to be configured with a distinct dial plan. The dial plan specifies how to interpret digit sequences dialed by the user, and how to convert those sequences into an outbound dial string.
The SPA syntax for the dial plan closely resembles the corresponding syntax specified by MGCP and MEGACO. Some extensions are added that are useful in an end-point.
The dial plan functionality is regulated by the following configurable parameters:
• Interdigit_Long_Timer
• Interdigit_Short_Timer
• Dial_Plan ([1] and [2])
Other timers are configurable via parameters, but do not directly pertain to the dial plan itself. They are discussed elsewhere in this document.
Interdigit Long Timer:
ParName: Interdigit_Long_Timer
Default: 10
The Interdigit_Long_Timer specifies the default maximum time (in seconds) allowed between dialed digits, when no candidate digit sequence is as yet complete (see discussion of Dial_Plan parameter for an explanation of candidate digit sequences).
Interdigit Short Timer:
ParName: Interdigit_Short_Timer
Default: 3
The Interdigit_Short_Timer specifies the default maximum time (in seconds) allowed between dialed digits, when at least one candidate digit sequence is complete as dialed (see discussion of Dial_Plan parameter for an explanation of candidate digit sequences).
Dial Plan[1] and Dial Plan[2]:
ParName: Dial_Plan[1] and Dial_Plan[2]
Default: ( *xx | [3469]11 | 0 | 00 | <:1408>[2-9]xxxxxx | 1[2-9]xx[2-9]xxxxxx | 011x. )
The Dial_Plan parameters contain the actual dial plan scripts for each of lines 1 and 2.
Dial Plan Digit Sequences:
The plans contain a series of digit sequences, separated by the ‘|’ character. The collection of sequences is enclosed in parentheses, ‘(‘ and ‘)’.
When a user dials a series of digits, each sequence in the dial plan is tested as a possible match. The matching sequences form a set of candidate digit sequences. As more digits are entered by the user, the set of candidates diminishes until only one or none are valid.
Any one of a set of terminating events triggers the SPA to either accept the user-dialed sequence, and transmit it to initiate a call, or else reject it as invalid. The terminating events are:
• No candidate sequences remain: the number is rejected.
• Only one candidate sequence remains, and it has been matched completely: the number is accepted and transmitted after any transformations indicated by the dial plan, unless the sequence is barred by the dial plan (barring is discussed later), in which case the number is rejected.
• A timeout occurs: the digit sequence is accepted and transmitted as dialed if incomplete, or transformed as per the dial plan if complete.
• An explicit ‘send’ (user presses the ‘#’ key): the digit sequence is accepted and transmitted as dialed if incomplete, or transformed as per the dial plan if complete.
The timeout duration depends on the matching state. If no candidate sequences are as yet complete (as dialed), the Interdigit_Long_Timeout applies. If a candidate sequence is complete, but there exists one or more incomplete candidates, then the Interdigit_Short_Timeout applies.
White space is ignored, and may be used for readability.
Digit Sequence Syntax:
Each digit sequence within the dial plan consists of a series of elements, which are individually matched to the keys pressed by the user. Elements can be one of the following:
• Individual keys ‘0’, ‘1’, ‘2’ . . . ‘9’, ‘*’, ‘#’.
• The letter ‘x’ matches any one numeric digit (‘0’ .. ‘9’)
• A subset of keys within brackets (allows ranges): ‘[‘ set ‘]’ (e.g. [389] means ‘3’ or ‘8’ or ‘9’) o Numeric ranges are allowed within the brackets: digit ‘-‘ digit (e.g. [2-9] means ‘2’ or ‘3’ or
… or ‘9’) o Ranges can be combined with other keys: e.g. [235-8*] means ‘2’ or ‘3’ or ‘5’ or ‘6’ or ‘7’ or ‘8’ or ‘*’.
Element repetition:
Any element can be repeated zero or more times by appending a period (‘.’ character) to the element. Hence, “01.” matches “0”, “01”, “011”, “0111”, … etc.
Subsequence Substitution:
A subsequence of keys (possibly empty) can be automatically replaced with a different subsequence using an angle bracket notation: ‘<’ dialed-subsequence ‘:’ transmitted-subsequence ‘>’. So, for example, “<8:1650>xxxxxxx” would match “85551212” and transmit “16505551212”.
Intersequence Tones:
An “outside line” dial tone can be generated within a sequence by appending a ‘,’ character between digits. Thus, the sequence “9, 1xxxxxxxxxx” sounds an “outside line” dial tone after the user presses ‘9’, until the ‘1’ is pressed.
Number Barring:
A sequence can be barred (rejected) by placing a ‘!’ character at the end of the sequence. Thus, “1900xxxxxxx!” automatically rejects all 900 area code numbers from being dialed.
Interdigit Timer Master Override:
The long and short interdigit timers can be changed in the dial plan (affecting a specific line) by preceding the entire plan with the following syntax:
• Long interdigit timer: ‘L’ ‘:’ delay-value ‘,’
• Short interdigit timer: ‘S’ ‘:’ delay-value ‘,’
Thus, “L=8,( . . . )” would set the interdigit long timeout to 8 seconds for the line associated with this dial plan. And, “L:8,S:4,( . . . )” would override both the long and the short timeout values.
Local Timer Overrides:
The long and short timeout values can be changed for a particular sequence starting at a particular point in the sequence. The syntax for long timer override is: ‘L’ delay-value ‘ ‘. Note the terminating space character. The specified delay-value is measured in seconds. Similarly, to change the short timer override, use: ‘S’ delay-value <space>.
Pause:
A sequence may require an explicit pause of some duration before continuing to dial digits, in order for the sequence to match. The syntax for this is similar to the timer override syntax: ‘P’ delay-value <space>. The delay-value is measured in seconds.
This syntax allows for the implementation of Hot-Line and Warm-Line services. To achieve this, one sequence in the plan must start with a pause, with a 0 delay for a Hot Line, and a non-zero delay for a Warm Line.
Implicit sequences:
The SPA implicitly appends the vertical code sequences entered in the Regional parameter settings to the end of the dial plan for both line 1 and line 2. Likewise, if Enable_IP_Dialing is enabled, then ip dialing is also accepted on the associated line.
Examples:
The following dial plan accepts only US-style 1 + area-code + local-number, with no restrictions on the area code and number.
( 1 xxx xxxxxxx )
The following also allows 7-digit US-style dialing, and automatically inserts a 1 + 212 (local area code) in the transmitted number.
( 1 xxx xxxxxxx | <:1212> xxxxxxx )
For an office environment, the following plan requires a user to dial 8 as a prefix for local calls and 9 as a prefix for long distance. In either case, an “outside line” tone is played after the initial 8 or 9, and neither prefix is transmitted when initiating the call.
( <9,:> 1 xxx xxxxxxx | <8,:1212> xxxxxxx )
The following allows only placing international calls (011 call), with an arbitrary number of digits past a required 5 digit minimum, and also allows calling an international call operator (00). In addition, it lengthens the default short interdigit timeout to 4 seconds.
S:4, ( 00 | 011 xxxxx x. )
The following allows only US-style 1 + area-code + local-number, but disallows area codes and local numbers starting with 0 or 1. It also allows 411, 911, and operator calls (0).
( 0 | [49]11 | 1 [2-9]xx [2-9]xxxxxx )
The following allows US-style long distance, but blocks 9xx area codes.
( 1 [2-8]xx [2-9]xxxxxx )
The following allows arbitrary long distance dialing, but explicitly blocks the 947 area code.
( 1 947 xxxxxxx ! | 1 xxx xxxxxxx )
The following implements a Hot Line phone, which automatically calls 1 212 5551234.
( S0 <:12125551234> )
The following provides a Warm Line to a local office operator (1000) after 5 seconds, unless a 4 digit extension is dialed by the user.
( P5 <:1000> | xxxx ) |