Wednesday, October 5, 2016

Skype for Business Hybrid with On-Premise PSTN.

As you may be aware, are PSTN Calling only available in US, UK, Puerto Rico, Spain and France (October 2016).
In this post I will try to explain how to move a user from On-Prem to Skype Online, and still use On-Prem PSTN.

Start Windows power shell as administrator
1.Import-Module skypeonlineconnector
2.$cred = Get-Credential
3.$Session = New-CsOnlineSession -Credential $cred -Verbose
4.Import-PSSession $session



















Yes you can create a script to make it easier. Save the text below in a ps1 file and then run.
Import-Module SkypeOnlineConnector
$session = New-CsOnlineSession -Credential $credential
Import-PSSession $session
Get-CsTenant | fl DisplayName

First you need to create a VoiceRoutingPolicy






New-CsVoiceRoutingPolicy -Identity "HybridVoiceRoutingPolicy" -Name "HybridVoiceRoutingPolicy" -PstnUsages "Long Distance"
If you have multiple usage, with multiple SIP Trunk, you need to add the policy like this
Set-CsVoiceRoutingPolicy -Identity "HybridVoiceRoutingPolicy" -PstnUsages  "SW - Sweden", "BU - Bulgaria", "DE - Germany", "DK - Denmark", "FI - Finland", "LV - Latvia", "UK - England", "US - USA"  ,"Long Distance"

Then you need to grant this policy to users thats need to be moved to Skype Online
Grant-CsVoiceRoutingPolicy -Identity user@company.com -PolicyName HybridVoiceRoutingPolicy



















Enable the Skype for Business Cloud PBX before you move the user to Skype Online
Run then a directory sync between local AD and Azure AS
The user must be enabled for enterprise voice with Line URI, Dial-plan and Voice Routing before you move the use.

Then it is ready to move the user from On-Prem to Skype Online.

If you run Get-CsOnlineUser -Identity user@company.com | fl *voice*, *line*, *dial* you will see that HostedVoiceMail and EnterpriseVoice is False.
Set-CsUser -Identity user@company.com -EnterpriseVoiceEnabled $true
Set-CsUser -Identity user@company.com -HostedVoiceMail $true

















You will see the EV users in the O365 portal like this















In Skype On-Prem Control panel will the user look like this.