Digit Manipulation

A router matches outgoing dial peers with the destination-pattern command. For incoming dial peers it uses one of the following 5 rules:

1.Match the dialed number (DNIS) using the incoming called-number dial peer configuration command.
2.Match the caller ID information (ANI) using the answer-address dial peer configuration command.
3.Match the caller ID information (ANI) using the destination-pattern dial peer configuration command.
4.Match an incoming POTS dial peer by using the port dial-peer configuration command.
5.If no match has been found using the previous four methods, use dial peer 0.

1.Prefix command. Only for POTS dial peers. Scenario: WAN to PSTN failover.

R(config)# dial-peer voice 10 voip
R(config-dial-peer)# destination-pattern 6…
R(config-dial-peer)# session target ipv4:
R(config-dial-peer)# preference 0     //for when you have multiple dial-peers with the same destination-pattern; the lowest preference wins; by default the preference is 0.
R(config-dial-peer)# exit
R(config)# dial-peer voice 11 pots
R(config-dial-peer)# destination-pattern 6…
R(config-dial-peer)# port 1/0:1
R(config-dial-peer)# preference 1
R(config-dial-peer)# no digit-strip
R(config-dial-peer)# prefix 1512555

2.Number-expansion. Global command. Scenario: translating all numbers from PSTN to receptionist.

R(config)# voice-port 1/0/1
R(config-voiceport)# connection plar 0
R(config-voiceport)# exit
R(config)# num-exp 0 5000     //translates 0 into 5000

3.Forward-digits. Only for POTS dial-peers.

R(config)# dial-peer voice 11 pots
R(config-dial-peer)# destination-pattern 9911
R(config-dial-peer)# port 1/0/0
R(config-dial-peer)# forward-digits 3

4.Digit-strip. Only for POTS dial-peers.

R(config)# dial-peer voice 10 pots
R(config-dial-peer)# destination-pattern 911
R(config-dial-peer)# port 1/0/0
R(config-dial-peer)# no digit-strip

5.Translation Profiles. Global and POTS or VoIP dial-peers. Scenario: WAN to PSTN failover.

Step 1. Define the rules that dictate how the router will transform the number.
Step 2. Associate the rules into a translation profile.
Step 3. Assign the translation profile to a dial peer.

In this scenario if the IP WAN link fails, all the calls will go to the PSTN matching outgoing dial-peer 100, and the 1… numbers will be translated into 0210011…

R(config)# voice translation-rule 1
R(cfg-translation-rule)# rule 1 /1\(…\)/ /021001\1/     //the “\” character means that the next character is a control character and should not be matched or replaced
R(config)# voice translation-profile CHANGE_DID
R(cfg-translation-profile)# translate called 1
R(config)# dial-peer voice 100 pots
R(config-dial-peer)# translation-profile outgoing CHANGE_DID

More examples of Translation Rules and Number Slicing HERE.

6.Troubleshooting commands

#test voice translation-rule 1 0355105001
#show dialplan number 0355105001


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s