Chapter 10: Digit Manipulation

Cisco Press

1 2 3 4 Page 3
Page 3 of 4
  • To assign to a dial peer—Use the command translation-profile [incoming | outgoing] name in dial-peer configuration mode. A dial peer can have one incoming and one outgoing translation profile, as the following configuration demonstrates:

    Boise(config)#dial-peer voice 4 voip
    Boise(config-dial-peer)#translation-profile incoming TEST
    Boise(config-dial-peer)#translation-profile outgoing TEST
    
  • To assign to a voice port—Use the command translation-profile [incoming | outgoing] name in voice-port configuration mode. A voice port can have one incoming and one outgoing translation profile. Inbound profiles are executed before the incoming dial peer is matched. If the port is a member of a trunk group, the profile that you apply to the port overrides any profile that you apply to the trunk group. The following configuration demonstrates assigning a voice translation profile to a voice port:

    Boise(config)#voice-port 2/0:23
    Boise(config-voiceport)#translation-profile incoming TEST
    
  • To assign to a trunk group—You use the same command to assign a voice translation profile to a trunk group that you use to assign a dial peer or voice port: translation-profile [incoming | outgoing] name. All members of the trunk group inherit the voice translation profile, unless a different one is explicitly applied to a port or dial peer in the group. The command is given in trunk-group configuration mode, as the following configuration shows:

    Boise(config)#trunk group 1
    Boise(config-trunk-group)#translation-profile incoming TEST
    
  • To assign to all VoIP calls globally—To associate a voice translation profile with all incoming VoIP calls, use the global command voip-incoming translation-profile name, as the following configuration demonstrates:

    Boise(config)#voip-incoming translation-profile TEST
    

Blocking Calls Using Voice Translation Rules and Profiles

You can also use voice translation rules and profiles to block incoming calls, either for a specific number or all calls matching a specific dial peer. To do this, first create a voice translation rule with the reject keyword. This rule blocks any incoming calls from phone number 410-111-2222:

Boise(config)#voice translation-rule 410
Boise(cfg-translation-rule)#rule 1 reject /4101112222/

Next, create a translation profile, and assign that rule to it:

Boise(config)#voice translation-profile BLOCK
Boise(cfg-translation-profile)#translate calling 410

Finally, apply the translation profile to the appropriate dial peer(s) with the command call-block translation-profile incoming name. When the call is blocked, a reason code is sent to the caller. You can control that message with the call-block disconnect-cause command, as shown here:

Boise(config)#dial-peer voice 99 pots
Boise(config-dial-peer)#call-block translation-profile incoming BLOCK
Boise(config-dial-peer)#call-block disconnect-cause incoming call-reject

Testing Voice Translation Rules

Because number translations can get complex, testing your translations before putting them into production is crucial. The easiest way to test is with the test voice translation-rule rule-number digit-string command. (Output from this command is shown in Examples 10-3 through 10-8.) To see the translations in action, enter debug voice translation before giving this command. This command shows whether the number is matched or not, and what is replaced. Example 10-10 shows the combination of testing the voice translation rule with debugging voice translation. The debug output shows that there was a successful substitution, the original number, the pattern that was matched, the replacement pattern, and the translated number.

Example 10-10 Testing and Debugging Voice Translation Rules

Boise(config)#voice translation-rule 4 
Boise(cfg-translation-rule)#rule 1 /^\(22\)444\(5...\)$/ /\1777\2/
Boise(cfg-translation-rule)#^Z
Boise#test voice translation-rule 4 224445678
Matched with rule 1
Original number: 224445678   Translated number: 227775678
Original number type: none   Translated number type: none
Original number plan: none   Translated number plan: none

Boise#
*Mar 1 03:42:08.636: sed_subst: Successful substitution; pattern=224445678
  matchPattern=^(22)444(5...)$ replacePattern=\1777\2 replaced pattern=227775678
*Mar 1 03:42:08.640: regxrule_subst_num_type: Match Type = none, Replace Type = none
  Input Type = none
*Mar 1 03:42:08.640: regxrule_subst_num_plan: Match Plan = none, Replace Plan = none
  Input Plan = none

The commands show voice translation-rule and show voice translation-profile help verify the configuration.

Manipulating Caller ID

During an outgoing call, the CLID is sent as part of the call information. CLID information includes at least one calling party number. The CLID might also include a name, a second number, and redirecting number information. You can control the information sent at the CallManager, and you can configure the gateway to control the information that shows up on caller ID. Some companies prefer that the main corporate number is displayed, rather than the actual extension of the person calling, for instance. The receiver can use CLID information in many ways, such as to route emergency services calls, so you must take this into account if you manipulate the CLID.

CLID Commands

You can manipulate caller ID information by a set of clid commands. These commands allow you to remove or change the calling party information transmitted with a call, or send it but prevent it from being displayed. clid commands apply to specific dial peers when given under dial-peer configuration mode. They apply globally when given under the voice service voip configuration mode (available in Cisco IOS Software Release 12.4(4)T and later). Not all options are available when configuring CLID in this mode. The commands include the following (those available under voice service voip are noted):

  • clid network-number number—Specifies the network number to be sent in the CLID information. It sets the presentation indicator to "Y" and the screening indicator to "network provided." Available in both dial-peer and voice service voip configuration modes.

  • clid second-number strip—Removes the original calling number from the H.225 source address field. You can also give this command on the same line as the clid network-number command. It is valid only if you have configured a network number.

  • clid restrict—Transmits the calling party information but sets the presentation indicator to "N" so that it is not displayed to the called party.

  • clid strip [name | pi-restrict [all]]—Removes the CLID number if just the clid strip command is given and sets the presentation indicator to "N." It removes the CLID name if the name option is added. To remove both the name and number, you must enter both commands separately. The pi-restrict option causes the CLID number to be stripped only when you set the progress indicator to "restricted." Adding the all keyword strips both the CLID number and name. The pi-restrict all option is available in both dial-peer and voice service voip configuration modes.

  • clid substitute name—Substitutes the calling number for the display name. Available in both dial-peer and voice service voip configuration modes.

Station ID Commands

You can control the caller ID information that FXS and FXO ports send with the station-id [name | number] string command. Using either the name or number keywords also enables caller ID on that port. The station-id command is typically used on FXS voice ports that are attached to a phone or fax that might originate on-net calls. The information that you configure with this command shows up as the caller ID on the device connected to the remote FXS port. You might also use this command on an FXO port to supply caller ID information if that does not come from the central office, for example:

VoiceGW(config)#voice-port 1/0/0
VoiceGW(config-voiceport)#station-id name C.P. Ryan
VoiceGW(config-voiceport)#station-id number 1112223000

Order of Operation in Digit Manipulation

As you have seen, some digit manipulation techniques accomplish the same result. You can use all the various methods of digit manipulation on the same gateway, but it is not recommended and usually not needed. Choosing which technique to use is sometimes more of an art than a science. For instance, an emergency call to 911 routed out a POTS interface would have all of its digits stripped before tranmission, so the call would not go through. To remedy this, you could configure no digit-strip, or forward-digits 3, or prefix 911 on the dial peer. You could even configure a translation profile or number expansion to change the called number so that the digits 911 would be sent, although that would be the hardest way to do it.

The point at which you must perform the manipulation is also is a factor. If the digit manipulation should apply to all calls, or be done before a dial peer is matched, you can use one of the global techniques. If the manipulation will apply only to certain calls, you can configure it under the dial peers for those calls. Some techniques are specific to POTS or VoIP dial peers, so that might aid your decision.

Consistency is a major consideration if you have many gateways needing similar digit manipulations to manage. Pick a technique (or techniques, if necessary), and standardize on it. In general, stick to the simplest way of accomplishing what you want. This consistency makes the gateways easier to configure, easier to manage, easier to troubleshoot, and probably easier on the router.

A good understanding of how the different methods interact will help your decision making, and in troubleshooting problems, also. Figure 10-1 shows how a call flows through the router, and where each technique is applied.

A POTS call first comes in a voice port, is matched to an incoming dial peer, and then is matched to an outgoing dial peer. Rules that are assigned to the voice port are applied first, next any global number expansion, then those on the incoming dial peer, and lastly those on the outgoing dial peer. If a prefix command is under the dial peer, the translation is done first.

Figure 10-1

Figure 10-1

Order of Operation in Digit Manipulation

A VoIP call matches an incoming dial peer, then an outgoing dial peer, and possibly a POTS voice port. Globally assigned rules such as VoIP incoming translation profile and number expansion are executed first, then any rules on the incoming dial peer, and finally any rules on the outgoing dial peer. If a Tcl script is associated with a dial peer to manipulate the ANI or DNIS, the script runs after the dial peer is matched but before any translation profile associated with that dial peer.

Table 10-3 summarizes the order of operation for techniques discussed in this chapter.

Table 10-3 Digit Manipulation Techniques—Order of Operation

Type of CallWhen You Apply ItDigit Manipulation Technique
POTSBefore the inbound dial peer is matched

Translation rule or profile on voice port

Number expansion
After the inbound dial peer is matched

CLID operations

Translation rule or profile on POTS dial peer
After the outbound POTS dial peer is matchedTranslation rule or profile on POTS dial peer
After the inbound dial peer is matched

CLID operations

Prefix digits
VoIPBefore the inbound dial peer is matched

VoIP incoming translation profile

Number expansion
After the inbound dial peer is matched

CLID operations

Translation rule or profile on VoIP dial peer
After the outbound VoIP dial peer is matched

Translation rule or profile on VoIP dial peer

CLID operations

Troubleshooting Digit Manipulation

When you are troubleshooting digit manipulation, first verify the configuration. Test the digit manipulations as much as possible before deploying them in a live network. If they do not work as expected, check to make sure that they are correctly configured and that other rules do not interfere. Remember the order in which the router processes rules.

This chapter discussed several troubleshooting and verification commands, some of the most useful of which are as follows:

  • test voice translation-rule rule-number phone-number—Shows the results of a translation rule, enabling you to test it to ensure that it does what you planned

  • debug voice translation—Shows the translations happening

  • show dialplan number number—Verifies number expansion and which dial peers a phone number matches

  • debug voip ccapi inout—Shows inbound and outbound dial peers being matched

  • show num-exp [number]—Displays the number expansion rules configured

  • show dial-peer voice [tag]—Displays any CLID, translation profiles, call blocking, disconnect cause, digit stripping, forwarding, or prefixing that is configured on the dial peer

  • show voice translation-rule [number | sort [ascending|descending]]—Lists the translation rules that are configured on the router and all translation patterns configured for each one

  • show voice translation-profile [name | sort [ascending|descending]]—Lists the translation profiles configured on the router and all translation rules associated with each one

  • debug isdn q931—Shows the called and calling numbers sent out a PRI link for troubleshooting CLID commands

  • csim start phone-number—Simulates a phone call from the router; can be used with debugs

Case Study

Figure 10-2 shows the Boise, Idaho office network. In this case study, the Boise office has the following telephone network requirements:

  • The office has been experiencing spam faxes lately from one specific phone number, 410-111-2222. That number needs to be blocked incoming on the Boise PRI.

  • The office has a small help desk staff that takes calls from the Miami, Florida office and the Lima, Peru office. Both locations call the same help desk number, 3-0150. (3 is a site code.) You need to route calls from Miami to the English-speaking group at 3-0148, and you need to route calls from Lima to the Spanish-speaking group at 3-0149. Both calls will go through the local PBX. The internal company numbers for Miami are 2-0100 through 2-0199. The internal numbers for Lima are 6-6200 through 6-6250.

  • Caller ID should show only the main office number of 208-555-0100 for outgoing calls.

  • Outgoing local PSTN calls should have the initial 9 stripped and ten digits sent to the PSTN.

Figure 10-2

Figure 10-2

Case Study Network

Example 10-11 shows the configuration that is necessary on the Boise router to block the spam faxes, route the help desk calls, change the caller ID, and send the appropriate called number to the PSTN.

Example 10-11 Digit Manipulation Case Study

Related:
1 2 3 4 Page 3
Page 3 of 4
The 10 most powerful companies in enterprise networking 2022