Microsoft-Office-Teams-saq-digital-IT-Service-direct-routing

The essential guide to implement MS Teams Direct Routing

To learn more about MS Teams and Direct Routing, please click Here

Before implementing Microsoft Teams with Direct Routing, you will need to consider the following factors:

  1. Compatibility: Make sure that you have a Session Border Controller (SBC) that is compatible with Direct Routing. You can check the list of supported SBCs on the Microsoft website.
  2. Network infrastructure: Ensure that your network infrastructure is suitable for supporting Direct Routing. This may involve checking the bandwidth and latency of your internet connection, as well as the capacity of your SBC.
  3. Phone numbers: Consider how you will acquire the necessary phone numbers for your users. You can either port existing numbers to Microsoft Teams or purchase new numbers from a supported provider.
  4. User accounts: Decide how you will set up the user accounts for your users. You can either create new accounts in Azure AD or use existing accounts that are synchronized with Azure AD.
  5. Configuration: Plan out the necessary configuration steps for setting up Direct Routing, including setting up the SBC, configuring the PSTN trunk, and creating the necessary routing rules or policies.

Meanwhile, you will need to have the appropriate licensing in place.

Here are the licensing options available for Direct Routing:

  1. Microsoft 365 E5: This license includes Microsoft Teams and all the necessary components for Direct Routing, including Audio Conferencing and Phone System.
  2. Microsoft 365 E1 with Phone System add-on: This license includes Microsoft Teams and the Phone System add-on, which provides the necessary components for Direct Routing, including Audio Conferencing.
  3. Microsoft 365 Business Voice: This license is designed specifically for small and medium-sized businesses, and includes Microsoft Teams, Phone System, and Audio Conferencing.
  4. Standalone Phone System license: This license can be added to any Microsoft 365 or Office 365 plan that does not already include Phone System, and provides the necessary components for Direct Routing, including Audio Conferencing.

To set up Microsoft Teams with Direct Routing, you will need to perform the following steps:

  1. Obtain a suitable Session Border Controller (SBC) that is compatible with Direct Routing. For example, you can use AudioCodes Mediant 1000 or 2000.
  2. Set up an Azure AD tenant and create a user account that will be used to authenticate the SBC with the Microsoft Teams platform.
    • Go to the Azure portal (https://portal.azure.com/) and sign in with your Microsoft account. If you don’t already have a Microsoft account, you will need to create one.
    • Click on the “Create a resource” button in the top left corner of the portal.
    • In the search box, type “Azure Active Directory” and press Enter.
    • Click on the “Create” button for the Azure Active Directory service.
    • In the “Create Azure AD directory” form, enter a name for your directory and select the “Organizational unit” and “Country or region” as appropriate. Then click on the “Create” button.
    • Once the Azure AD directory has been created, click on the “Add user” button in the Users section of the Azure AD dashboard.
    • In the “Add a user” form, enter the necessary details for the user account, such as the user’s name, email address, and password. Then click on the “Create” button.
  3. Configure the SBC with the necessary settings to enable it to connect to the Microsoft Teams platform via Direct Routing. This will typically involve specifying the Azure AD tenant details, as well as the credentials for the user account created in step 2.
    • Sign in to the SBC management interface and navigate to the “Direct Routing” page.
    • Click on the “Add Tenant” button to open the “Add Tenant” wizard.
    • Enter the tenant’s name and the client ID of the application that represents the SBC in Azure AD.
    • Enter the credentials for the user account that you created in Azure AD. This will typically include the user’s email address and password.
    • Configure the SBC with the necessary network settings to enable it to communicate with the Microsoft Teams platform. This may include specifying the IP addresses or host names of the Microsoft Teams servers, as well as any necessary ports or protocols.
    • Test the connection between the SBC and the Microsoft Teams platform to ensure that it is working properly. A test call or checking the status of the connection in the SBC management interface will be needed.
  4. Set up a PSTN trunk on the SBC, which will be used to connect the Microsoft Teams platform to the public switched telephone network (PSTN).
    • Sign in to the SBC management interface and navigate to the “Trunks” page.
    • Click on the “Add Trunk” button to open the “Add Trunk” wizard.
    • Select the type of trunk that you want to create (e.g., SIP, PRI, etc.) and click “Next”.
    • Enter the necessary details for the PSTN trunk, such as the name of the trunk, the type of connection, and any necessary credentials or settings.
    • Configure the SBC to route incoming and outgoing calls to and from the Microsoft Teams platform via the PSTN trunk. Also create routing rules or profiles that specify the conditions under which calls should be routed through the PSTN trunk.
    • Test the PSTN trunk to ensure that it is working properly. This may involve making a test call or checking the status of the connection in the SBC management interface.
  5. Configure the SBC to route incoming and outgoing calls to and from the Microsoft Teams platform via the PSTN trunk.
    • Sign in to the SBC management interface and navigate to the “Routing” page.
    • Click on the “Add Route” button to open the “Add Route” wizard.
    • Enter a name for the route and select the PSTN trunk that you want to use for routing calls.
    • Configure the route with the necessary settings to specify the conditions under which calls should be routed through the PSTN trunk. This may include the type of calls (e.g., incoming, outgoing, or both), the destination or source numbers or patterns, and any other relevant parameters.
    • Test the route to ensure that it is working properly.
  6. Set up the necessary users, groups, and phone numbers on the Microsoft Teams platform. This will typically involve creating a new “voice routing policy”, “Dial Plan” and assigning them to the relevant users or groups.
  7. Test the setup to ensure that it is working correctly and that users are able to make and receive calls via Microsoft Teams.

At this point we have finished implementation of MS Direct Routing, and we can manage phone numbers and users.

To assign phone numbers to Microsoft Teams users via Direct Routing, you will need to perform the following steps:

  1. Sign in to the Microsoft Teams admin center (https://admin.teams.microsoft.com/) with your Microsoft account.
  2. In the left navigation menu, go to Voice > Phone numbers.
  3. Click on the phone number that you want to assign and then click on the “Assign” button.
  4. In the “Assign phone number” form, select the user or group that you want to assign the phone number to and click “Save”.

Alternatively, you can bulk-assign phone numbers to users or groups by selecting the checkbox next to multiple numbers and clicking the “Assign” button.

  1. Connect to the Microsoft Teams PowerShell module by running the following command:
Connect-MicrosoftTeams
  1. Get a list of available phone numbers by running the following command:
Get-CsOnlineVoicePhoneNumber
  1. Assign a phone number to a user by running the following command, replacing “PhoneNumber” with the desired phone number and “UserId” with the user’s UPN or email address:
Set-CsUser -Identity "UserId" -OnPremLineURI "PhoneNumber"
  1. Alternatively, you can bulk-assign phone numbers to users by running the following command, replacing “PhoneNumber1”, “PhoneNumber2”, etc. with the desired phone numbers and “UserId1”, “UserId2”, etc. with the UPNs or email addresses of the users:
$phoneNumbers = "PhoneNumber1", "PhoneNumber2", ...
$users = "UserId1", "UserId2", ...

$phoneNumbers | % { Set-CsUser -Identity $users[$phoneNumbers.IndexOf($_)] -OnPremLineURI $_ }

To assign phone numbers to Microsoft Teams users in batch using a CSV file, you can use the following PowerShell script:

# Connect to the Microsoft Teams PowerShell module
Connect-MicrosoftTeams

# Import the CSV file and store the data in a variable
$data = Import-Csv "C:\path\to\file.csv"

# Loop through the data and assign the phone numbers to the users
foreach ($row in $data) {
  Set-CsUser -Identity $row.UserId -OnPremLineURI $row.PhoneNumber
}

The CSV file should have two columns: “UserId” and “PhoneNumber”. The “UserId” column should contain the UPNs or email addresses of the users, and the “PhoneNumber” column should contain the phone numbers that you want to assign.

Here’s an example of the CSV file format:

UserId,PhoneNumber
[email protected],+1234567890
[email protected],+1234567891
[email protected],+1234567892
Microsoft-Office-Teams-saq-digital-IT-Service-direct-routing
Microsoft-Office-Teams-saq-digital-IT-Service-direct-routing

Leave a Reply

Your email address will not be published. Required fields are marked *