Enable users for Direct Routing with Teams Phone

Completed

Before you can enable Direct Routing for users, you'll need to have configured Direct Routing on your tenant. This will include configuring your own Session Border Controller (SBC) or configuration provided by a telephony provider that offers a Direct Routing service. Followed by configuring voice routing, emergency calling, and if necessary, high availability.

After configuring your organization to support Direct Routing, you'll then need to perform the following tasks to enable functionality for users:

  1. Assign required licenses for Teams Phone with Direct Routing

  2. Enable a user for Teams Phone

  3. Assign a telephone number to a user

  4. Assign a voice routing policy to a user

Assign Teams Licenses

To use Direct Routing, you'll first need to assign the following licenses to a user:

  • Microsoft Teams

  • Microsoft Teams Phone

  • Optionally, Audio Conferencing or Audio Conferencing Pay Per Minute

These licenses are included in Microsoft Enterprise E5 (with Teams Phone) and Microsoft Business Voice SKUs.

You can use the Microsoft 365 admin center or PowerShell to assign licenses to users in your organization. You must be a Global admin or User management admin to manage licenses.

Warning

After assigning licenses, you will need to wait before assigning numbers to users. Because of the latency between Microsoft 365 and Microsoft Teams, it can take up to 24 hours for a user to be assigned a Calling Plan after you assign a license.

Enable a user for voice with Direct Routing

After you've assigned the correct licenses, the next step is to configure the user's online phone settings. You'll perform these steps using Teams PowerShell module.

To establish a remote PowerShell session with Teams, you first need to install the Teams PowerShell module.

After you install the module, you can establish a remote session with the following cmdlet:

Connect-MicrosoftTeams

You'll typically enable Teams Phone functionality and assign a number available to you from your voice provider. As you enable Teams Phone for a user, voicemail will be automatically enabled at the same time.

Direct Routing numbers with extensions using the formats +1206555000;ext=1234 or 1206555000;ext=1234 are supported, but such phone numbers can't be assigned to a resource account.

The following example shows how to assign a Direct Routing number to the user:

Set-CsPhoneNumberAssignment -Identity "spencer.low@contoso.com" -PhoneNumber "+14255551234" -PhoneNumberType DirectRouting

The following example shows how to assign a Direct Routing number with a unique extension to the user:

Set-CsPhoneNumberAssignment -Identity "spencer.low@contoso.com" -PhoneNumber "+14255551234;ext=1001" -PhoneNumberType DirectRouting

The following cmdlet shows how to assign the same number with a different extension to another user:

Set-CsPhoneNumberAssignment -Identity "stacy.quinn@contoso.com" -PhoneNumber "+14255551234;ext=1002" -PhoneNumberType DirectRouting

If a user or resource account has a phone number set in Active Directory on-premises and synched into Microsoft 365, you can't use Set-CsPhoneNumberAssignment to set the phone number. You'll have to clear the phone number from the on-premises Active Directory and let that change sync into Microsoft 365 first. Then enable the user for enterprise voice services and voicemail using the following cmdlet:

Set-CsPhoneNumberAssignment -Identity "<User name>" -EnterpriseVoiceEnabled $true

Assign a voice routing policy

After configuring a phone number for the user and enabling the user for voicemail, you'll then assign a voice routing policy to the user. This policy allows the user to dial out and receive calls by associating them with specific Direct Routing configuration:

Grant-CsOnlineVoiceRoutingPolicy -Identity "<User name>" -PolicyName "No Restrictions”