Upravit

Sdílet prostřednictvím


Enable users for Direct Routing

This article describes how to enable users for Direct Routing. This is step 2 of the following steps for configuring Direct Routing:

For information on all the steps required for setting up Direct Routing, see Configure Direct Routing.

When you're ready to enable users for Direct Routing, follow these steps:

  1. Create a user in Microsoft 365 and assign a Teams Phone license.
  2. Ensure that the user is homed online.
  3. Configure the phone number and enable enterprise voice.
  4. Assign Teams Only mode to users.

Create a user and assign the license

There are two options for creating a new user in Microsoft 365. However, Microsoft recommends that your organization choose one option to avoid routing issues:

For information about license requirements, see licensing and other requirements in Plan Direct Routing.

Ensure that the user is homed online

This step applies to Skype for Business Server Enterprise Voice enabled users being migrated to Teams Direct Routing.

Direct Routing requires the user to be homed online. You can check by looking at the RegistrarPool parameter, which needs to have a value in the infra.lync.com domain. Microsoft recommends, but doesn't require, that you change the LineURI from on-premises to online when migrating users to Teams Direct Routing.

  1. Connect a Microsoft Teams PowerShell session.

  2. Issue the command:

    Get-CsOnlineUser -Identity "<User name>" | fl RegistrarPool,OnPremLineUri,LineUri
    

    If OnPremLineUri is populated with a <E.164 phone number>, the phone number was assigned on-premises and synchronized to Microsoft 365. If you want to manage the phone number online, clear the parameter using on-premises Skype for Business Management Shell and synchronize to Microsoft 365 before configuring the phone number using Teams PowerShell.

  3. From Skype for Business Management Shell, issue the command:

    Set-CsUser -Identity "<User name>" -LineUri $null
    

Note

Do not set EnterpriseVoiceEnabled to False as there is no requirement to do so and this can lead to dial plan normalization issues if legacy Skype for Business phones are in use and the Tenant hybrid configuration is set with UseOnPremDialPlan $True.

After the changes have synced to Microsoft 365, the expected output of Get-CsOnlineUser -Identity "<User name>" | fl RegistrarPool,OnPremLineUri,LineUri is:

RegistrarPool                        : pool.infra.lync.com
OnPremLineURI                        : 
LineURI                              : 

Note

All user's phone attributes must be managed online before you decomission your on-premises Skype for Business environment.

Configure the phone number and enable enterprise voice

After you've created the user and assigned a license, you must configure the user's online phone settings. The configuration of Cloud Voicemail for the user is automatic; no other configuration needs to be done.

You can configure the phone number by using the Teams admin center or by using Teams PowerShell.

Use Teams admin center

  1. Go to Users -> Manage users.

  2. Select a user.

  3. Under Account General information, select Edit.

  4. Under Assign phone number, from the Phone number type drop-down menu, select Direct Routing.

  5. Enter an assigned phone number and a phone number extension if applicable.

  6. Select Apply.

The account general information will now show the assigned phone number and Direct Routing as the phone number type.

Use PowerShell

  1. Connect to a Microsoft Teams PowerShell session.

  2. The next steps depend on whether you're managing the user's phone number on-premises or online. If you're managing the phone number on-premises, you must use the on-premises Skype for Business Management Shell, Control Panel, or one of the methods explained in Decide how to manage attributes after decommissioning.

    • If you're managing the user's phone number on-premises, you need to ensure that the user is Enterprise Voice enabled online by using the following command:

      Set-CsPhoneNumberAssignment -Identity "<User name>" -EnterpriseVoiceEnabled $true
      
    • If you're managing the user's phone number online, you need to assign the phone number to the user by using the following command in Teams PowerShell. The user is automatically Enterprise Voice enabled by the command:

      Set-CsPhoneNumberAssignment -Identity "<User name>" -PhoneNumber <phone number> -PhoneNumberType DirectRouting
      

      For example, to add a phone number for user "Spencer Low," enter the following:

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

      If the users "Spencer Low" and "Stacy Quinn" share the same base number with unique extensions, enter the following

      Set-CsPhoneNumberAssignment -Identity "spencer.low@contoso.com" -PhoneNumber "+14255388701;ext=1001" -PhoneNumberType DirectRouting
      Set-CsPhoneNumberAssignment -Identity "stacy.quinn@contoso.com" -PhoneNumber "+14255388701;ext=1002" -PhoneNumberType DirectRouting
      

    Microsoft recommends, but doesn't require, that the phone number is configured as a full E.164 phone number with country code. You can configure phone numbers with extensions. These extensions will be used to look up users when the lookup against the base number returns more than one result. This functionality allows companies to configure phone numbers with the same base number and unique extensions. For lookup to be successful, the invite must include the full number with extension as follows:

    Invite: <sip:+14255388701;ext=1001@sbc1.adatum.biz
    

Configure sending calls directly to voicemail

Direct Routing allows you to end the call to a user and send it directly to the user's voicemail. If you want to send the call directly to voicemail, attach opaque=app:voicemail to the Request URI header. For example, "sip:user@yourdomain.com;opaque=app:voicemail". The Teams user won't receive the calling notification. Instead, The call will be connected to the voicemail of the user directly.

Assign Teams Only mode to users to ensure calls land in Microsoft Teams

Direct Routing requires that users be in Teams Only mode to ensure incoming calls land in the Teams client. To put users in Teams Only mode, assign them the "UpgradeToTeams" instance of TeamsUpgradePolicy. For more information, see Upgrade strategies for IT administrators. If your organization uses Skype for Business Server, see the following article for information about interoperability between Skype and Teams: Migration and interoperability with Skype for Business.

See also

Plan Direct Routing

Configure Direct Routing