Tests a telephone number against a voice normalization rule and returns the number after the normalization rule has been applied. Voice normalization rules are used to convert a telephone dialing requirement (e.g., you must dial 9 to access an outside line) to the E.164 phone number format used by Microsoft Communications Server 2010.
Syntax
Test-CsVoiceNormalizationRule -DialedNumber <PhoneNumber> -NormalizationRule <NormalizationRule> |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
DialedNumber |
Required |
PhoneNumber |
The phone number against which you want to test the normalization rule specified in the NormalizationRule parameter. Full Data Type: Microsoft.Rtc.Management.Voice.PhoneNumber |
NormalizationRule |
Required |
NormalizationRule |
An object containing a reference to the normalization rule against which you want to test the number specified in the DialedNumber parameter. Full Data Type: Microsoft.Rtc.Management.WritableConfig.Policy.Voice.NormalizationRule |
Detailed Description
This cmdlet allows you to see the results of applying a voice normalization rule to a given telephone number. Voice normalization rules are a required part of phone authorization and call routing. They define the requirements for converting - or translating - numbers from a format typically entered by users to a standard (E.164) format. Use this cmdlet to troubleshoot dialing issues or to verify that rules will work as expected against given numbers.
Return Types
Returns an object of type Microsoft.Rtc.Management.Voice.NormalizationRuleTestResult.
Examples
-------------------------- Example 1 --------------------------
Copy Code | |
---|---|
Get-CsVoiceNormalizationRule -Identity "global/11 digit number rule" | Test-CsVoiceNormalizationRule -DialedNumber 14255559999 |
This example runs a voice normalization test against the voice normalization rule with the Identity "global/11 digit number rule". First the Get-CsVoiceNormalizationRule cmdlet is run to retrieve the rule with the Identity "global/11 digit number rule". That rule object is then piped to the Test-CsVoiceNormalizationRule cmdlet, where the rule is tested against the telephone number 14255559999. The output will be the DialedNumber after the voice normalization rule "global/11 digit number rule" has been applied. If this rule does not apply to the DialedNumber value (for example, if the normalization rule matches the pattern for an 11-digit number and you supply a 7-digit number) no value will be returned.
-------------------------- Example 2 --------------------------
Copy Code | |
---|---|
$a = Get-CsVoiceNormalizationRule -Identity "global/11 digit number rule" Test-CsVoiceNormalizationRule -DialedNumber 5551212 -NormalizationRule $a |
Example 2 is identical to Example 1 except that instead of piping the results of the Get operation directly to the Test cmdlet, the object is first stored in the variable $a and then is passed as the value to the parameter NormalizationRule to be used as the voice normalization rule against which the test will run.
-------------------------- Example 3 --------------------------
Copy Code | |
---|---|
Get-CsVoiceNormalizationRule | Test-CsVoiceNormalizationRule -DialedNumber 2065559999 |
This example runs a voice normalization test against all voice normalization rules defined within the Communications Server deployment. First the Get-CsVoiceNormalizationRule cmdlet is run (with no parameters) to retrieve all the voice normalization rules. The collection of rules that is returned is then piped to the Test-CsVoiceNormalizationRule cmdlet, where each rule in the collection is tested against the telephone number 2065559999. The output will be a list of translated numbers, one for each rule tested. If a rule does not apply to the DialedNumber value (for example, if the normalization rule matches the pattern for an 11-digit number and you supply a 7-digit number) there will be a blank line in the list for that rule.