Cisco IOS Voice, Video, and Fax Configuration Guide, Release 12.2
Configuring Dial Plans, Dial Peers, and Digit Manipulation

Table Of Contents

Configuring Dial Plans, Dial Peers, and Digit Manipulation

Dial Plan Overview

Dial Peer Overview

Inbound and Outbound Dial Peers

Destination Pattern

Fixed- and Variable-Length Dial Plans

Session Target

Digit Stripping on Outbound POTS Dial Peers

Configuring Dial Peers

Configuring Dial Peers for Call Legs

Creating a Dial Peer Configuration Table

Configuring POTS Dial Peers

Configuring Dial Plan Options for POTS Dial Peers

Configuring VoIP Dial Peers

Configuring Codec Selection Order

Creating a Voice Class to Define Codec Selection Order

Applying Codec Selection Order to a VoIP Dial Peer

Configuring Dial Plan Options for VoIP Dial Peers

Configuring VoFR Dial Peers

Configuring VoATM Dial Peers

Verifying POTS and VoIP Dial Peer Configurations

Troubleshooting Tips

Dial Peer Overview

Two-Stage Dialing

Variable-Length Matching

Matching Inbound Dial Peers

Inbound Dial Peers for IVR Applications

Matching Outbound Dial Peers

Default Routes for Outbound Call Legs

Configuring Dial Peer Matching Features

Answer Address for VoIP

DID for POTS Dial Peers

Identifying Voice and Modem Calls

Hunt Groups and Preferences

Configuring Dial-Peer Hunting Options

Numbering Type Matching

Configuring Numbering-Type Matching

Class of Restrictions

Configuring Classes of Restrictions

Verifying Classes of Restrictions

Configuring Digit Manipulation

Digit Stripping and Prefixes

Forward Digits

Number Expansion

Creating a Number Expansion Table

Configuring Number Expansion

Verifying Number Expansion

Digit Translation Rules for VoIP

Configuring Digit Translation Rules

Creating Digit Translation Rules

Applying Translation Rules to Inbound POTS Calls

Applying Translation Rules to Inbound VoIP Calls

Applying Translation Rules to Outbound Call Legs

Verifying Digit Translation


Configuring Dial Plans, Dial Peers, and Digit Manipulation


This chapter describes how to implement dial plans by configuring dial peers and using dial peer matching and digit manipulation features. This chapter contains the following sections:

Dial Plan Overview

Configuring Dial Peers

Dial Peer Overview

Configuring Dial Peer Matching Features

Configuring Digit Manipulation

For a complete description of the commands used in this chapter, refer to the Cisco IOS Voice, Video, and Fax Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online.

To identify the hardware platform or software image information associated with a feature in this chapter, use the Feature Navigator on Cisco.com to search for information about the feature or refer to the software release notes for a specific release. For more information, see the "Identifying Supported Platforms" section in the "Using Cisco IOS Software" chapter.

Dial Plan Overview

A dial plan essentially describes the number and pattern of digits that a user dials to reach a particular telephone number. Access codes, area codes, specialized codes, and combinations of the number of digits dialed are all part of a dial plan. For instance, the North American Public Switched Telephone Network (PSTN) uses a 10-digit dial plan that includes a 3-digit area code and a 7-digit telephone number. Most PBXs support variable length dial plans that use 3 to 11 digits. Dial plans must comply with the telephone networks to which they connect. Only totally private voice networks that are not linked to the PSTN or to other PBXs can use any dial plan they choose.

Dial plans on Cisco routers are manually defined using dial peers. Dial peers are similar to static routes; they define where calls originate and terminate and what path the calls take through the network. Attributes within the dial peer determine which dialed digits the router collects and forwards to telephony devices.


Note If you are using Media Gateway Control Protocol (MGCP) or Simple Gateway Control Protocol (SGCP) on your call agent, you do not need to configure static dial peers. See the chapter "Configuring MGCP and Related Protocols" for more information.


The following sections provide an overview of basic dial peer concepts:

Dial Peer Overview

Inbound and Outbound Dial Peers

Destination Pattern

Fixed- and Variable-Length Dial Plans

Session Target

Digit Stripping on Outbound POTS Dial Peers


Note The illustrations and sample configurations in this section use VoIP; the same concepts also apply to Voice over Frame Relay (VoFR) and Voice over ATM (VoATM) networks.


Dial Peer Overview

Configuring dial peers is the key to setting up dial plans and implementing voice over a packet network. Dial peers are used to identify call source and destination endpoints and to define the characteristics applied to each call leg in the call connection.

A traditional voice call over the PSTN uses a dedicated 64K circuit end to end. In contrast, a voice call over the packet network is made up of discrete segments or call legs. A call leg is a logical connection between two routers or between a router and a telephony device. A voice call comprises four call legs, two from the perspective of the originating router and two from the perspective of the terminating router, as shown in Figure 22.

Figure 22 Dial Peer Call Legs

A dial peer is associated with each call leg. Attributes that are defined in a dial peer and applied to the call leg include codec, Quality of Service (QoS), voice activity detection (VAD), and fax rate. To complete a voice call, you must configure a dial peer for each of the four call legs in the call connection.

Depending on the call leg, a call is routed using one of the two types of dial peers:

POTS—Dial peer that defines the characteristics of a traditional telephony network connection. POTS dial peers map a dialed string to a specific voice port on the local router, normally the voice port connecting the router to the local PSTN, PBX, or telephone.

Voice-network—Dial peer that defines the characteristics of a packet network connection. Voice-network dial peers map a dialed string to a remote network device, such as the destination router that is connected to the remote telephony device.

The specific type of voice-network dial peer depends on the packet network technology:

VoIP (Voice over IP)—Points to the IP address of the destination router that terminates the call.

VoFR (Voice over Frame Relay)—Points to the data-link connection identifier (DLCI) of the interface from which the call exits the router.

VoATM (Voice over ATM)—Points to the ATM virtual circuit for the interface from which the call exits the router.

MMoIP (Multimedia Mail over IP)—Points to the e-mail address of the SMTP server. This type of dial peer is used only for fax traffic. For more information, see the chapter "Configuring Fax Applications."

Both POTS and voice-network dial peers are needed to establish voice connections over a packet network.

Inbound and Outbound Dial Peers

Dial peers are used for both inbound and outbound call legs. It is important to remember that these terms are defined from the perspective of the router. An inbound call leg originates when an incoming call comes to the router. An outbound call leg originates when an outgoing call is placed from the router. Figure 23 illustrates call legs from the perspective of the originating router; Figure 24 illustrates call legs from the perspective of the terminating router.


Note Figure 23 and Figure 24 apply to voice calls that are being sent across the packet network. If the originating and terminating POTS interfaces share the same router or if the call requires hairpinning, then two POTS call legs are sufficient. See Figure 29 on page 126 for more information.


Figure 23 Call Legs from the Perspective of the Originating Router

Figure 24 Call Legs from the Perspective of the Terminating Router

For inbound calls from a POTS interface that are destined for the packet network, the router matches a POTS dial peer for the inbound call leg and a voice-network dial peer, such as VoIP or VoFR, for the outbound leg. For inbound calls from the packet network, the router matches a POTS dial peer to terminate the call and a voice-network dial peer to apply features such as codec or QoS.

For inbound POTS call legs going to outbound voice-network dial peers, the router forwards all digits that it collects. On outbound POTS call legs, the router strips off explicitly matching digits and forwards any excess digits out the designated port. For specific information about how the router handles excess digits, see the "Two-Stage Dialing" section.

The following examples show basic configurations for POTS and VoIP dial peers:

dial-peer voice 1 pots
 destination-pattern 555....
 port 1/0:1

dial-peer voice 2 voip
 destination-pattern 555....
 session target ipv4:192.168.1.1

The router selects a dial peer for a call leg by matching the string that is defined by using the answer-address, destination-pattern, or incoming called-number command in the dial peer configuration. For specific information about how the router matches dial peers, see the "Dial Peer Overview" section.

Destination Pattern

The destination pattern associates a dialed string with a specific telephony device. It is configured in a dial peer by using the destination-pattern command. If the dialed string matches the destination pattern, the call is routed according to the voice port in POTS dial peers, or the session target in voice-network dial peers. For outbound voice-network dial peers, the destination pattern may also determine the dialed digits that the router collects and then forwards to the remote telephony interface, such as a PBX, a telephone, or the PSTN. You must configure a destination pattern for each POTS and voice-network dial peer that you define on the router.

The destination pattern can be either a complete telephone number or a partial telephone number with wildcard digits, represented by a period (.) character. Each "." represents a wildcard for an individual digit that the originating router expects to match. For example, if the destination pattern for a dial peer is defined as "555....", then any dialed string beginning with 555, plus at least four additional digits, matches this dial peer.

In addition to the period (.), there are several other symbols that can be used as wildcard characters in the destination pattern. These symbols provide additional flexibility in implementing dial plans and decrease the need for multiple dial peers in configuring telephone number ranges.

Table 11 shows the wildcard characters that are supported in the destination pattern.

Table 11 Wildcard Symbols Used in Destination Patterns

Symbol
Description

.

Indicates a single-digit placeholder. For example, 555.... matches any dialed string beginning with 555, plus at least four additional digits.

[ ]

Indicates a range of digits. A consecutive range is indicated with a hyphen (-); for example, [5-7]. A nonconsecutive range is indicated with a comma (,); for example, [5,8]. Hyphens and commas can be used in combination; for example, [5-7,9].

Note Only single-digit ranges are supported. For example, [98-102] is invalid.

( )

Indicates a pattern; for example, 408(555). It is used in conjunction with the symbol ?, %, or +.

?

Indicates that the preceding digit occurred zero or one time. Enter ctrl-v before entering ? from your keyboard.

%

Indicates that the preceding digit occurred zero or more times. This functions the same as the "*" used in regular expression.

+

Indicates that the preceding digit occurred one or more times.

T

Indicates the interdigit timeout. The router pauses to collect additional dialed digits.



Note The period (.) is the only wildcard character that is supported for dial strings that are configured using the answer-address or incoming called-number commands.


Table 12 shows some examples of how these wildcard symbols are applied to the destination pattern and the dial string that results when dial string 4085551234 is matched to an outbound POTS dial peer. The wildcard symbols follow regular expression rules.

Table 12 Dial Peer Matching Examples Using Wildcard Symbols 

 
Destination Pattern
Dial String Translation
String After Stripping1

1

408555.+

408555, followed by one or more wildcard digits. This pattern implies that the string must contain at least 7 digits starting with 408555.

1234

2

408555.%

408555, followed by zero or more wildcard digits. This pattern implies that the string must contain at least 408555.

1234

3

408555+

40855, followed by 5 repeated one or more times.

1234

4

408555%

40855, followed by 5 repeated zero or more times. Any explicitly matching digit before the % symbol is not stripped off.

51234

5

408555?

40855, followed by 5 repeated zero or one time. Any explicitly matching digit before the ? symbol is not stripped off.

51234

6

40855[5-7].+

40855, followed by 5, 6, or 7, plus any digit repeated one or more times.

51234

7

40855[5-7].%

40855, followed by 5, 6, or 7, plus any digit repeated zero or more times.

51234

8

40855[5-7]+1234

40855, followed by 5, 6, or 7 repeated one or more times, followed by 1234.

51234

9

408(555)+1234

408, followed by 555, which may repeat one or more times, followed by 1234.

5551234

1 These examples apply only to one-stage dialing, where DID is enabled on the inbound POTS dial peer. If the router is using two-stage dialing and collecting digits one at a time as dialed, then the call is routed immediately after a dial peer is matched and any subsequent dialed digits are lost.


In addition to wildcard characters, the following characters can also be used in the destination pattern:

Asterisk (*) and pound sign (#)—These characters on standard touch-tone dial pads can be used anywhere in the pattern. They can be used as the leading character (for example, *650), except on the Cisco 3600 series.

Dollar sign ($)—Disables variable-length matching. Must be used at the end of the dial string.

The same destination pattern can be shared across multiple dial peers to form hunt groups. For information on building hunt groups, see the "Hunt Groups and Preferences" section.

For information on how the terminating router strips off digits after matching a destination pattern, see the "Digit Stripping on Outbound POTS Dial Peers" section.

Fixed- and Variable-Length Dial Plans

Fixed-length dialing plans, in which all the dial-peer destination patterns have a fixed length, are sufficient for most voice networks because the telephone number strings are of known lengths. Some voice networks, however, require variable-length dial plans, particularly for international calls, which use telephone numbers of different lengths.

If you enter the timeout T-indicator at the end of the destination pattern in an outbound voice-network dial peer, the router accepts a fixed-length dial string and then waits for additional dialed digits. The timeout character must be an uppercase T. The following dial-peer configuration shows how the T-indicator is set to allow variable-length dial strings:

dial-peer voice 1 voip
 destination-pattern 2222T
 session target ipv4:10.10.1.1

In the example above, the router accepts the digits 2222, and then waits for an unspecified number of additional digits. The router can collect up to 31 additional digits, as long as the interdigit timeout has not expired. When the interdigit timeout expires, the router places the call.

The default value for the interdigit timeout is 10 seconds. Unless the default value is changed, using the T-indicator adds 10 seconds to each call setup because the call is not attempted until the timer has expired (unless the # character is used as a terminator). You should therefore reduce the voice-port interdigit timeout value if you use variable-length dial plans. You can change the interdigit timeout by using the timeouts inter-digit voice-port command.

The calling party can immediately terminate the interdigit timeout by entering the # character. If the # character is entered while the router is waiting for additional digits, the # character is treated as a terminator; it is not treated as part of the dial string or sent across the network. But if the # character is entered before the router begins waiting for additional digits (meaning that the # is entered as part of the fixed-length destination pattern), then the # character is treated as a dialed digit.

For example, if the destination pattern is configured as 2222...T, then the entire dialed string of 2222#9999 is collected, but if the dialed string is 2222#99#99, the #99 at the end of the dialed digits is not collected because the final # character is treated as a terminator. You can change the termination character by using the dial-peer terminator command.


Note In most cases, you must configure the T-indicator only when the router uses two-stage dialing. If Direct Inward Dialing (DID) is configured in the inbound POTS dial peer, the router uses one-stage dialing, which means that the full dialed string is used to match outbound dial peers. The only exception is when the ISDN overlap-receiving command is configured; the ISDN overlap-receiving feature requires the T-indicator.


Session Target

The session target is the network address of the remote router to which you want to send a call once a local voice-network dial peer is matched. It is configured in voice-network dial peers by using the session target command. For outbound dial peers, the destination pattern is the telephone number of the remote voice device that you want to reach. The session target represents the path to the remote router that is connected to that voice device. Figure 25 illustrates the relationship between the destination pattern and the session target, as shown from the perspective of the originating router.

Figure 25 Relationship Between Destination Pattern and Session Target

The address format of the session target depends on the type of voice-network dial peer:

VoIP—IP address, hostname of the Domain Name System (DNS) server that resolves the IP address, ras for registration, admission, and status (RAS) if an H.323 gatekeeper resolves the IP address, or settlement if the settlement server resolves the IP address

VoFR—Interface type and number and the DLCI

VoATM—Interface number, and ATM virtual circuit

MMoIP—E-mail address


Note For inbound dial peers, the session target is ignored.


Digit Stripping on Outbound POTS Dial Peers

When a terminating router receives a voice call, it selects an outbound POTS dial peer by comparing the called number (the full E.164 telephone number) in the call information with the number configured as the destination pattern in the POTS dial peer. The access server or router then strips off the left-justified digits that match the destination pattern. If you have configured a prefix, the prefix is added to the front of the remaining digits, creating a dial string, which the router then dials. If all numbers in the destination pattern are stripped out, the user receives a dial tone.

For example, consider a voice call whose E.164 called number is 1(408) 555-2222. If you configure a destination-pattern of "1408555" and a prefix of "9," the router strips off "1408555" from the E.164 telephone number, leaving the extension number of "2222." It then appends the prefix, "9," to the front of the remaining numbers, so that the actual numbers dialed are "9, 2222." The comma in this example means that the router will pause for one second between dialing the "9" and dialing the "2" to allow for a secondary dial tone.

For detailed information about digit stripping and the prefix command, see the "Digit Stripping and Prefixes" section.

Configuring Dial Peers

This section describes how to configure dial peers:

Configuring Dial Peers for Call Legs

Creating a Dial Peer Configuration Table

Configuring POTS Dial Peers

Configuring Dial Plan Options for POTS Dial Peers

Configuring VoIP Dial Peers

Configuring Dial Plan Options for VoIP Dial Peers

Configuring VoFR Dial Peers

Configuring VoATM Dial Peers


Note The example configurations in this section show VoIP dial peers; the same concepts also apply to VoFR and VoATM dial peers.


Establishing voice communication over a packet network is similar to configuring a static route: you are establishing a specific voice connection between two defined endpoints. Call legs define the discrete segments that lie between two points in the call connection. A voice call over the packet network comprises four call legs, two on the originating router and two on the terminating router; a dial peer is associated with each of these four call legs.

Configuring Dial Peers for Call Legs

When a voice call comes into the router, the router must match dial peers to route the call. For inbound calls from a POTS interface that are being sent over the packet network, the router matches a POTS dial peer for the inbound call leg and a voice-network dial peer for the outbound call leg. For calls coming into the router from the packet network, the router matches an outbound POTS dial peer to terminate the call and an inbound voice-network dial peer for features such as codec, VAD, and QoS.

Figure 26 shows the call legs and associated dial peers necessary to complete a voice call.

Figure 26 Matching Call Legs to Dial Peers

The following configurations show an example of a call being made from 4085554000 to 3105551000. Figure 27 shows the inbound POTS dial peer and the outbound VoIP dial peer that are configured on the originating router. The POTS dial peer establishes the source of the call (via the calling number or voice port), and the voice-network dial peer establishes the destination by associating the dialed number with the network address of the remote router.

Figure 27 Dial Peers from the Perspective of the Originating Router

In this example, the dial string 14085554000 maps to telephone number 555-4000, with the digit 1 plus the area code 408 preceding the number. When you configure the destination pattern, set the string to match the local dialing conventions.

Figure 28 shows the inbound VoIP dial peer and outbound POTS dial peer that are configured on the terminating router to complete the call. Dial peers are of local significance only.

Figure 28 Dial Peers from the Perspective of the Terminating Router

In the previous configuration examples, the last four digits in the VoIP dial peer's destination pattern were replaced with wildcards. This means that from Router A, calling any telephone number that begins with the digits "1310555" will result in a connection to Router B. This implies that Router B services all numbers beginning with those digits. From Router B, calling any telephone number that begins with the digits "1408555" will result in a connection to Router A. This implies that Router A services all numbers beginning with those digits.


Note It is not always necessary to configure the inbound dial peers. If the router is unable to match a configured dial peer for the inbound call leg, it uses an internally defined default POTS or voice-network dial peer to match inbound voice calls. In the example shown in Figure 28, dial peer 2 is only required when making a call from Router B to Router A.


The only exception to the previous example occurs when both POTS dial peers share the same router, as shown in Figure 29. In this circumstance, you do not need to configure a voice-network dial peer.

Figure 29 Communication Between Dial Peers Sharing the Same Router

This type of configuration is similar to the configuration used for hairpinning, which occurs when a voice call destined for the packet network is instead routed back over the PSTN because the packet network is unavailable. For more information about the hairpinning feature, see the "Hunt Groups and Preferences" section.

Creating a Dial Peer Configuration Table

Before you can configure dial peers, you must obtain specific information about your network. One way to identify this information is to create a dial peer configuration table. This table should contain all the telephone numbers and access codes for each router that is carrying telephone traffic in the network. Because most installations require integrating equipment into an existing voice network, the telephone dial plans are usually preset.

Figure 30 shows an example of a network in which Router A, with an IP address of 10.1.1.1, connects a small sales branch office to the main office through Router B, with an IP address of 10.1.1.2.


Note The example in Figure 30 shows a VoIP configuration. The same concepts also apply to VoFR and VoATM applications. The only change is in the format of the session target.


Figure 30 Sample VoIP Network

There are three telephone numbers in the sales branch office that need dial peers configured for them. Router B is the primary gateway to the main office; as such, it needs to be connected to the company's PBX. There are four devices that need dial peers configured for them in the main office, all of which are connected to the PBX.

Table 13 shows the peer configuration table for the example in Figure 30.

Table 13 Dial Peer Configuration Table for Sample Voice over IP Network

Dial Peer
Extension
Prefix
Destination Pattern
Type
Voice Port
Session Target
Router A

1

51001

5

1408115....

POTS

0:D

2

61002

6

1408116....

POTS

0:D

3

71003

7

1408117....

POTS

0:D

10

1729555....

VoIP

10.1.1.2

Router B

1

1000,
1001,
1002,
1003

1729555....

POTS

0:D

10

1408.......

VoIP

10.1.1.1


Configuring POTS Dial Peers

To configure a POTS dial peer, you must do the following:

Identify the dial peer by assigning it a unique tag number

Define its destination telephone number or range of telephone numbers

Associate it with a voice port through which calls are established

Under most circumstances, the default values for the remaining dial peer configuration commands are sufficient to establish connections.

To configure a POTS dial peer, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# dial-peer voice number pots

Enters dial-peer configuration mode and defines a local dial peer that connects to a POTS interface.

The number argument is one or more digits identifying the dial peer. Valid entries are from 1 to 2147483647.

The pots keyword indicates a dial peer using basic telephone service.

Step 2 

Router(config-dial-peer)# destination-pattern string [T]

Matches dialed digits to a telephony device.

The string argument is a series of digits that specify the E.164 or private dialing plan telephone number. Valid entries are the numbers 0 through 9 and the letters A through D.

You can also enter the following special characters:

The asterisk (*) or pound sign (#) on standard touch-tone dial pads can be used anywhere in the pattern.

The period (.) acts as a wildcard character.

For a list of additional wildcard characters, see Table 11.

When the timer (T) character is included at the end of the destination pattern, the router collects dialed digits until the interdigit timer expires (10 seconds, by default) or until you dial the termination character (the default is #). The timer character must be a capital T.

Step 3 

Router(config-dial-peer)# port location

Maps the dial peer to a specific logical interface.

The port command syntax is platform-specific. For more information about the syntax of this command, see the chapter "Configuring Voice Ports" in this document.

Configuring Dial Plan Options for POTS Dial Peers

When you configure a dial plan, you have different options, depending on how the dial plan is designed. To configure optional dial plan features for POTS dial peers, use one or more of the following commands in dial-peer configuration mode:

Command
Purpose

Router(config-dial-peer)# answer-address string

(Optional) Selects the inbound dial peer based on the calling number.

Router(config-dial-peer)# incoming called-number string

(Optional) Selects the inbound dial peer based on the called number to identify voice and modem calls.

Router(config-dial-peer)# direct-inward-dial string

(Optional) Enables the Direct Inward Dialing (DID) call treatment for the incoming called number. For more information, see the "DID for POTS Dial Peers" section.

Router(config-dial-peer)# forward-digits {num-digit | all | extra}

(Optional) Configures the digit-forwarding method used by the dial peer. The valid range for the number of digits forwarded (num-digit) is 0 through 32. For more information, see the "Forward Digits" section.

Router(config-dial-peer)# max-conn number

(Optional) Specifies the maximum number of allowed connections to and from the POTS dial peer. The valid range is 1 through 2147483647.

Router(config-dial-peer)# numbering-type {abbreviated | international | national | network | reserved | subscriber | unknown}

(Optional) Specifies the numbering type to match, as defined by the ITU Q.931 specification. For more information, see the "Numbering Type Matching" section.

Router(config-dial-peer)# preference value

(Optional) Configures a preference for the POTS dial peer. The valid range is 0 through 10, where the lower the number, the higher the preference. For more information, see the "Hunt Groups and Preferences" section.

Router(config-dial-peer)# prefix string

(Optional) Includes a prefix that the system adds automatically to the front of the dial string before passing it to the telephony interface.

Valid entries for the string argument are 0 through 9 and a comma (,). Use a comma to include a one-second pause between digits to allow for a secondary dial tone.

For more information, see the "Digit Stripping and Prefixes" section.

Router(config-dial-peer)# translate-outgoing {called | calling} name-tag

(Optional) Specifies the translation rule set to apply to the calling number or called number. For more information, see the "Digit Translation Rules for VoIP" section.

Configuring VoIP Dial Peers

VoIP dial peers enable the router to make outbound calls to a particular telephony device. To configure a VoIP dial peer, you must do the following:

Identify the dial peer by assigning it a unique tag number

Define its destination telephone number

Define its destination IP address

As with POTS dial peers, under most circumstances the default values for the remaining dial peer configuration commands are adequate to establish connections.

To configure a VoIP peer, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

Router(config)# dial-peer voice number voip

Enters dial-peer configuration mode and defines a remote VoIP dial peer.

The number argument is one or more digits identifying the dial peer. Valid entries are from 1 to 2147483647.

The voip keyword indicates a dial peer using voice encapsulation on the IP network.

Step 2 

Router(config-dial-peer)# destination-pattern string [T]

Configures the dial peer's destination pattern so that the system can reconcile dialed digits with a telephone number.

The string argument is a series of digits that specify the E.164 or private dialing plan telephone number. Valid entries are the numbers 0 through 9 and the letters A through D. You can also enter the following special characters:

The asterisk (*) or pound sign (#) on standard touch-tone dial pads can be used anywhere in the pattern.

The period (.) acts as a wildcard character.

For a list of additional wildcard characters, see Table 11.

When the timer (T) character is included at the end of the destination pattern, the router collects dialed digits until the interdigit timer expires (10 seconds, by default) or until you dial the termination character (the default is #). The timer character must be a capital T.

Step 3 

Router(config-dial-peer)# session target {ipv4:destination-address | dns:[$s$. | $d$. | $e$. | $u$.] host-name}

Defines the IP address of the router that is connected to the remote telephony device.

The ipv4:destination-address keyword and argument indicate the IP address of the remote router.

The dns:host-name keyword and argument indicate that the domain name server will resolve the name of the IP address. Valid entries for this parameter are characters representing the name of the host device.

Wildcards are also available for defining domain names with the keyword by using source, destination, and dialed information in the host name.

Step 4 

Router(config-dialpeer)# codec {g711alaw | g711ulaw | g723ar53 | g723ar63 | g723r53 | g723r63 | g726r16 | g726r24 | g726r32 | g728 | g729br8 | g729r8 [pre-ietf]} [bytes]

Defines the codec for the dial peer.

The optional bytes parameter sets the number of voice data bytes per frame. Acceptable values are from 10 to 240 in increments of 10 (for example, 10, 20, 30, and so on). Any other value is rounded down (for example, from 236 to 230).

The same codec value must be configured in both VoIP dial peers on either side of the connection.

If you specify g729r8, then IETF bit-ordering is used. For interoperability with a Cisco 2600 series, Cisco 3600 series, or Cisco AS5300 running a release earlier than Cisco IOS Release 12.0(5)T or 12.0(4)XH, you must specify the additional keyword pre-ietf after g729r8.

The codec command syntax is platform- and release-specific. For more information about the syntax of this command, refer to the Cisco IOS Voice, Video, and Fax Command Reference.

If you have used the codec complexity voice-card interface configuration command, the codec command sets the codec options that are available. If you do not set codec complexity, g729r8 with IETF bit-ordering is used. For more information about the codec complexity command, see the "Configuring Voice Ports" chapter.

Configuring Codec Selection Order

You can create a voice class in which you define a selection order for codecs, and then apply the voice class to VoIP dial peers. The voice class codec global configuration command allows you to define the voice class containing the codec selection order. Then you use the voice-class codec dial-peer configuration command to apply the class to individual dial peers.

To configure codec selection order, perform the tasks described in the following sections:

Creating a Voice Class to Define Codec Selection Order

Applying Codec Selection Order to a VoIP Dial Peer

Creating a Voice Class to Define Codec Selection Order

To create a voice class to define the order of preference for selecting a codec when the router negotiates with a destination router, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

router(config)# voice class codec tag

Creates a voice class for a codec preference list. The range for the tag number is from 1 through 10000. The tag number must be unique on the router.

Step 2 

router(config-voice-class)# codec preference priority codec [bytes payload-size]

Configures the order of preference for selecting a codec. Repeat this command to specify the preferred selection order for additional codecs, if required.

Applying Codec Selection Order to a VoIP Dial Peer

To apply voice-class codec attributes to a VoIP dial peer, use the following commands beginning in global configuration mode:

 
Command
Purpose

Step 1 

router(config)# dial-peer voice tag voip

Defines a VoIP dial peer and enters dial-peer configuration mode.

The tag is a number that identifies the dial peer and must be unique on the router.

Step 2 

router(config-dialpeer)# voice-class codec tag

Assigns to the dial peer the voice class that you created in the "Creating a Voice Class to Define Codec Selection Order" section.

The voice-class command in dial-peer configuration mode is entered with a hyphen. The voice class command in global configuration mode is entered without the hyphen.


Note You cannot assign voice-class codec attributes to POTS dial peers.


Configuring Dial Plan Options for VoIP Dial Peers

When you configure a dial plan, you have different options, depending on how the dial plan is designed. To configure optional dial plan features, use the following commands in dial-peer configuration mode:

 
Command
Purpose

Step 1 

Router(config-dial-peer)# answer-address string

(Optional) Selects the inbound dial peer based on the calling number.

Step 2 

Router(config-dial-peer)# incoming called-number string

(Optional) Selects the inbound dial peer based on the called number to identify voice and modem calls.

Step 3 

Router(config-dial-peer)# dtmf-relay [cisco-rtp] [h245-signal] [h245-alphanumeric]

(Optional) Configures the tone that sounds in response to a keypress on a touch-tone telephone. Dual tone multifrequency (DTMF) tones are compressed at one end of a call and decompressed at the other end.

If a low-bandwidth codec such as G.729 or G.723 is used, the tones can sound distorted. The dtmf-relay command transports DTMF tones generated after call establishment out-of-band by using a method that sends with greater fidelity than is possible in-band for most low-bandwidth codecs. Without DTMF Relay, calls established with low-bandwidth codecs can have trouble accessing automated telephone menu systems such as voice mail and interactive voice response (IVR) systems.

A signaling method is supplied only if the remote end supports it. Options are Cisco proprietary (cisco-rtp), standard H.323 (h245-alphanumeric), and H.323 standard with signal duration (h245-signal).

Step 4 

Router(config-dial-peer)# fax rate {2400 | 4800 | 7200 | 9600 | 12000 | 14400 | disable | voice}

(Optional) Specifies the transmission speed of a fax to be sent to this dial peer. The disable keyword turns off fax transmission capability. The voice keyword, which is the default, specifies the highest possible transmission speed supported by the voice rate.

Step 5 

Router(config-dial-peer)# numbering-type {abbreviated | international | national | network | reserved | subscriber | unknown}

(Optional) Specifies the numbering type to match, as defined by the ITU Q.931 specification. For more information, see the "Numbering Type Matching" section.

Step 6 

Router(config-dial-peer)# playout-delay mode {adaptive | fixed}

(Optional) Specifies the type of jitter buffer playout delay to use.

Step 7 

Router(config-dial-peer)# playout-delay {maximum value | nominal value | minimum {default | low | high}}

(Optional) Specifies the amount of time that a packet is held in the jitter buffer before it is played out on the audio path. For detailed information, see the chapter "Quality of Service" in this document.

Step 8 

Router(config-dial-peer)# preference value

(Optional) Configures a preference for the VoIP dial peer. The value is a number from 0 through 10, where the lower the number, the higher the preference. For more information, see the "Hunt Groups and Preferences" section.

Step 9 

Router(config-dial-peer)# tech-prefix number

(Optional) Specifies that a particular technology prefix be prepended to the destination pattern of this dial peer.

Step 10 

Router(config-dial-peer)# translate-outgoing {called | calling} name-tag

(Optional) Specifies the translation rule set to apply to the calling number or called number. For more information, see the "Digit Translation Rules for VoIP" section.

Step 11 

Router(config-dial-peer)# vad

(Optional) Enables voice activity detection (VAD) by disabling the transmission of packets during periods of silence. VAD is enabled by default.

The minimum silence detection time for VAD can be modified by using the voice vad-time global configuration command.

The default for the vad command is enabled, which is normally the preferred configuration. If you are operating on a high-bandwidth network and voice quality is of the highest importance, you should disable VAD by using the no vad command. This results in better voice quality, but also requires higher bandwidth for voice. For example, a broad industry average for VAD savings on links T1 and up is from 30 to 35 percent of the overall bandwidth.


Note The music threshold that is configured by using the music-threshold voice-port command can affect VAD performance.


Some codecs come with built-in VAD algorithms (specifically, G.729 Annex B and G.723.1 symmetric). VAD can be used with all other codecs.

Configuring VoFR Dial Peers

To configure VoFR dial peers, see the "Configuring Voice over Frame Relay" chapter.

Configuring VoATM Dial Peers

To configure VoATM dial peers, see the "Configuring Voice over ATM" chapter.

Verifying POTS and VoIP Dial Peer Configurations

You can check the validity of your dial peer configuration by performing the following tasks:

If you have relatively few dial peers configured, you can use the show dial-peer voice command to verify that the configuration is correct. To display a specific dial peer or to display all configured dial peers, use this command. The following is sample output from the show dial-peer voice command for a specific VoIP dial peer:

router# show dial-peer voice 10

VoiceOverIpPeer10
        tag = 10, dest-pat = \Q',
        incall-number = \Q+14087',
        group = 0, Admin state is up, Operation state is down
        Permission is Answer, 
        type = voip, session-target = \Q',
        sess-proto = cisco, req-qos = bestEffort, 
        acc-qos = bestEffort, 
        fax-rate = voice, codec = g729r8,
        Expect factor = 10,Icpif = 30, VAD = disabled, Poor QOV Trap = disabled, 
        Connect Time = 0, Charged Units = 0
        Successful Calls = 0, Failed Calls = 0
        Accepted Calls = 0, Refused Calls = 0
        Last Disconnect Cause is ""
        Last Disconnect Text is ""
        Last Setup Time = 0

To show the dial peer that matches a particular number (destination pattern), use the show dialplan number command. The following example displays the VoIP dial peer associated with the destination pattern 51234:

router# show dialplan number 51234

Macro Exp.: 14085551234
VoiceOverIpPeer1004
        tag = 1004, destination-pattern = \Q+1408555....',
        answer-address = \Q',
        group = 1004, Admin state is up, Operation state is up
        type = voip, session-target = \Qipv4:1.13.24.0',
        ip precedence: 0        UDP checksum = disabled
        session-protocol = cisco, req-qos = best-effort,
        acc-qos = best-effort,
        fax-rate = voice, codec = g729r8,
        Expect factor = 10, Icpif = 30,
        VAD = enabled, Poor QOV Trap = disabled
        Connect Time = 0, Charged Units = 0
        Successful Calls = 0, Failed Calls = 0
        Accepted Calls = 0, Refused Calls = 0
        Last Disconnect Cause is ""
        Last Disconnect Text is ""
        Last Setup Time = 0
Matched: +14085551234   Digits: 7
Target: ipv4:172.13.24.0

Troubleshooting Tips

You can troubleshoot your dial peer configurations by performing the following tasks:

Ping the associated IP address to confirm connectivity. If you cannot successfully ping your destination, refer to the Cisco IOS IP Configuration Guide.

To verify that the operational status and administrative status of the dial peer is up, use the show dial-peer voice command.


Note To activate a dial peer, the answer-address, incoming called-number, or destination-pattern with port or session-target command must be configured in the dial peer.


To verify that the data is configured correctly on both routers, use the show dialplan number command on the local and remote routers.

If you have configured number expansion, use the show num-exp command to check that the partial number on the local router maps to the correct full E.164 telephone number on the remote router.

If you have configured translation rules, use the test translation-rule command to verify digit manipulation.

If you have configured a codec value, make sure that the same codec value is configured in both VoIP dial peers on either side of the connection. You can verify the configured codec value by using the show dial-peer voice or show dialplan number command.

To verify that the output string the router dials is correct, use the debug voip ccapi inout command.

To check Real-Time Transport Protocol (RTP) packets, use the debug cch323 rtp command.

To check logical channel negotiation, use the debug cch323 h245 command.

To check the call setup, use the debug cch323 h225 command.

Dial Peer Overview

Before setting up a dial plan, you should understand how the router matches dialed strings to inbound and outbound dial peers. How the router matches dialed strings directly affects the digits that your users have to dial, in addition to the digits that are collected and then forwarded or played out to the telephony interface, such as a PBX, key system, or PSTN.

The following sections describe basic concepts on how the router selects a matching dial peer:

Two-Stage Dialing

Variable-Length Matching

Matching Inbound Dial Peers

Inbound Dial Peers for IVR Applications

Matching Outbound Dial Peers

Default Routes for Outbound Call Legs


Note Unless otherwise noted, the concepts described in this section apply to VoIP, VoFR, and VoATM dial peers.


Two-Stage Dialing

With two-stage dialing, when a voice call enters the network, the originating router collects dialed digits until it can match an outbound dial peer. As soon as the router matches a dial peer, it immediately places the call and forwards the associated dial string. No additional dialed digits are collected. The digits and wildcards that are defined in the destination pattern determine how many digits the originating router collects before matching the dial peer. Any digits dialed after the first dial peer is matched are dropped.

For example, if the dialed string is "1234599" and the originating router matches a dial peer with a destination pattern of 123.., then the digits "99" are not collected. The call is placed immediately after the digit "5" is dialed, and the dial string "12345" is forwarded to the next call leg.

On the terminating router, the left-justified digits that explicitly match the terminating POTS dial peer are stripped off. Any trailing wildcard digits are considered excess digits. The terminating router forwards these excess digits to the telephony interface. For example, if the dial string "1234599" is matched on a terminating router to a destination pattern of "123..," the digits "4599" are excess digits and are forwarded to the telephony interface.

Figure 31 illustrates how the originating router collects a dial string and the terminating router forwards the digits to the telephony device.

Figure 31 Collecting and Forwarding Dialed Digits

The examples in Table 14 demonstrate how the originating router collects dialed digits for a given destination pattern in the outbound voice-network dial peer.

Table 14 Digit Collection Based on Destination Pattern

Dialed Digits
Destination Pattern
Dial String Collected1

5551234

5......

5551234

5551234

555....

5551234

5551234

555

555

555123499

555....

5551234

1 These examples apply only to two-stage dialing, in which the router collects the dialed string digit by digit. If DID is enabled in the inbound POTS dial peer, the router performs one-stage dialing, which means that the full dialed string is used regardless of the destination pattern that is matched.


The router defaults to two-stage dialing unless you configure DID. For information on configuring DID, see the "DID for POTS Dial Peers" section.

Variable-Length Matching

When matching dial peers, the router defaults to variable-length matching, which means that as long as the left-justified digits in the dial string match the configured pattern in the dial peer, any digits beyond the configured pattern are ignored for the purposes of matching. For example, dial string 5551212 would match both of the following dial peers:

dial-peer voice 1 voip
 destination-pattern 555
 session target ipv4:10.10.1.1

dial-peer voice 2 voip
 destination-pattern 5551212
 session target ipv4:10.10.1.2

To disable variable-length matching for a dial peer, add the dollar sign ($) to the end of the destination pattern, as shown:

dial-peer voice 1 voip
 destination-pattern 555$
 session target ipv4:10.10.1.1

The $ character in the above configuration prevents this dial peer from being matched for dial string 5551212 because the extra digits beyond 555 are considered in the matching.

With two-stage dialing, the router collects the dialed string digit by digit. It attempts to match a dial peer after each digit is received. As soon as it finds a match, it immediately routes the call. For example, given the following configurations, the router would immediately match dial string 5551212 to dial peer 1.

dial-peer voice 1 voip
 destination-pattern 555
 session target ipv4:10.10.1.1

dial-peer voice 2 voip
 destination-pattern 5551212