In this article, we will enable a user for Teams Direct Routing setup that we have created in the previous steps
Connect a Microsoft Teams PowerShell session
This will ask you to authenticate with a user that has the proper permissions to enable a user and prepare the PowerShell session. You might need to install the Teams PowerShell module if you didn’t do that earlier.
Connect-MicrosoftTeams
Configure The Phone Number and Enable Enterprise Voice and Voicemail Online
The following command is an example of how to assign a number, and enable Enterprise Voice and Voice Mail. Both assigning a number and enabling Enterprise Voice are required to enable a user to use Teams Direct Routing
Set-CsUser -Identity User1@jayslab.online -OnPremLineURI “tel:+17124584557;ext=557” -EnterpriseVoiceEnabled $true -HostedVoiceMail $true
Assign The Voice Routing Policy to a User
This command will assign the Voice Routing Policy that we have created earlier
Grant-CsOnlineVoiceRoutingPolicy -PolicyName “PassAll” -Identity User1@jayslab.online
Assign a Teams Calling Policy
Turning this on will allow users to make calls
Grant-CsTeamsCallingPolicy -PolicyName AllowCalling -Identity User1@jayslab.online
Assign Teams Only mode to users to ensure calls land in Microsoft Teams
This is needed to make sure that the call will land
Grant-CsTeamsUpgradePolicy -PolicyName UpgradeToTeams -Identity User1@jayslab.online
Assign a Dial Plan
Usually, you assign a dial plan to a user to translate dial phone numbers that are being dialed by the user to E.164 format that is required by Teams Telephony. For simplicity and to complete the setup, I am assigning the existing default Dial Plan that doesn’t change any number being dialed.
Grant-CsTenantDialPlan -Identity User1@jayslab.online -PolicyName Global
