Applies to: Skype for Business Server 2015 and Lync Server 2013
Voice calls from Skype for Business users to other Skype for Business and Microsoft Teams users are free, but if you want your users to be able to call regular phones, and you don't already have a service provider to make voice calls, you need to buy a Calling Plan from Microsoft. This service (Calling Plan) is available in these countries.
To buy Calling Plans in Office 365 we need one of the below license combination, if you are on a plan other than E1, E3 or E5 you have to switch to E1 or E3 or E5 to add calling plans (this feature can be enabled only with an Enterprise subscription).
- E1+Phone System (no voice mail)
- E3+Phone System
Check here , to know which add-on licenses you need to buy for getting additional features.
If Microsoft PSTN calling service is not available in your country or you already have a service provider and would like to continue with them, we can integrate your on-premises PSTN component with Office 365 Phone system. There are two methods to do that:
- Cloud Connector Edition: We use this method if we do not have on-premises Lync or Skype for Business infrastructure.
- Skype for Business server: We use on-premises Lync or Skype for Business infrastructure if it is already integrated with PSTN services.
This content is relevant if you already have Skype for Business Server 2015 or Lync Server 2013 with Enterprise voice enabled.
Phone System in Office 365 with on-premises PSTN connectivity enables you to leverage Phone System (Cloud PBX) capabilities for your users. This can help with the following scenarios:
- You have some of your Skype for Business users homed on-premises and others homed in Skype for Business Online. You can now enable Phone System in Office 365 capabilities and features for your users homed in Skype for Business Online, but continue to use on-premises PSTN connectivity.
- You have an on-premises deployment and you want to move some or all of your users to Skype for Business Online but continue to use on-premises PSTN connectivity.
Note: To successfully enable users for Phone System in Office 365 with on-premises PSTN connectivity, their SIP address must be in your own domain. The use of the default domain for Office 365, onmicrosoft.com, is not supported.
Prerequisites: Before you can configure Phone System in Office 365 with on-premises PSTN connectivity and move users to Skype for Business Online, we must confirm that we have the following prerequisites in place:
- Hybrid Deployed: We must have configured Active Directory synchronization using Azure AD Connect. The version of AAD Connect you use must be version 1.0.9125.0 or later and Skype for Business 2015 or Lync server 2013 hybrid configured.
- On-premises Enterprise Voice enabled: Ensure Skype for Business server is integrated with PSTN services and users are enabled for Enterprise voice and both inbound and outbound calls are working for on-premises users.
Enabling a user for Phone System in Office 365 with on-premises PSTN connectivity requires the following steps:
- Enable the users for Enterprise Voice in on-premises
- Create and assign a Voice Routing Policy
- Run directory synchronization
- Assign licenses in Office 365
- Move on-premises users to Skype for Business Online
- Enable users for Enterprise Voice online and Phone System in Office 365
- Test Office 365 Phone System with On-Premises PSTN Connectivity
Step 1: Verify that the account is enabled for Enterprise Voice and has a Line URI and Dial Plan assigned.
On front end server switch to the Skype for Business Server 2015 Control Panel. In the left navigation pane, click Users, on the USERS tab, search for a user you would like to move to Skype for Business online.
In the USERS list, double-click the user, in the Line URI box, verify that a phone number is assigned in the format tel:+XXXXXXXXXXX
Also assign dial plan if not assigned.
(Note: You may use either Global or User dial plans for online users. Site dial plans cannot be used as these only apply to users who are hosted on premises and are assigned to an on-premises site.)
You can also assign per-user dial plan with Windows PowerShell and the Grant-CsDialPlan cmdlet. You can run this cmdlet either from the Skype for Business Server 2015 or from a remote session of Windows PowerShell.
To assign a per-user dial plan Redmond to a user run below command:
Grant-CsDialPlan -Identity "email@example.com" -PolicyName "Redmond"
You can use either on-premises dial plan or online dial plan for end users. To choose dial plan to use, you can run the following command:
Set-CsTenantHybridConfiguration -tenant < TENANT ID > -UseOnPremDialPlan $false
To find the tenant ID for your Skype for Business Online tenants by running this command:
Get-CsTenant | Select-Object DisplayName, TenantID
If UseOnPremDialPlan is set to $true, hybrid users will use the dial plan defined for your on-premises Skype for Business Server organization. If set to $false, hybrid users will use the dial plan defined for your Skype for Business Online organization. The default is $true.
Office 365 Phone System has pre-defined dial plans for each country, which accommodate user calling habits (e.g., in the US 011 is used to dial international locations, in other countries different numbers are used).
Step 2: Create and assign a Voice Routing Policy.
Typically, only one Voice Routing policy is required. In many cases, you can modify the global policy to meet all your needs. If you create a new voice routing policy, you must explicitly assign it to users whom you are migrating to online.
To modify Global policy run:
Set-CSVoiceRoutingPolicy -Identity Global -PSTNUsages "Local", "Long Distance"
Note that you need to change the PSTNUsages value as per your current usages.
To get the value for PSTNUsages go to Skype for Business Server 2015 Control Panel, to Voice Routing, to Voice Policy, and double click on the current voice policy being used as demonstrated below:
In the lab setup being used, PSTN Usage name is Redmon Internal Usage as highlighted below:
To create new user policy run below command in Skype for Business Server Management Shell:
New-CsVoiceRoutingPolicy -Identity O365PhoneSystemOnPremRouting –Name O365PhoneSystemOnPremRouting -PSTNUsages "Redmond Internal Usage"
If you have multiple PSTN usages you can include all in a single command as shown below:
New-CsVoiceRoutingPolicy -Identity CloudPBXOnPremRouting –Name CloudPBXOnPremRouting -PSTNUsages "Local","Long Distance"
To assign the above voice routing policy to a user, launch the Skype for Business Server Management Shell command prompt, type the following command and then press Enter:
Grant-CsVoiceRoutingPolicy -Identity firstname.lastname@example.org -PolicyName Tag:O365PhoneSystemOnPremRouting
Note that there is no output displayed for the above command.
Step 3: Run directory synchronization
Switch to a server where AAD connect tool is installed and launch Windows PowerShell.
At the Windows PowerShell command prompt, force a sync with below command:
Start-ADSyncSyncCycle -PolicyType Delta
Wait for the sync to complete.
Step 4: Assign a Skype for Business online Phone system license to the user with the steps shared inline:
- Open Internet Explorer and browse to http://portal.office.com
- Sign in to Office 365 using your tenant administrator username and password.
- In the Office 365 page, in the top navigation, click Home
- In the feature pane, click USERS, and then click Active Users
- In the ACTIVE USERS list, select the check box for the user
- In the details pane, under Product licenses, click Edit
- On the Assign License page, select Phone System
- Click SAVE
Step 5: Move the user account to Skype for Business Online
- In Lync server 2013 you can run below command in Lync server management shell to move users to Skype for Business online.
Move-CsUser -Identity email@example.com -Target sipfed.online.lync.com -Credential $creds -HostedMigrationOverrideUrl https://admin3a.online.lync.com/HostedMigration/hostedmigrationservice.svc
*Note: The adm3a.online.lync.com will vary from tenant to tenant and can be obtained from the address bar after logging into the Skype for Business Online Admin Center.
- In Skype for Business server you can use Skype for Business control panel or above command to move users to Skype for Business online.
Switch to front end server and open Skype for Business Server 2015 Control Panel and search for a user to be migrated.
In the users list, select the user, click Action, and then click Move selected users to Skype for Business Online.
On the Move users to Skype for Business Online page, click Next.
click Sign in to Office 365.
In the Sign in to Office 365 window, sign in using your Office 365 tenant administrator account and password.
When successfully signed in, click Close.
On the You have successfully signed in to Office 365 page, click Next.
In the Move users to Skype for Business Online, review the confirmation message and then click Next.
Wait for the user move to Skype for Business Online complete.
Review the results of the moved user and then click Close.
Step 6: Run directory synchronization
Switch to a server where AAD connect tool is installed and open Windows PowerShell.
At the Windows PowerShell command prompt, force a sync with below command and then press Enter:
Start-ADSyncSyncCycle -PolicyType Delta
Wait for the sync to complete.
Step 7: Enable the user for Hybrid Voice
We need to connect to Skype for Business online PowerShell to enable user for Hybrid Voice.
Download and install the Skype for Business online PowerShell module.
To connect to Skype for Business online PowerShell run below commands.
$session = New-CsOnlineSession
In the Windows PowerShell credentials request window, type your tenant administrator user name and password and then click OK.
At the Windows PowerShell command prompt, type the following and then press Enter:
Once connected to Skype for Business online PowerShell, run below command to enable user for Hybrid Voice.
Set-CsUser –Identity firstname.lastname@example.org – EnterpriseVoiceEnabled $True –HostedVoicemail $True
The HybridVoice user voice policy is a pre-defined Skype for Business Online voice policy and is not a policy that can be edited.
If you receive an error such as “Cannot modify the parameter: “EnterpriseVoiceEnabled” because it is restricted for the user service plan: MCOProfessional”, wait about 10-15 minutes and try the command again.
To verify, run below command at the Skype for Business online PowerShell command prompt.
Get-CsOnlineUser –Identity email@example.com | FL *voice*,*dial*,*Line*
In the output of the command, verify that the user has the HybridVoice policy assigned, that the user’s LineURI is populated and EnterpriseVoiceEnabled and HostedVoiceMail are True. Notice the DialPlan assigned to the user.
Step 8: Test Office 365 Phone System with On-Premises PSTN Connectivity
Login to Skype for Business client using Skype for Business online user account and test both inbound and outbound calls to PSTN numbers.
You should be able to make and receive calls using on-premises PSTN connectivity.
I hope this has been informative for you, please feel free to reach out to me if you have any queries.