Dial Peer Matching

Dial Peer Matching
Routers must match the correct inbound and outbound dial peers to successfully complete
a call. For all calls going through the router, Cisco IOS associates one dial peer to
each call leg.
Figure 7-19 shows the following examples of different types of calls going through a
Cisco IOS router:
■ Call 1 is from another H.323 gateway across an IP network to a traditional PBX connected
to the router (for example, via a PRI interface). For this call, an incoming VoIP
dial peer and an outgoing POTS dial peer are selected.
■ Call 2 is from an analog phone connected to an FXS port on the router to a UCM
cluster across an IP network. For this call, an incoming POTS dial peer and an outgoing
VoIP dial peer are selected by the router.
■ Call 3 is from an IP phone controlled by Cisco Unified CME or SRST to a PSTN
interface on the router (for example, a PRI interface). For this call, an automatically
generated POTS dial peer (corresponding to the [ephone] configured on the router)
and an outgoing POTS dial peer are selected.
398 Authorized Self-Study Guide Cisco Voice over IP (CVOICE)
PSTN
IP
V
UCM
VoIP POTS
POTS VoIP
POTS POTS
Incoming
Call Leg
H.323
Gateway
Analog
Phone
UCME/SRST
IP Phone
Outgoing
Call Leg
Incoming
Dial Peers
Outgoing
Dial Peers
1
2
3
1
2
3
Gateway
PBX
Gateway
with
UCME
IP
V
V
Figure 7-19 Matching Dial Peers
It is important to understand that a Cisco IOS gateway performs dial-peer matching every
time it receives called-party information. For en bloc signaling, this is straightforward.
Specifically, the called-party information is used to find the best dial peer.
For digit-by-digit signaling, such as PSTNs with overlap sending and receiving, Cisco
Unified CME and SRST ephones, and FXS ports, the gateway performs dial-peer matching
each time a digit is received.
For example, dial peers are configured on a gateway, as illustrated in Figure 7-20 and
Example 7-18.
Chapter 7: Configuring Advanced Dial Plans 399
V
User Dials
90114989123456
0/0/0
0/0/1
PSTN
International
Long-Distance
Carrier
Figure 7-20 Digit-by-Digit Signaling
Example 7-18 Digit-by-Digit Signaling Configuration
Router(config)#dial-peer voice 90 pots
Router(config-dial-peer)#destination-pattern 9T
Router(config-dial-peer)#port 0/0/0:23
Router(config-dial-peer)#exit
Router(config)#dial-peer voice 90110 pots
Router(config-dial-peer)#destination-pattern 9011T
Router(config-dial-peer)#port 0/0/1:23
The following steps describe what occurs during the call in this example.
1. A user wants to call the international number 90114989123456 and starts to dial.
2. Because the first digit received is a 9, the gateway performs dial-peer matching.
3. Dial-peer 90 is matched, and any further digits are collected by the control character
T that indicates the destination-pattern value is a variable-length dial string.
4. The user finishes dialing, and the call is routed using dial-peer 90. Dial-peer 90110
will never be considered.
For en bloc signaling, the DNIS is used, so the process is as follows:
1. A user wants to call the international number 90114989123456 and starts to dial.
2. Because en bloc signaling is enabled, the gateway continues to collect digits until the
interdigit timeout value is exceeded.
3. The user finishes dialing, and the call is routed using dial-peer 90110.
When matching the destination pattern, the Cisco IOS gateway performs a left-aligned
match (that is, the pattern is matched with the beginning of the received string).
In the scenario illustrated in Figure 7-21 and Example 7-19, both dial peers match three
digits when 555-1234 is the called number.
400 Authorized Self-Study Guide Cisco Voice over IP (CVOICE)
V
User Dials
555-1234
0/0/0
0/0/1
WAN
PSTN
Figure 7-21 Destination Pattern Matching
Example 7-19 Destination Pattern Matching Configuration
Router(config)#dial-peer voice 1 pots
Router(config-dial-peer)#destination-pattern 555
Router(config-dial-peer)#port 0/0/0:23
Router(config-dial-peer)#exit
Router(config)#dial-peer voice 2 pots
Router(config-dial-peer)#destination-pattern 555....
Router(config-dial-peer)#port 0/0/1:23
If the first three digits of the called number are 555, dial-peer 1 will be matched because
it explicitly matches the called number. The rest of the digits will not be processed.
Matching to Inbound and Outbound Dial Peers
When a Cisco IOS gateway routes a call, the inbound and outbound dial peers need to be
matched. The gateway will search through all dial peers and apply matching criteria.
After a dial peer has been matched, the gateway selects it as the inbound or outbound
dial peer.
To match incoming call legs to incoming dial peers, the router selects a dial peer by
matching the information elements in the setup message (called number/DNIS and calling
number/ANI) with four configurable dial-peer attributes.
Inbound Dial-Peer Matching
Inbound dial-peer matching is prioritized as follows:
1. If the called number (that is, the DNIS) matches with the incoming called-number
configuration on a dial peer, this dial peer will be selected as the inbound dial peer.
No further matching is performed.
2. If no dial peer has been found, the calling number (that is, the ANI) is checked. If the
answer-address configuration of a dial peer is matched, this dial peer will be selected,
and no further matching is performed.
3. If the calling number (the ANI) matches with the destination-pattern configuration
of a dial peer, this dial peer will be selected, and no further matching is performed.
4. If none of the previous attempts were successful and the call is inbound on a POTS
port, a dial peer with a matching voice-port configuration is searched.
5. If still no match is found, the default dial-peer 0 is used.
Chapter 7: Configuring Advanced Dial Plans 401
Note Default dial-peer matching is not desirable because default call characteristics
might not be what you want.
The router needs to match only one of these conditions. It is not necessary for all the
attributes to be configured in the dial peer or that every attribute match the call setup
information. The router stops searching as soon as one dial peer is matched, and the call
is routed according to the configured dial peer attributes. Even if other dial peers exist
that would match, only the first match is used.
Note A typical misconception about inbound dial-peer matching is that the sessiontarget
of a dial peer is used. This is not true. Instead, use the incoming called-number or
answer-address command to ensure that the correct inbound dial peer is selected.
Outbound Dial-Peer Matching
How the router selects an outbound dial peer depends on whether DID is configured in
the inbound POTS dial peer:
■ If DID is not configured in the inbound POTS dial peer, the router collects the
incoming dialed string digit-by-digit and compares these digits to configured destination
patterns. After an inbound dial peer is matched, the gateway plays a second
dial tone to the caller and waits for them to enter additional digits. This is referred to
as two-stage dialing. As soon as a dial peer fully matches the destination pattern,
the router immediately routes the call using the configured attributes in the matching
dial peer.
■ If DID is configured in the inbound POTS dial peer, the router uses the full incoming
dial string to match the destination pattern in the outbound dial peer. This is known
as one-stage dialing. With DID, the setup message contains all the digits necessary
to route a call, so no additional digit collection is required. If more than one dial
peer matches the dial string, all the matching dial peers are used to form a hunt
group. The router attempts to place the outbound call leg using all of the dial peers
in the hunt group until one is successful.
Outbound dial-peer matching is prioritized as follows by default:
1. The gateway searches through all dial peers and tries to match the called number
(the DNIS) with the destination-pattern configuration. The dial peer with the closest
match is selected.
2. If multiple equal matches are found, the dial peer with the lowest preference configuration
wins.
3. If equal preferences are found, a random dial peer is selected.
Dial-Peer Call Routing and Path Selection Commands
Table 7-5 shows commands used to configure ANI and DNIS matching on dial peers.
Table 7-5 ANI and DNIS Matching on Dial Peers
Command Description
destination-pattern [+]string[T] Use this command in dial-peer configuration mode to
specify either the prefix or the full E.164 telephone
number to be used for a dial peer. To disable the configured
prefix or telephone number, use the no form of
this command. The following characters can be used:
■ The asterisk (*) and pound sign (#) that appear on
standard touch-tone dial pads.
■ Comma (,), which inserts a pause between digits.
Table 7-5 ANI and DNIS Matching on Dial Peers (continued)
Command Description
■ Period (.), which matches any entered digit. (This
character is used as a wildcard.)
■ Percent sign (%), which indicates that the preceding
digit occurred zero or more times, similar to the
wildcard usage.
■ Plus sign (+), which indicates that the preceding
digit occurred one or more times.
Note: This plus sign has a different purpose than the
plus sign in front of a digit string, which is used to
indicate that the string is an E.164 standard number.
■ Circumflex (^), which indicates a match to the
beginning of the string.
■ Dollar sign ($), which matches the null string at the
end of the input string.
■ Backslash symbol (\), which is followed by a single
character and matches that character; can be used
with a single character with no other significance
(matching that character).
■ Question mark (?), which indicates that the preceding
digit occurred zero or one times.
■ Brackets ( [ ] ), which indicate a range (a sequence of
characters enclosed in the brackets); only numeric
characters from 0 to 9 are allowed in the range.
■ Parentheses ( ( ) ), which indicate a pattern and are
the same as the regular expression rule.
incoming called-number [+]string[T] Use this command in dial-peer configuration mode to
specify a digit string that can be matched by an incoming
call to associate the call with a dial peer. To reset to
the default, use the no form of this command.
answer-address [+]string[T] Use this command in dial-peer configuration mode to
specify the full E.164 telephone number to be used to
identify the dial peer of an incoming call. To disable
the configured telephone number, use the no form of
this command.
Table 7-6 shows commands used to configure direct-inward-dial, dial-peer preferences,
and outbound status checks.
Chapter 7: Configuring Advanced Dial Plans 403
Table 7-6 Direct-Inward-Dial and Dial-Peer Matching Commands
Command Description
direct-inward-dial Use this command in dial-peer configuration
mode to enable the DID call treatment for an
incoming called number. When this feature is
enabled, the incoming call is treated as if the digits
were received from the DID trunk. The called
number is used to select the outgoing dial peer.
No dial tone is presented to the caller.
preference value Use this command in dial-peer configuration
mode to indicate the preferred order of a dial
peer within a hunt group. The value variable can
be a value in the range of 0 through 10. To
remove the preference, use the no form of this
command. The default is 0 and is not displayed
in a configuration.
no dial-peer outbound status-check pots Use this command in privileged EXEC mode to
check the status of outbound POTS dial peers
during call setup and to disallow, for that call,
any dial peers whose status is down.
This might be required on some ISDN links
where the CO ISDN switch activates the ISDN
layer only if activity is detected on the link.