Configuring Digit Manipulation

Configuring Digit Manipulation
The example illustrated in Figure 7-17 configures digit manipulation to meet the following
network requirements.
■ Sites should be able to call a remote site using just the extensions for that site.
■ The PSTN should be used as a backup in case the WAN link is down or congested.
■ Users should be able to contact 911 emergency services.
The following procedure illustrates how to implement digit manipulation.
■ Configure the San Jose gateway to expand the dialed number when calling the 713
area code.
Router(config)#num-exp 4... 7135554...
Router(config)#dial-peer voice 4000 pots
Router(config-dial-peer)#destination-pattern 17135554...
Router(config-dial-peer)#port 0/1:23
Using the num-exp command in this example, the extension number 4... is expanded
to 7135554... before an outbound dial peer is matched. For example, the user dials
4001, but the outbound dial-peer 4000 is configured to match 7135554001.
394 Authorized Self-Study Guide Cisco Voice over IP (CVOICE)
2XXX
4XXX
713 555-XXXX
3XXX
512 555-1234
1XXX 408 555-XXXX 281 555-XXXX
num-exp 4… 7135554…
dial-peer voice 4000 pots
destination-pattern 7135554…
port 0/1:23
dial-peer voice 3000 voip
destination-pattern 3…
session target ipv4:10.10.0.1
dial-peer voice 3001 pots
destination-pattern 3…
prefix 12815553
preference 1
port 0/1:23
dial-peer voice 911 pots
destination-pattern 911
no digit-strip
port 0/1:23
dial-peer voice 3000 pots
destination-pattern 3…
forward-digits 4
port 0/0:23
0/0
San Jose
Houston
0/0
0/1
10.10.0.1
WAN
V
PSTN
V
Figure 7-17 Configuring Basic Digit Manipulation
■ Configure the San Jose gateway to send all digits when a user dials 911.
Router(config)#dial-peer voice 911 pots
Router(config-dial-peer)#destination-pattern 911
Router(config-dial-peer)#no digit-strip
Router(config-dial-peer)#port 0/1:23
In this example, all three digits are required to process the call through the PSTN.
You can use the no digit-strip command to send the appropriate three digits to the
PSTN.
■ Configure a route to the 281 area code via the WAN.
Router(config)#dial-peer voice 3000 voip
Router(config-dial-peer)#destination pattern 3...
Router(config-dial-peer)#session target ipv4:10.10.0.1
■ Configure a PSTN backup to the 281 area code.
Router(config)#dial-peer voice 3001 pots
Router(config-dial-peer)#destination pattern 3...
Router(config-dial-peer)#prefix 12815553
Router(config-dial-peer)#preference 1
Router(config-dial-peer)#port 0/1:23
In this example, all ten digits are required to process the call through the PSTN. Use
the prefix command to send the prefix numbers 2815553 before forwarding the
three wildcard-matched digits.
■ Configure digit forwarding at the Houston gateway.
Router(config)#dial-peer voice 3000 pots
Router(config-dial-peer)#destination pattern 3...
Router(config-dial-peer)#forward-digits 4
Router(config-dial-peer)#port 0/0:23
In this example, using the forward-digits command allows the PBX to receive the
proper number of digits to route the call to the appropriate extension.
Consider another example, as illustrated in Figure 7-18 and Example 7-17.
Chapter 7: Configuring Advanced Dial Plans 395
FXS Phone1-1
2001
PSTN
Dials: 408 555-2001
DID: 408 555-2XXX
0/1 V 1/0/0
Figure 7-18 Configuring Translation Rules
Example 7-17 Configuring Voice Translation Rules
396 Authorized Self-Study Guide Cisco Voice over IP (CVOICE)
Router(config)#voice translation-rule 1
Router(config-translation-rule)#rule 1 /^4085552/ /2/
Router(config-translation-rule)#exit
Router(config)#voice translation-profile pstn-in
Router(cfg-translation-profile)#translate called 1
Router(cfg-translation-profile)#exit
Router(config)#voice-port 0/1:23
Router(config-voiceport)#translation-profile incoming pstn-in
Router(config-voiceport)#exit
Router(config)#dial-peer voice 2001 pots
Router(config-dial-peer)#destination-pattern 2001
Router(config-dial-peer)#port 1/0/0
This example shows how to configure digit manipulation using translation rules and profiles
to allow an analog phone connected to an FXS port to be able to receive calls from
the PSTN.
The following steps show how to configure digit manipulation to meet network
requirements.
Step 1. Configure a search-and-replace translation rule.
Router(config)#voice translation-rule 1
Router(config-translation-rule)#rule 1 /^4085552/ /2/
There are two types of rules:
Match and Replace Rule:
rule precedence /match-pattern/ /replace-pattern/ [type {match-type
replace-type} [plan {match-type replace-type}]]
Reject Rule:
rule precedence reject /match-pattern/ [type match-type [plan matchtype]]
Step 2. Create a voice translation profile and bind the translation rule, created in
Step 1, to it.
Router(config)#voice translation-profile pstn-in
Router(cfg-translation-profile)#translate called 1
Note To specify a translation profile for all incoming VoIP calls, use the voip-incoming
translation-profile command in global configuration mode. To delete the profile, use the
no form of this command.
Step 3. Bind the translation profile to a voice port.
Router(config)#voice-port 0/1:23
Router(config-voiceport)#translation-profile incoming pstn-in
Step 4. Configure dial peer to match the appropriate extension of analog phone.
Router(config)#dial-peer voice 2001 pots
Router(config-dial-peer)#destination-pattern 2001
Router(config-dial-peer)#port 1/0/0
In the sample configuration using the translation-rule command, the rule is defined to
translate 4085552 into 2. The translation profile “pstn-in” notifies the router to translate
incoming called numbers. It is applied as an inbound translation to the voice port that
connects to the PSTN. The sample configuration replaces the inbound DNIS number and
covers inbound and outbound routing of any dial peers.