Modifies a voice normalization rule. Voice normalization rules are used to convert a telephone dialing requirement (for example, dialing 9 to access an outside line) to the E.164 phone number format used by Microsoft Communications Server 2010.
Syntax
Set-CsVoiceNormalizationRule [-Identity <XdsIdentity>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-IsInternalExtension <$true | $false>] [-Pattern <String>] [-Priority <Int32>] [-Translation <String>] [-WhatIf [<SwitchParameter>]] |
Set-CsVoiceNormalizationRule [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-Instance <PSObject>] [-IsInternalExtension <$true | $false>] [-Pattern <String>] [-Priority <Int32>] [-Translation <String>] [-WhatIf [<SwitchParameter>]] |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Optional |
XdsIdentity |
A unique identifier for the rule. The Identity specified must include the scope followed by a slash followed by the name; for example: site:Redmond/Rule1, where site:Redmond is the scope and Rule1 is the name. |
Description |
Optional |
String |
A friendly description of the normalization rule. Maximum string length: 512 characters. |
Pattern |
Optional |
String |
A regular expression that the dialed number must match in order for this rule to be applied. |
Translation |
Optional |
String |
The regular expression pattern that will be applied to the number to convert it to E.164 format. |
IsInternalExtension |
Optional |
Boolean |
If True, the result of applying this rule will be a number internal to the enterprise. If False, applying the rule results in an external number. |
Priority |
Optional |
Int32 |
The order in which rules are applied. A number might match more than one rule. This parameter sets the order in which the rules are tested against the number. |
Instance |
Optional |
NormalizationRule |
Allows you to pass a reference to an object to the cmdlet rather than set individual parameter values. This object must be of type NormalizationRule and can be retrieved by calling Get-CsVoiceNormalizationRule |
Confirm |
Optional |
SwitchParameter |
Prompts you for confirmation before executing the command. |
Force |
Optional |
SwitchParameter |
Suppresses any confirmation prompts that would otherwise be displayed before making changes. |
WhatIf |
Optional |
SwitchParameter |
Describes what would happen if you executed the command without actually executing the command. |
Detailed Description
This cmdlet modifies a named voice normalization rule. These rules are a required part of phone authorization and call routing. They define the requirements for converting (or translating) numbers from an internal Communications Server format to a standard (E.164) format. An understanding of regular expressions is helpful in order to define number patterns that will be translated.
Rules that are modified by using this cmdlet are part of the dial plan and, in addition to being accessible through the Get-CsVoiceNormalizationRule cmdlet, can also be accessed through the NormalizationRules property returned by a call to the Get-CsDialPlan cmdlet.
Return Types
Set-CsVoiceNormalizationRule does not return a value or object. Instead, the cmdlet configures instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.Voice.NormalizationRule object.
Examples
-------------------------- Example 1 --------------------------
Copy Code | |
---|---|
Set-CsVoiceNormalizationRule -Identity "site:Redmond/Prefix Redmond" -Description "Add a prefix to all numbers on site Redmond" |
This example sets the description of the rule Prefix Redmond on site Redmond to "Add a prefix to all numbers on site Redmond".
-------------------------- Example 2 --------------------------
Copy Code | |
---|---|
Set-CsVoiceNormalizationRule -Identity global/SeattleFourDigit -Description "Translate an internal four-digit extension" -Translation +1206556$1 |
This example modifies the voice normalization rule with the identity global/SeattleFourDigit. A new Description has been specified to reflect what the rule does now. In addition, a Translation value has been specified that modifies the rule to translate any number matching the existing pattern of this rule to the same number but with the prefix +1206556. For example, if the existing pattern matched any four-digit number and the number 1234 were entered, this rule would translate that extension to the number +12065561234.
-------------------------- Example 3 --------------------------
Copy Code | |
---|---|
$a = Get-CsVoiceNormalizationRule -Identity global/RedmondFourDigit $a.name = "RedmondRule" Set-CsVoiceNormalizationRule -Instance $a |
Example 3 changes the name of the normalization rule. Keep in mind that changing the name also changes the name portion of the Identity. The Set-CsVoiceNormalizationRule cmdlet doesn’t have a -Name parameter, so in order to change the name we first call Get-CsVoiceNormalizationRule to retrieve the rule with the Identity global/RedmondFourDigit and assign the returned object to the variable $a. We then assign the string RedmondRule to the Name property of the object. Next, we pass the variable to Set-CsVoiceNormalizationRule to make the change permanent.