Modifies an existing outbound translation rule. An outbound translation rule converts phone numbers to the local dialing format for interaction with private branch exchange (PBX) systems.
Syntax
Set-CsOutboundTranslationRule [-Identity <XdsIdentity>] [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-Pattern <String>] [-Priority <Int32>] [-Translation <String>] [-WhatIf [<SwitchParameter>]] |
Set-CsOutboundTranslationRule [-Confirm [<SwitchParameter>]] [-Description <String>] [-Force <SwitchParameter>] [-Instance <PSObject>] [-Pattern <String>] [-Priority <Int32>] [-Translation <String>] [-WhatIf [<SwitchParameter>]] |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Optional |
String |
The unique identifier of the outbound translation rule you want to modify. The Identity consists of the scope followed by a unique name within each scope. For example, site:Redmond/OutboundRule1. |
Instance |
Optional |
TranslationRule |
An object reference to an outbound translation rule. This object must be of type Microsoft.Rtc.Management.WritableConfig.Settings.TrunkConfiguration.TranslationRule, which can be retrieved by calling Get-CsOutboundTranslationRule. |
Confirm |
Optional |
SwitchParameter |
Prompts you for confirmation before executing the command. |
Description |
Optional |
String |
A friendly decription of the outbound translation rule. This description can be used to help administrators clearly identify the purpose of the rule. |
Pattern |
Optional |
String |
A regular expression representing the number pattern to which the Translation will be applied. |
Priority |
Optional |
Int32 |
If a number matches the Pattern of more than one outbound translation rule, rules are applied in priority order. Use this parameter to assign a priority to the rule. |
Translation |
Optional |
String |
A regular expression that will be applied to the number matching the Pattern to prepare that number for outbound routing. |
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
Call this cmdlet to modify an existing outbound translation rule. Microsoft Communications Server 2010 normalizes phone numbers to E.164 format. However, many private branch exchange (PBX) systems aren’t able to work with this format. Outbound translations rules translate the number to the local dialing format prior to sending the number to the Mediation Server or Gateway.
Each outbound translation rule is associated with a trunk configuration. That means that using this cmdlet to modify a rule will impact the corresponding trunk configuration. More than one outbound translation rule can be associated with each configuration. Therefore, the Identity for each rule consists of a scope along with a name that is unique within the scope (in the format scope/name, for example site:Redmond/OBR1). The rule is automatically associated with the trunk configuration with the same scope. Calling Set-CsOutboundTranslationRule is the recommended way of changing outbound translation rules in a trunk configuration.
Return Types
This cmdlet does not return a value. It modifies an object of type Microsoft.Rtc.Management.WritableConfig.Settings.TrunkConfiguration.TranslationRule.
Examples
-------------------------- Example 1 --------------------------
Copy Code | |
---|---|
Set-CsOutboundTranslationRule -Identity " site:Redmond/Prefix Redmond" -Description "Convert to seven digits" -Pattern "^\+1425(\d{7})$" -Translation $1 |
This example modifies the global outbound translation rule with the Identity site:Redmond/Prefix Redmond. We’ve included a Description explaining that this rule is for translating numbers From E.164 format to a seven-digit phone number. In addition, Pattern and Translation values have been specified, which will modify the existing values for these properties. These values translate an E.164 number (in this case 12 digits beginning with +1425), specified by the regular expression in the Pattern, to a seven-digit number by removing the first five digits. For example, the number +14255551212 would be translated to the number 5551212.
-------------------------- Example 2 --------------------------
Copy Code | |
---|---|
$a = Get-CsOutboundTranslationRule -Identity "site:Redmond/OBR1" $a.Name = "Outbound Rule 1" Set-CsOutboundTranslationRule -Instance $a |
This modifies the Name property of an outbound translation rule. Note that this results in changing the Identity of this rule. The first command in this example is a call to the Get-CsOutboundTranslationRule cmdlet. We specify an Identity of site:Redmond\OBR1, which will return one translation rule, the rule with the Identity given. Rather than display this rule, we assign it to the variable $a. Line 2 of this example assigns the string "Outbound Rule 1" to the Name property of variable $a, the variable containing a reference to rule site:Redmond/OBR1. In the last line of this example we call Set-CsOutboundTranslationRule, specifying the Instance parameter and passing it the variable $a. If we now call Get-CsOutboundTranslationRule with an Identity value of site:Redmond/OBR1, nothing will be returned. That’s because the rule with that Identity no longer exists, it’s been replaced by the same rule but with the Identity site:Redmond/Outbound Rule 1.