This article is part of the Microsoft Lync Server 2010 Administration Guide: PowerShell Supplement ... .
Configuring Dial Plans and Normalization Rules
Create a Dial Plan
To create a new dial plan, use the New-CsDialPlan cmdlet:
New-CsDialPlan -Identity site:Redmond -SimpleName RedmondSiteDialPlan
The following command creates a new dial plan, then uses the New-CsVoiceNormalizationRule cmdlet to immediately add a new normalization rule to that dial plan:
New-CsDialPlan -Identity site:Redmond -SimpleName RedmondSiteDialPlan
New-CsVoiceNormalizationRule -Identity "site:Redmond/SeattlePrefix" -Pattern "^9(d*){1,5}$" -Translation "+1206$1"
Modify a Dial Plan
To modify a dial plan, use the Set-CsDialPlan cmdlet:
Set-CsDialPlan -Identity RedmondDialPlan –ExternalAccessPrefix 8
For more information
Create or Modify a Normalization Rule Manually
To create a new voice normalization rule, use the New-CsVoiceNormalizationRule cmdlet. The following rule has the name SeattleFourDigit and will be assigned to the dial plan SeattleUser:
New-CsVoiceNormalizationRule -Parent SeattleUser -Name SeattleFourDigit -Description "Dialing with internal four-digit extension" -Pattern '^(d{4})$' -Translation '+1206555$1'
For more information
Configuring Voice Policies, PSTN Usage Records, and Voice Routes
Configuring Voice Policies and PSTN Usage Records to Authorize Calling Features and Privileges
Create a Voice Policy and Configure PSTN Usage Records
To create a new voice policy, use the New-CsVoicePolicy cmdlet:
New-CsVoicePolicy –Identity UserVoicePolicy2 -AllowSimulRing $False -PstnUsages @{Add = "Local"}
Modify a Voice Policy and Configure PSTN Usage Records
To modify an existing voice policy, use the Set-CsVoicePolicy cmdlet:
Set-CsVoicePolicy UserVoicePolicy2 -AllowSimulRing $False -PstnUsages @{add = "Long Distance"}
View PSTN Usage Records
To view all your PSTN usage records, use the Get-CsPstnUsage cmdlet:
Get-CsPstnUsage | Select-Object –ExpandProperty Usage
Configuring Voice Routes for Outbound Calls
Create a Voice Route
To create a new voice route, use the New-CsVoiceRoute cmdlet:
New-CsVoiceRoute -Identity Route1 -PstnUsages @{add="Long Distance"} -PstnGatewayList @{add="PstnGateway:redmondpool.litwareinc.com"}
Modify a Voice Route
To modify a voice route, use the Set-CsVoiceRoute cmdlet:
Set-CsVoiceRoute -Identity Route1 -Description "Test Route"
The following commands use both the Get-CsVoiceRoute and Set-CsVoiceRoute cmdlets to add a new PSTN gateway to a voice route:
$y = Get-CsVoiceRoute -Identity Route1
$y.PstnGatewayList.Add("PstnGateway:192.168.0.100")
Set-CsVoiceRoute -Instance $y
For more information
Configuring Trunks and Translation Rules
Configure Media Bypass on a Trunk
To enable media bypass for a new SIP trunk, use the New-CsTrunkConfiguration cmdlet and set the EnableBypass property to True:
New-CsTrunkConfiguration -Identity site:Redmond -EnableBypass $True –MaxEarlyDialogs 40 –SRTPMode Required
Configure a Trunk Without Media Bypass
To disable media bypass for a new SIP trunk, use the New-CsTrunkConfiguration cmdlet and set the EnableBypass property to False:
New-CsTrunkConfiguration -Identity site:Redmond -EnableBypass $False –MaxEarlyDialogs 40 –SRTPMode Required
Defining Translation Rules
Create or Modify a Translation Rule Manually
To create a new translation rule use the New-CsSipResponseCodeTranslationRule cmdlet:
New-CsSipResponseCodeTranslationRule -Identity "PstnGateway:192.168.0.240/Rule404" -ReceivedResponseCode 434 -TranslatedResponseCode 404
For more information
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.