Explaining the Different Dial Plans

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.

Getting to Know Interdigit Long Timer

The Interdigit_Long Timer specifies the default maximum time (in seconds) allowed between dialed digits, when no candidate digit sequence is as yet complete.

Getting to Know Interdigit Short Timer

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.

Getting to know Dial Plan[1] and Dial Plan[2]

The Dial_Plan parameters contain the actual dial plan scripts for each of lines 1 and 2.

Getting to Know 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, or 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.

Getting to Know 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’)
    • Numeric ranges are allowed within the brackets: digit ‘-‘ digit (e.g. [2-9] means ‘2’ or ‘3’ or … or ‘9’)
    • Ranges can be combined with other keys: e.g. [235-8*] means ‘2’ or ‘3’ or ‘5’ or ‘6’ or ‘7’ or ‘8’ or ‘*’.

Getting to Know 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.

Getting to Know Subsequence Substitution
A subsequence of keys (possibly empty) can be automatically replaced with a different subsequence using an angle bracket notation ‘’. For example “xxxxxxx” would match “85551212” and transmit “16505551212”.

Getting to Know 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.

Getting to Know 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.

Getting to Know 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 ‘,’

NOTE: The “L=8,( . . . )” would set the interdigit long timeout to 8 seconds for the line associated with this dial plan. The “L:8,S:4,( . . . )” would override both the long and the short timeout values.

Getting to Know 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 ‘ ‘ with the terminating space character. The specified delay-value is measured in seconds. To change the short timer override, use ‘S’ delay-value .

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 .  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.

Getting to Know 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.

The following also allows seven-digit US-style dialing, and automatically inserts a 1 + 212 (local area code) in the transmitted number.

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.

The following allows only placing international calls (011 call), with an arbitrary number of digits past a required five-digit minimum, and also allows calling an international call operator (00).  In addition, it lengthens the default short interdigit timeout to four seconds.

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).

The following allows US-style long distance, but blocks 9xx area codes.

The following allows arbitrary long distance dialing, but explicitly blocks the 947 area code.

The following implements a Hot Line phone, which automatically calls 1 212 5551234.

The following provides a Warm Line to a local office operator (1000) after five seconds, unless a four-digit extension is dialed by the user.

Dial Plan Breakdown

A general Dial plan looks like (assume the numbers are subscripts)

(c1|c2|...)

is basically a substitution syntax for stuff dialed at the beginning of the dial plan. This is an optional part of the plan.

Some examples include:

  • Replace a dialed "8" with "1415" (e.g. if user dials 84286511, we send 14154286511).
  • Insert a "1415" into the number dialed
  • When a 9 is dialed, present a second dialtone. The "9" is not sent.
  • If an initial 9 is dialed, don't send it.

c is a string of characters that restricts what digits can be dialed. This is a required part of the plan.

These characters can be:

  • * means the star (asterisk) key
  • # means the pound (hash) key
  • x means a single digit (0 through 9)
  • [x-y] means any digits x through y.
  • [xy] means the digits x and y (can put any number of digits here)
  • . means repeat the previously listed digit type zero or more times. For example x. means "zero or more digits," xx. means "one or more digits."
  • S0 is usually used at the end of a dial plan string that says "immediately dial when matched." Used for things like 911.
  • ! is used at the end of the dial plan and it means "immediately reject the number dialed." Used to block, say, 900 numbers.

A few examples:

  • [2-9]xxxxxx matches typical 7-digit dialing in the US;
  • 011xx. matches North American style International dialing (011 followed by one or more digits);
  • [49]11S0 matches either 411 or 911 and immediately dials (doesn't wait for digit timeout).

 

Was this support article useful?

Additional Support Questions?
Search Again