Digit Manipulation Commands

Dial-peer command

Adds digits to the front of the dial string before it is forwarded to the telephony interface

• forward-digits

Dial-peer command

Controls the number of digits forwarded to the telephony interface

• number expansion table

Global command (num-exp)

Expands an extension into a full telephone number or replaces one number with another

• digit translation

Global and dial-peer command

Digit translation rules are used to manipulate the calling number, or ANI, or the called number, or DNIS, digits for a voice call

Cisco Public

Digit manipulation is the task of adding or subtracting digits from the original dialed number to accommodate user-dialing habits or gateway needs. The digits can be manipulated before matching an inbound or outbound dial peer. The following is a list of digit manipulation commands and their uses:

■ prefix: This dial-peer command adds digits to the front of the dial string before it is forwarded to the telephony interface. This occurs after the outbound dial peer is matched, but before digits get sent out of the telephony interface. Use the prefix command when the dialed digits leaving the router must be changed from the dialed digits that had originally matched the dial peer; for example, a call is dialed using a four-digit extension such as 1234, but the call needs to be routed to the PSTN, which requires ten digit dialing. If the four-digit extension matches the last four digits of the actual PSTN telephone number, then you can use the prefix command, prefix 902555, to prepend the six additional digits needed for the PSTN to route the call to 902-555-1234. After the POTS dial peer is matched with the destination pattern of 1234, the prefix command prepends the additional digits, and the string 9025551234 is sent out of the voice port to the PSTN.

■ forward-digits: This dial-peer command specifies the number of digits that must be forwarded to the telephony interface, regardless of whether they are explicitly matched or wildcard matched. This command occurs after the outbound dial peer is matched, but before the digits are sent out of the telephony interface. When a specific number of digits are configured for forwarding, the count is right justified. For example, if the POTS dial peer has a destination pattern configured to match all extensions in the 1000 range (destination-pattern 1...), by default, only the last three digits are forwarded to the PBX that is connected to the specified voice port. If the PBX needs all four digits to route the call, you must use the command forward-digits 4, or forward-digits all, so that the appropriate number of digits are forwarded.

Note To restore the forward-digits command to its default setting, use the default forward-

digits command. Using the no forward-digits command specifies that no digits are to be forwarded.

■ number expansion table (num-exp): This global command expands an extension into a full telephone number or replaces one number with another. The number expansion table manipulates the called number. This command occurs before the outbound dial peer is matched; therefore, you must configure a dial peer with the expanded number in the destination pattern for the call to go through. The number expansion table is useful, for example, where the PSTN changes the dialing requirements from seven-digit dialing to ten-digit dialing. In this scenario, you can do one of the following:

— Make all the users dial all ten digits to match the new POTS dial peer that is pointing to the PSTN

— Allow the users to continue dialing the seven-digit number as they have before, but expand the number to include the area code before the ten-digit outbound dial peer is matched.

Note You must use the show num-exp command to view the configured number-expansion table. You must use the show dialplan number number command to confirm the presence off a valid dial peer to match the newly expanded number.

■ digit translation: Digit translation is a two-step configuration process. First, the translation rule is defined at the global level. Then, the rule is applied at the dial-peer level either as inbound or outbound translation on either the called or calling number. Translation rules manipulate the ANI or DNIS digits for a voice call. Translation rules convert a telephone number into a different number before the call is matched to an inbound dial peer, or before the outbound dial-peer forwards the call. For example, an employee may dial a five-digit extension to reach another employee of the same company at another site. If the call is routed through the PSTN to reach the other site, the originating gateway may use translation rules to convert the five-digit extension into the ten-digit format that is recognized by the central office (CO) switch.

You can also use translation rules to change the numbering type for a call. For example, some gateways may tag a number with more than 11 digits as an international number, even when the user must dial 9 to reach an outside line. In this case, the number that is tagged as an international number needs to be translated into a national number—without the 9—before it is sent to the PSTN.

As illustrated in this topic, there are numerous ways to manipulate digits at various stages of call completion. In many cases, several of these tools will provide a workable solution. The administrator needs to determine which command will be most suitable and the requirements that are necessary for manipulation.

Note To test configured translation rules, you must use the test translation command.

0 0

Post a comment