Sep 26 2023 04:07 AM
Hello,
I have setup a trunk for direct routing. I think I have all the proper licensing in place for my user, ie: phone system and calling plan. I am now trying to assign a phone number however the phone number type drop down ( in the general information section of my user in teams admin ) does not have the direct routing option. The only option given is Calling Plan. I want to use number that is on the Direct Routing trunk, not a Calling Plan number. How can I make it so Direct Routing is an option under Assign Phone number -> Phone number Type?
Sep 26 2023 06:16 AM
Hi @VoipJedi,
To enable users for Direct Routing, you must have the following:
Once you have these things in place, you can enable users for Direct Routing by following these steps:
Enable users for Direct Routing - Microsoft Teams | Microsoft Learn
To assign a phone number for a user using Direct Routing, follow these steps:
Assign phone numbers for users in Teams: https://learn.microsoft.com/en-us/microsoftteams/assign-change-or-remove-a-phone-number-for-a-user
You can also do that with PowerShell:
To enable users for Direct Routing in Teams using PowerShell, follow these steps:
Import-Module MicrosoftTeams
Connect-MicrosoftTeams -Credential $credential
where $credential is a variable that stores your Teams administrator credentials.
Get-CsOnlineUser | Where-Object { $_.EnterpriseVoiceEnabled -eq $true }
Set-CsUser -Identity "<User name>" -PhoneSystemRoutingPolicyName "DirectRouting"
where <User name> is the name of the user that you want to enable for Direct Routing.
Set-CsUser -Identity "<User name>" -LineUri "<Phone number>"
where <Phone number> is the phone number that you want to assign to the user.
Disconnect-MicrosoftTeams
For example, to enable a user named John Doe for Direct Routing and assign him the phone number 123-456-7890, you would use the following PowerShell commands:
Import-Module MicrosoftTeams
Connect-MicrosoftTeams -Credential $credential
# Get a list of all users that are enabled for Phone System
$users = Get-CsOnlineUser | Where-Object { $_.EnterpriseVoiceEnabled -eq $true }
# Enable John Doe for Direct Routing
Set-CsUser -Identity "John Doe" -PhoneSystemRoutingPolicyName "DirectRouting"
# Assign the phone number 123-456-7890 to John Doe
Set-CsUser -Identity "John Doe" -LineUri "123-456-7890"
Disconnect-MicrosoftTeams
You can also use PowerShell to enable multiple users for Direct Routing at once. For example, to enable all users that are enabled for Phone System for Direct Routing, you would use the following PowerShell command:
Get-CsOnlineUser | Where-Object { $_.EnterpriseVoiceEnabled -eq $true } | Set-CsUser -PhoneSystemRoutingPolicyName "DirectRouting"
Once you have enabled users for Direct Routing and assigned them phone numbers, they will be able to make and receive calls using their Direct Routing trunk.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)