Feedback

  • Contents
 

Defining phone number input conversion

Rather than hard-code a list of phone numbers to look up in a table, you can generalize different types of phone numbers by matching the dialed input with number patterns, which consist of combinations of variables and dialable digits. These variables are often referred to as wildcard characters because each kind of wildcard character can represent a different range of numbers. Consider the following simple examples:

  • A common way to represent a three-digit internal phone number (for example, 113) is XXX, where X represents a single digit in the range of 0 through 9. In this case, XXX could represent any number in the range of 000 through 999.

  • To represent any local seven-digit phone number in the North American Numbering Plan (NANP), you could use Nxxxxxx, where N represents a single digit in the range of 2 through 9 (since local phone numbers do not start with 1 or 0). The number 8723000 would match this pattern.

  • To represent a 10-digit long distance phone number including a three-digit area code, you could use NxxNxxxxxx. For now, area codes in the NANP do not begin with 1 or 0, so N is appropriate for the first character for the area code. The number 3178723000 would match this number.

Using a pattern table, you can essentially define a set of rules for recognizing different kinds of phone numbers as they are dialed.

Before CIC attempts to match the input with a pattern, it strips the input of any formatting characters such as spaces, dashes, and parentheses. CIC then starts at the top of the list and attempts to match a stripped down version of the dialed number with the input patterns in the table.

When CIC matches the dialed phone number with a pattern (Input Pattern), it defines an Output Pattern, as seen on the Input Conversion Page. The Output Pattern is then used by the Input Pattern of the Dial Plan Object.

If a number is dialed that doesn't match any of the predefined patterns, that number is passed straight through and dialed exactly as it was entered. Normally, this should not happen since the phone number patterns in the Input Conversion table can easily accommodate any kind of phone number.

The Input Conversion table matches dialed input with a pattern and converts it to an Output Pattern.


Note:
We refer to the first Nxx in a long distance number as the area code, the Nxx in a local number as the exchange, and the last four primary digits of a phone number ( xxxx) as the local number. In telephony circles, these terms are synonymous with Numbering Plan Area (NPA), Exchange, and Station ID, respectively.

CIC's input conversion to an Output Pattern improves efficiency in handling phone numbers. The main reason for converting dialed input into an Output Pattern is to simplify Dial Plan processing. The Output Pattern of the phone number serves as the starting point—or Input Pattern—for Dial Plan processing.

For example, in the NANP, there are several ways to dial directory assistance, and all of them can end up dialing the same number.

In the above case, the Dial Plan output ends up being 1411 for all five types of user input on the left. Since the Dial Plan only has to process 1411 instead of five variations of this number, using a standard Output Pattern greatly simplifies the Dial Plan processing.

In another example, the local phone number 8723000, in area code 317, could be dialed in at least three different ways; each type of input would match a different input pattern:

Dialed Number Input

Matching Input Pattern

8723000

Nxxxxxx

3178723000

317Nxxxxxx (instead of NxxNxxxxxx, which would be a long distance number)

13178723000

1317Nxxxxxx

Since the Dial Plan handles all local phone numbers the same way, all three kinds of input are standardized to the same Output Pattern, as shown below (Note: The + prefix and the Z variable are explained later):

Input Pattern (for local numbers)

Output Pattern (for local numbers)

NxxxxxxZ

+1317NxxxxxxZ

317NxxxxxxZ

+1317NxxxxxxZ

1317NxxxxxxZ

+1317NxxxxxxZ

But what if the number dialed as 1317Nxxxxxx is a long distance number within the area code? That case, and many others, is controlled on the Dial Plan page, which is discussed in Creating dial plans.

Some special case phone numbers are unique and don't need to be matched with a variable pattern or converted into a different format, such as the 1411 directory assistance example discussed earlier. Some phone numbers have a higher priority than other phone numbers. For example, emergency phone numbers, like 911 in North America, should be passed to the emergency center immediately. Other phone numbers, such as 0 (zero) for the internal Operator, or 00 for a CO Operator, may deserve lower priority, and some numbers may be passed through CIC to the CO after a quick match is found in the pattern table. The order in which you list input pattern names on the Input Conversion Object Names list box determines the priority in which CIC evaluates a dialed number. The first pattern that matches the input is used for the standard conversion format.