15 February 2010

Digit Manipulation


Digit Manipulation Techniques summary table:
Digit Stripping
POTS dial peers by default remove, or strip, any outbound digits that explicitly match their destination pattern.
To disable digit stripping use command:
 no digit-strip

Forward Digits
You can specify the exact number of digits to be forwarded. If the number of digits presented exceeds the number allowed, the rightmost
digits are sent.
forward-digits [number | all | extra]
where:
- number gives the number of digits to be forwarded.
- all means to forward all digits.
- extra tells the gateway to forward any digits that are longer than the length of the destination pattern.

Prefix Digits
You can transmit more than the dialed digits of a called number. Only for POTS dial peers.
prefix string


Number Expansion

Number expansion is another way to add digits to an outgoing called number; however, number expansion is applied to the gateway as a whole and manipulates only the called number. Number expansion manipulation occurs before any outbound dial peer is matched. Outbound dial peers match the expanded numbers, not the original ones.
num-exp original-number expanded-number

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.
CLID commands:
- clid network-number number Specifies the network number to be sent in the IE. 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.

Voice Translation Rules and Profiles
Using voice translation profiles for digit manipulation requires three steps:
Step 1.
Create one or more voice translation rules and a prioritized list of translations associated with each rule. A maximum of 128 rules is supported, with 15 translations per rule.
Step 2.
Create one or more voice translation profiles and associate the translation rules to the profile. You can define up to 1000 profiles, each with its own unique name. Within the profile, you can apply one voice translation rule to calling numbers, one to called numbers, and one to redirected called numbers.
Step 3.
Apply the voice translation profile to all VoIP calls globally, a dial peer, a voice port, a trunk group, a source IP group, or an interface.

Creating Voice Translation Rules

To create a voice translation rule, use the command voice translation-rule tag in global configuration mode. Then create an ordered list of one or more rules with the following command:
 
rule precedence /match pattern/ /replace pattern/ [type {match-type replace-type} [plan {match-type replace-type}]]
You can enter rules in any order; the precedence value determines the order in which the rules are executed. You can configure up to 15 rules.
Creating Voice Translation Profiles
(config)#voice translation-profile name
(cfg-translation-profile)#translate ?
  called           Translation rule for the called-number
  calling          Translation rule for the calling-number
  redirect-called  Translation rule for the redirect-number
(cfg-translation-profile)#translate called 1
(cfg-translation-profile)#translate calling 2
(cfg-translation-profile)#translate redirect-called 3

Applying Translation Profiles
After you create a voice translation profile, you can assign it to:
- Dial-Peer
- Voice Port
- Trunk Group
- VoIP Calls Globaly
- NFAS
- SRST

Blocking Calls
!
(config)#voice translation-rule 410
(cfg-translation-rule)#rule 1 reject /expression/
!
(config)#voice translation-profile BLOCK
(cfg-translation-profile)#translate calling 410
!
(config)#dial-peer voice 1 pots
(config-dial-peer)#call-block translation-profile incoming BLOCK
(config-dial-peer)#call-block disconnect-cause incoming call-reject
!

Order of Operation in Digit Manipulation
Translation Profile Order
 Troubleshooting Digit Manipulation
- 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 numbernumber 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

No comments: