KEMBAR78
Discovery 14: Examine Cisco IOS Gateway Inbound and Outbound Dial-Peer Functions | PDF | Voice Over Ip | Public Switched Telephone Network
0% found this document useful (0 votes)
26 views18 pages

Discovery 14: Examine Cisco IOS Gateway Inbound and Outbound Dial-Peer Functions

The document details the configuration and functionality of Cisco IOS gateways, specifically focusing on inbound and outbound dial-peer selection for VoIP calls. It outlines the process for setting up dial peers, the criteria for their selection, and includes practical tasks for testing these configurations. The lab involves registering endpoints, exploring dial-peer selection based on various parameters, and analyzing debug outputs to verify the correct dial peers are used during calls.

Uploaded by

Dúber Pérez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views18 pages

Discovery 14: Examine Cisco IOS Gateway Inbound and Outbound Dial-Peer Functions

The document details the configuration and functionality of Cisco IOS gateways, specifically focusing on inbound and outbound dial-peer selection for VoIP calls. It outlines the process for setting up dial peers, the criteria for their selection, and includes practical tasks for testing these configurations. The lab involves registering endpoints, exploring dial-peer selection based on various parameters, and analyzing debug outputs to verify the correct dial peers are used during calls.

Uploaded by

Dúber Pérez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Discovery 14: Examine Cisco IOS Gateway Inbound and Outbound

Dial-Peer Functions
Introduction
Cisco IOS gateways interconnect VoIP domains with the traditional circuit-based telephony world. When a Cisco
IOS gateway receives a call and routes it to another device, the call consists of two call legs: the inbound call leg
and the outbound call leg. Each call leg must be configured with certain properties, for example, which codec to
use to the neighboring device, how to manipulate digits, and so on.

In Cisco IOS gateways, dial peers configure these call leg properties. When a call is received, the gateway must
select the inbound dial peer and apply the configuration of the chosen inbound dial peer to the inbound call leg.
Then the gateway routes the call toward the destination by selecting the outbound dial peer.

There is one Cisco Unified Communications Manager cluster in this topology, and it has one registered phone
(CIPC-1 running on PC-1). Further, the cluster is preconfigured to route emergency calls (dialed as 9.911) to the
gateway SJC-GW, which is a Cisco IOS gateway. The gateway is connected to the PSTN via a primary rate ISDN
Link. Another ISDN gateway (PSTN-GW) simulates the PSTN, which is set up as a Cisco Unified Communications
Manager Express with one registered phone on PC-3 (PSTN). The PSTN gateway only accepts inbound calls to
911 and routes these calls to the PSTN phone. When you place a call from the PSTN phone, the calling-party
number that is used by the PSTN phone is 4085551234.

You will configure different dial peers on the SJC-GW and place test calls to examine how inbound and outbound
dial peers are selected in Cisco IOS gateways.

This lab will take approximately 60 minutes to complete.

Topology

Job Aid
Device Information
Device Description IP Address Credentials

PC-1 PC running Cisco IP Communicator US-CIPC-1 10.1.5.200 Student, C0ll@B

PC-3 PC running Cisco IP Communicator PSTN 10.1.99.101 Student, C0ll@B

HQ-UCM Cisco Unified Communications Manager serving the US and the UK sites 10.1.5.5 N/A

PSTN-GW Router simulating the PSTN 10.1.99.252 N/A

HQ-WIN-SERVER-1 Microsoft Windows Server providing NTP and DNS services 10.1.5.100 N/A

Task 1: Register Endpoints


Activity

Step 1
On PC-1, open Google Chrome and navigate to Cisco Unified Communications Manager Administration
(https://10.1.5.5/ccmadmin). Log in using Administrator for the username and C0ll@B for the password.

Step 2
Select Device > Phone, click Find and observe if Cisco IP Communicator phones are displayed. If phones are
not displayed wait a while for the automation system to finish configuring Cisco Unified Communicacitons
Manager and then click Find again. Continue only when phones are displayed.
Step 3
On PC-1, start Cisco IP Communicator and configure it with the following settings:

Device Name: CIPC-1


TFTP Servers: 10.1.5.5
Step 4
On PC-3, ping PSTN-GW with IP address 10.1.99.252. If ping is not successful wait for a while and try
again. Continue with next step only if ping success.

Step 5
On PC-3, start Cisco IP Communicator and configure it with the following settings:

Device Name: PSTN


TFTP servers: 10.1.99.252
Task 2: Explore Inbound Dial-Peer Selection
The inbound dial peer applies call attributes to incoming call legs. You have to know how the gateway chooses the
inbound dial peer so that you can apply the appropriate settings to an incoming call.

You will explore the inbound dial-peer selection process on the SJC gateway.

Activity
Inbound Dial-Peer Selection Process

To match inbound call legs to dial peers, the gateway uses three elements of the received call:
Called number: The called number is part of the received call setup message.
Calling number: If provided, the calling number is also part of the received call setup message.
Port: This port is the voice port from which the call was received. The port is only applicable to inbound POTS
call legs. VoIP dial peers are not configured with a port.
The gateway chooses an inbound dial peer by matching the received information with the attributes of all
configured dial peers of the applicable type (POTS versus VoIP). The gateway searches for a match in the
following order:

Called-number match with incoming called-number attribute: First, the gateway attempts to match the
called number of the call setup request with the configured incoming called-number attribute of each dial
peer. This attribute has matching priority over the answer-address and destination-pattern matching
attributes. If multiple incoming called-number attributes match the called number, then the longest match
wins. If there are only equally qualified matches, a random dial peer is chosen.
Calling-number match with answer-address attribute: If no match is found in Step 1, the gateway
attempts to match the calling number of the call setup request with the answer-address attribute of each
dial peer. If multiple answer-address attributes match the calling number, then the longest match wins. If
there are only equally qualified matches, the dial peer with the lowest number has priority.
Calling-number match with destination-pattern attribute: If no match is found in Step 2, the gateway
attempts to match the calling number of the call setup request with the destination-pattern attribute of each
dial peer. If multiple destination-pattern attributes match the calling number, then the longest match wins. If
there are only equally qualified matches, the dial peer with the lowest number has priority.
Voice port (associated with the incoming call setup request) matches with the configured dial peer
port attribute (only applicable to inbound POTS call legs): If no match is found in Step 3, the gateway
attempts to match the voice port that is associated with the incoming call with the port attribute of each dial
peer. If multiple dial peers have the same configured port, the dial peer with the lowest number has priority.
If there is no match, a default dial peer is used as the inbound dial peer.

The default dial peer is referred to as dial peer 0. The default dial peer can only act as an inbound dial peer and is
never used as an outbound dial peer.

Dial peer 0 for inbound VoIP calls applies the following configuration:
G.729 and G.711 codecs are supported.
IP precedence is set to 0.
VAD is enabled.
RSVP is not supported.
Fax-rate service is supported.

Dial peer 0 for inbound POTS calls applies the following configuration:
No applications.
No direct inward dialing.

You cannot change the configuration of dial peer 0. Default dial peer 0 cannot be used to negotiate nondefault
capabilities, services, and applications, such as DTMF relay or disabled VAD.

Explore the Behavior When No Inbound Dial Peer Exists


The SJC gateway (SJC-GW) is preconfigured with one VoIP (dial peer 101). This dial peer routes calls that are
placed to 4085551… to the Cisco Unified Communications Manager HQ-CUCM.

At the moment, no POTS dial peer exists. You will first verify the existing dial-peer configuration. Then you will
enable dial-peer debugging and place a test call from the PSTN phone to the SJC site. Then you will analyze the
debug output.

Step 1
Open Putty from the desktop, select Router 1 from the saved sessions, click Load, then click Open.

Step 2
Login using Administrator for the username and C0ll@B for the password.

Step 3
Enter the terminal monitor command so that you are able to see console messages.

Step 4
On SJC-GW, examine the existing dial peer configuration by using the show dial-peer voice summary and the
show running-config | section dial-peer voice 101 commands.

SJC-GW# show dial-peer voice summary


dial-peer hunt 0
AD PRE PASS SESS-SER-GRP\ OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT KEEPALIVE
VRF
101 voip up up 4085551... 0 syst ipv4:10.1.5.5
NA
For server-grp details please execute command:show voice classserver-group <tag_id>
SJC-GW# show running-config | section dial-peer voice 1
dial-peer voice 101 voip
destination-pattern 4085551...
session target ipv4:10.1.5.5

Step 5
Enable debug voice dialpeer.

SJC-GW# debug voice dialpeer


voip dialpeer default debugging is on

Step 6
On the PSTN phone (running on PC-3), place a call to 4085551001.

When placing the test calls, do not accept the call on the SJC phone (CIPC-1) to keep the debug output
short. Simply press the EndCall softkey on PC-3's phone (PSTN) after a few seconds. This process
applies to all test calls within this task.

Step 7
On SJC-GW, examine the debug output and identify the inbound dial peer that is used for the call.

Feb 27 16:36:30: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:


Calling Number=4085551234, Called Number=4085551001, Voice-Interface=0x7F6B191E2A80,
Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 16:36:30: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=NO_MATCH(-1) After All Match Rules Attempt
Feb 27 16:36:30: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
dialstring=NULL, saf_enabled=0, saf_dndb_lookup=0, dp_result=-1

When you look at the debug output, you have to search for the last block that looks up an incoming dial peer
(dpAssociateIncomingPeerCore) for the called number 4085551001 (Called Number=4085551001) with
encapsulation type voice (Peer Encap Type=ENCAP_VOICE).

You can see that no match is found (Result=NO_MATCH). Although you do not match a specific inbound dial
peer, the call works (the destination phone is ringing). This result indicates that the default configuration of dial
peer 0 must be used for this inbound call leg.

Verify Inbound Dial-Peer Selection Based on the Port


Verify Inbound Dial-Peer Selection Based on the Port

The inbound dial peer can be matched based on the voice port where the call was received and the port that is
configured at the dial peers.

You will configure a dial peer that matches the port on which the call is received. Then you will place a test call and
analyze the result.

You want the inbound dial peer to be matched on the port command. A dial peer that is configured with
the port command also requires the destination-pattern command, or the answer address command, or
the incoming-called number command to have an operational state of Up. Dial peers that do not have an
operational state of Up are not considered in the inbound dial-peer selection. Therefore, you will configure
a destination pattern (888) that does not match the calling-party number. By configuring a different
nonmatching destination pattern, you ensure that the inbound dial peer is not selected based on the
destination pattern but on the port.

Step 8
Configure POTS dial peer 201 with destination pattern 888 and port 0/1/0:23.

SJC-GW# configure terminal


SJC-GW(config)# dial-peer voice 201 pots
SJC-GW(config-dial-peer)# port 0/1/0:23
SJC-GW(config-dial-peer)# destination-pattern 888

Step 9
On the PSTN phone, place a call to 4085551001.

Step 10
On SJC-GW, examine the debug output and identify the inbound dial peer that is used for the call.

Feb 27 10:54:36: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:


Calling Number=4085551234, Called Number=4085551001, Voice-Interface=0x7F7353A4DBF8,
Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 10:54:36: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_PORT; Incoming Dial-peer=201

When you look at the debug output, you have to search for the last block that looks up an incoming dial peer
(dpAssociateIncomingPeerCore) for the called number 4085551001 (Called Number=4085551001) with
encapsulation type voice (ENCAP_VOICE”) that results in a success (Result=Success). In this case, the relevant
output is a few lines before the first list of matched outgoing dial peers (List of Matched Outgoing Dial-peer(s):).

This time, you successfully matched dial peer 201 (Incoming Dial-peer=201), based on the port
(DP_MATCH_PORT”).

Verify Inbound Dial-Peer Selection Based on the Destination Pattern


The inbound dial peer can be matched based on the calling number and the destination pattern that is configured
at the dial peers.

You will configure a dial peer that matches the received calling-party number (4085551234). Then you will place a
test call and analyze the result.

You want the inbound dial peer to be matched on the destination-pattern command. A dial peer that is
configured with the destination-pattern command also requires the port command to have an operational
state of Up.

Step 11
Configure POTS dial peer 202 with destination pattern 4085551234 and port 0/1/0:23.

SJC-GW(config)# dial-peer voice 202 pots


SJC-GW(config-dial-peer)# port 0/1/0:23
SJC-GW(config-dial-peer)# destination-pattern 4085551234

Step 12
On the PSTN phone, place a call to 4085551001.
Step 13
On SJC-GW, examine the debug output and identify the inbound dial peer that is used for the call.

Feb 27 11:01:37: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:


Calling Number=4085551234, Called Number=4085551001, Voice-Interface=0x7F7353A4DBF8,
Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 11:01:37: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_ORIGINATE; Incoming Dial-peer=202

When you look at the debug output, you have to search for the last block that looks up an incoming dial peer
(dpAssociateIncomingPeerCore) for the called number 4085551001 (Called Number=4085551001) with
encapsulation type voice (ENCAP_VOICE”) that results in a success (Result=Success). In this case, the relevant
output is at the beginning of the output.

This time, you successfully (Result=Success) match dial peer 202 (Incoming Dial-peer=202), based on the
destination pattern (DP_MATCH_ORIGINATE).

Verify Inbound Dial-Peer Selection Based on the Answer Address


The inbound dial peer can be matched based on the calling number and the answer address that is configured at
the dial peers.

You will configure a dial peer that matches the received calling-party number (4085551234), but this time with an
answer address and not with a destination pattern. Then you will place a test call and analyze the result.

You want the inbound dial peer to be matched on the answer-address command. A dial peer that is
configured with an answer address only, does not need to have a port command to have an operational
state of Up.

Step 14
Configure POTS dial peer 203 with answer address 4085551234.

SJC-GW(config)# dial-peer voice 203 pots


SJC-GW(config-dial-peer)# answer-address 4085551234

Step 15
On the PSTN phone, place a call to 4085551001.

Step 16
On SJC-GW, examine the debug output and identify the inbound dial peer that is used for the call.

Feb 27 11:22:51: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:


Calling Number=4085551234, Called Number=4085551001, Voice-Interface=0x7F7353A4DBF8,
Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 11:22:51: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_ANSWER; Incoming Dial-peer=203

When you look at the debug output, you have to search for the last block that looks up an incoming dial peer
(dpAssociateIncomingPeerCore) for the called number 4085551001 (Called Number=4085551001) with
encapsulation type voice (ENCAP_VOICE) that results in a success (Result=Success). In this case, the relevant
part is at the beginning of the output.

This time, you successfully (Result=Success) match dial peer 203 (Incoming Dial-peer=203), based on the
answer address (DP_MATCH_ANSWER).

Verify Inbound Dial-Peer Selection Based on the Incoming Called Number


The inbound dial peer can be matched based on the called number and the incoming called number that is
configured at the dial peers.

In the next steps, you will configure a dial peer that matches the received called-party number (4085551001). Then
you will place a test call and analyze the result.

You want the inbound dial peer to be matched on the incoming called-number command. A dial peer that
is configured with an incoming called number only, does not need to have a port command to have an
operational state of Up.

Step 17
Configure POTS dial peer 204 with incoming called number 4085551001.

SJC-GW(config)# dial-peer voice 204 pots


SJC-GW(config-dial-peer)# incoming called-number 4085551001

Step 18
On the PSTN phone, place a call to 4085551001.

Step 19
On SJC-GW, examine the debug output and identify the inbound dial peer that is used for the call.

Feb 27 11:34:37: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:


Calling Number=4085551234, Called Number=4085551001, Voice-Interface=0x7F7353A4DBF8,
Timeout=TRUE, Peer Encap Type=ENCAP_VOICE, Peer Search Type=PEER_TYPE_VOICE,
Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 11:34:37: //-1/xxxxxxxxxxxx/DPM/dpAssociateIncomingPeerCore:
Result=Success(0) after DP_MATCH_INCOMING_DNIS; Incoming Dial-peer=204

When you look at the debug output, you have to search for the last block that looks up an incoming dial peer
(dpAssociateIncomingPeerCore) for the called number 4085551001 (Called Number=4085551001) with
encapsulation type voice (ENCAP_VOICE) that results in a success (Result=Success). In this case, the relevant
part is at the beginning of the output.

This time, you successfully (Result=Success) match dial peer 204 (Incoming Dial-peer=204), based on the
incoming called number (DP_MATCH_INCOMING_DNIS).

Summary of the Inbound Dial-Peer Selection Process

Based on the tests, you can confirm that the inbound dial-peer selection process works as follows:
If the called number matches the incoming called number at a dial peer, that dial peer is selected as the
inbound dial peer.
If the calling number matches the answer address at a dial peer, that dial peer is selected as the inbound dial
peer.
If the calling number matches a destination pattern at a dial peer, that dial peer is selected as the inbound dial
peer.
If the voice port where the call is received matches a port at a POTS dial peer, that dial peer is selected as the
inbound dial peer.
No dial peer is matched and default parameters are applied to the incoming call leg.

Task 3: Explore Outbound Dial-Peer Selection


The outbound dial peer determines where calls are routed and it applies call attributes to the outbound call leg. You
have to know how the gateway selects the outbound dial peer so that you can route calls correctly and apply the
appropriate settings to the outbound call leg.

You will explore the outbound dial-peer selection process on the SJC gateway.

Activity
Outbound Dial-Peer Selection Process

When a call setup request is received on a voice gateway, the gateway attempts to find the best match of the
calling number in the destination-pattern commands of all dial peers. Both dial peers—POTS and VoIP—are
considered together for outbound dial-peer matching.

If multiple equally qualified matches exist, the dial peer with the lowest preference is chosen. If multiple equally
qualified matches with the same lowest preference exist, a random selection is made between the equally qualified
matches.

Once the outbound dial peer is found, the call setup message is sent to the next device along the path. On
outbound POTS dial peers, the port command is used to forward the call. On outbound VoIP dial peers, the
session target command is used to forward the call.

If no matching outbound dial can be found, the call fails.

Explore the Behavior When No Outbound Dial-Peer Exists

The HQ-UCM Cisco Unified Communications Manager is preconfigured with one route pattern. This route pattern
routes emergency calls that are placed to 9911 to the SJC-GW.

Cisco Unified Communications Manager sends these digits to the gateway using en bloc. An attempt will be made
to match a destination pattern from left to right (starting with the most significant digit). The forward-digits command
specifies the number of digits from right to left (starting with the least significant digits) that should be sent out to
the voice port.

You will first delete the POTS dial peers that you created in the “Inbound Dial-Peer Selection” task. Then you will
place a test call from the SJC phone to the PSTN phone. Then you will analyze the result.

Step 1
On SJC-GW, delete dial peers 201 to 204, which you created in the “Inbound Dial-Peer Selection” task.

SJC-GW(config)# no dial-peer voice 201


SJC-GW(config)# no dial-peer voice 202
SJC-GW(config)# no dial-peer voice 203
SJC-GW(config)# no dial-peer voice 204

Step 2
Verify that you only have one remaining dial peer (dial peer 101).

SJC-GW(config)# do show dial-peer voice summary


dial-peer hunt 0
AD PRE PASS SESS-SER-GRP\ OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT KEEPALIVE
VRF
101 voip up up 4085551001 0 syst ipv4:10.1.5.5
NA
For server-grp details please execute command:show voice classserver-group <tag_id>

Step 3
On the CIPC-1 phone (running on PC-1), place a call to 9911. The call fails.

When placing the test calls, do not accept the call on the PSTN phone so that the debug output is short.
Simply press the EndCall softkey after a few seconds. This process applies to all test calls within this
task.

Step 4
On SJC-GW, verify that the debug output does not include a successful result for an outbound dial peer search
(dpMatchPeersCore).

Feb 27 15:42:49: //-1/00306B3D0100/DPM/dpMatchPeersCore:


Calling Number=, Called Number=9911, Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 15:42:49: //-1/00306B3D0100/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=911
Feb 27 15:42:49: //-1/00306B3D0100/DPM/dpMatchPeersCore:
No Outgoing Dial-peer Is Matched; Result=NO_MATCH(-1)

Explore the Behavior When One Outbound Dial Peer Exists

Now you will create a dial peer that matches the first digit (9) of the called number (911). Then you willplace
a test call and analyze the result.

Step 5
On SJC-GW, configure a dial peer as follows:

SJC-GW(config)# dial-peer voice 1 pots


SJC-GW(config-dial-peer)# port 0/1/0:23
SJC-GW(config-dial-peer)# destination-pattern 9
SJC-GW(config-dial-peer)# forward-digits 3

Cisco Unified Communications Manager will send the dialed digits (911) en bloc to the gateway. The
gateway tries to match the dialed digits from left to right (starting with the most significant digit). The
forward-digits command specifies the number of digits that should be sent out to the voice port from
right to left (starting with the least significant digits).

Step 6
On the CIPC-1 phone, place a call to 9911.

Step 7
On SJC-GW, examine the debug output and identify the outbound dial peer that is used for the call.

Feb 27 16:26:13: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:


Calling Number=, Called Number=911, Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 16:26:13: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=911
Feb 27 16:26:13: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Feb 27 16:26:13: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
dialstring=NULL, saf_enabled=0, saf_dndb_lookup=0, dp_result=0
Feb 27 16:26:13: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=1

When you look at the debug output, you have to search for the last block that looks up an outgoing dial peer
(dpMatchPeersCore) for the called number 911 (Called Number=911) that results in a success
(Result=Success). Ignore the blocks that look up the called numbers 4085551001 and 911.

The list of matched outgoing dial peers includes dial peer 1 (Dial-peer Tag=1), which is the only dial peer that has
a matching destination pattern.

Explore the Behavior When Two Outbound Dial Peers Exist

Now you will add a dial peer that matches the first two digits (91) of the called number (911). Then you will
place a test call and analyze the result.

Step 8
On SJC-GW, configure a dial peer as follows:

SJC-GW(config)# dial-peer voice 2 pots


SJC-GW(config-dial-peer)# port 0/1/0:23
SJC-GW(config-dial-peer)# destination-pattern 91
SJC-GW(config-dial-peer)# forward-digits 3

Step 9
On the CIPC-1 phone, place a call to 9911.

Step 10
On SJC-GW, examine the debug output and identify the outbound dial peer that is used for the call.

Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:


Calling Number=, Called Number=911, Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=911
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
dialstring=NULL, saf_enabled=0, saf_dndb_lookup=0, dp_result=0
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=2
2: Dial-peer Tag=1

When you look at the debug output, you have to search for the last block that looks up an outgoing dial peer
(dpMatchPeersCore) for called number 911 (Called Number=911) that results in a success (Result=Success).
Ignore the blocks that look up the called numbers 4085551001 and 911. In this case, the relevant part begins
about 35 lines before the end of the output.

The list of matched outgoing dial peers includes dial peers 1 and 2. Dial peer 2 is listed first because it is a more
specific match (3 matching digits instead of 2). Therefore, the call uses dial peer 2.

Explore the Behavior When Three Outbound Dial Peers Exist


You will add a dial peer that matches all four digits of the called number (9911). The pattern, however, will use a
wildcard that allows the third digit to be either 1 or 2. Then you will place a test call and analyze the result.

Step 11
On SJC-GW, configure a dial peer as follows:

SJC-GW(config)# dial-peer voice 3 pots


SJC-GW(config-dial-peer)# port 0/1/0:23
SJC-GW(config-dial-peer)# destination-pattern 9[1-2]1
SJC-GW(config-dial-peer)# forward-digits 3

The destination pattern (99[1-2]1) uses a wildcard, which allows two possible numbers (1 and 2) for the
third digit.

Step 12
On the CIPC-1 phone, place a call to 9911.

Step 13
On SJC-GW, examine the debug output and identify the outbound dial peer that is used for the call.

Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:


Calling Number=, Called Number=911, Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=911
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
dialstring=NULL, saf_enabled=0, saf_dndb_lookup=0, dp_result=0
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=3
2: Dial-peer Tag=2
3: Dial-peer Tag=1

When you look at the debug output, you have to search for the last block that looks up an outgoing dial peer
(dpMatchPeersCore) for the called number 911 (Called Number=911) that results in a success
(Result=Success). Ignore the blocks that look up the called numbers 4085551001 and 911. In this case, the
relevant part begins about 36 lines before the end of the output.

The list of matched outgoing dial peers includes dial peers 1, 2, and 3. Dial peer 3 is listed first because it is the
most specific match (4 matching digits instead of 3 or 2). Therefore, the call uses dial peer 3.

Explore the Behavior When Four Outbound Dial Peers Exist

You will add a dial peer that matches all three digits of the called number (911). Other than the previous pattern,
which allowed the third digit to be either 1 or 2, you will now configure a pattern that is an exact match (911). Then
you will place test calls and analyze the results.

Step 14
On SJC-GW, configure a dial peer as follows:

SJC-GW(config)# dial-peer voice 4 pots


SJC-GW(config-dial-peer)# port 0/1/0:23
SJC-GW(config-dial-peer)# destination-pattern 911
SJC-GW(config-dial-peer)# forward-digits 3

Step 15
On the CIPC-1 phone, place a call to 9911.

Step 16
On SJC-GW, examine the debug output and identify the outbound dial peer that is used for the call.

Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:


Calling Number=, Called Number=911, Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=911
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
dialstring=NULL, saf_enabled=0, saf_dndb_lookup=0, dp_result=0
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=4
2: Dial-peer Tag=3
3: Dial-peer Tag=2
4: Dial-peer Tag=1

When you look at the debug output, you have to search for the last block that looks up an outgoing dial peer
(dpMatchPeersCore) for the called number 911 (Called Number=911) that results in a success
(Result=Success). Ignore the blocks that look up the called numbers 4085551001 and 911. In this case, the
relevant part begins about 37 lines before the end of the output.

The list of matched outgoing dial peers includes dial peers 1, 2, 3, and 4. Cisco IOS Software considers the
longest matching pattern to be the best pattern, regardless of whether a wildcard is used for one or more digits.
Therefore, destination patterns 9[1-2]1 and 911 of dial peers 3 and 4 are considered as equally qualified best
matches. By default, random selection occurs for equally qualified matches and therefore your output may show
dial peer 3 to be preferred over dial peer 4.

Repeat the test call several times. Based on the random selection, sometimes dial peer 3 and sometimes dial
peer 4 will be selected as the outbound dial peer. It may take several attempts until you get a different result.

Configure an Explicit Preference

You can configure a dial peer with a preference. The configured preference is considered when multiple equally
qualified matches are found. A lower preference has priority over a higher preference. The default value for the
preference command is 0.

You will configure dial peer 4 with a higher preference (that is, a lower priority) than dial peer 3, which will remain at
its default preference of 0. Then you will place test calls and analyze the results.

Step 17
On SJC-GW, configure dial peer 4 with a preference of 1.

SJC-GW(config)# dial-peer voice 4


SJC-GW(config-dial-peer)# preference 1

Step 18
On the CIPC-1 phone, place several calls to 9911 and examine the debug output on SJC-GW.
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Calling Number=, Called Number=911, Peer Info Type=DIALPEER_INFO_SPEECH
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Match Rule=DP_MATCH_DEST; Called Number=911
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeersCore:
Result=Success(0) after DP_MATCH_DEST
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchSafModulePlugin:
dialstring=NULL, saf_enabled=0, saf_dndb_lookup=0, dp_result=0
Feb 27 16:48:19: //-1/xxxxxxxxxxxx/DPM/dpMatchPeers:
Result=SUCCESS(0)
List of Matched Outgoing Dial-peer(s):
1: Dial-peer Tag=3
2: Dial-peer Tag=4
3: Dial-peer Tag=2
4: Dial-peer Tag=1

When you look at the debug output, you have to search for the last block that looks up an outgoing dial peer
(dpMatchPeersCore) for the called number 911 (Called Number=911) that results in a success
(Result=Success). Ignore the blocks that look up the called numbers 4085551001 and 911. In this case, the
relevant part begins about 37 lines before the end of the output.

The list of matched outgoing dial peers includes all dial peers. This time, dial peer 3 is always preferred over dial
peer 4. The reason is that dial peer 3 has the default preference of 0 and hence a lower preference (which
means it has a higher priority) than dial peer 4, which is configured with preference 1.

Change the Default Outbound Dial-Peer Selection Process

You can modify the outbound dial-peer selection process by setting the dial peer hunt algorithm using the
command dial-peer hunt followed by a number.

The following hunt algorithms exist (hunt algorithm 0 is the default):

Hunt-Order
Description
Number

This algorithm hunt order is longest match in phone number, explicit preference, random selection, and is the default
0
hunt-order number.

1 This algorithm hunt order is longest match in phone number, explicit preference, least recent use.

2 This algorithm hunt order is explicit preference, longest match in phone number, random selection.

3 This algorithm hunt order is explicit preference, longest match in phone number, least recent use.

4 This algorithm hunt order is least recent use, longest match in phone number, explicit preference.

5 This algorithm hunt order is least recent use, explicit preference, longest match in phone number.

6 This algorithm hunt order is random selection.

7 This algorithm hunt order is least recent use.

You will change the outbound dial-peer selection process to random selection. Then you will place test calls and
analyze the results.

Step 19
On SJC-GW, set the hunt algorithm to random selection.

SJC-GW(config)# dial-peer hunt 6

Step 20
On the CIPC-1 phone, place several calls to 9911 and examine the debug output on SJC-GW.
The list of matched outgoing dial peers includes all dial peers and the order is completely random. The
configured preference and the length of the destination patterns are ignored.

Summary of the Outbound Dial-Peer Selection Process

Based on the tests, you can confirm that the outbound dial-peer selection process depends on the configured hunt
algorithm. By default, the process works as follows:
The dial peer with the longest matching destination pattern is selected as the outbound dial peer.
If multiple equally qualified best matches (equally long patterns) exist, random selection occurs for the equally
qualified best matches.
It does not matter if there is a difference in the number of options for one or more digits within a pattern. As long
as the overall length of the matching destination patterns is the same, the patterns are considered to be equally
qualified.

You might also like