Microsoft Teams - Byphone - Direct Routing Setup

Byphone License Requirments

  • Byphone Enterprise

Microsoft License Requirements

Users of Direct Routing must have the following licenses assigned in Microsoft 365 or Office 365:

  • Microsoft Phone System (Included in E5 licenses)

  • Microsoft Teams + Skype for Business Plan 2, if included in licensing.

From Microsoft Documentation

(MS Calling Plan is not compatible)

DNS Setup

Firstly raise a support request via the Helpdesk and include the Byphone Account Reference of the target organisation to be integrated. We will set up a subdomain to identify that Byphone organisation within Teams, to be added to the Microsoft Tenant. The following steps must be completed by a a Global Administrator on the target Microsoft Tenant.

Add a subdomain to the Microsoft tenant and verify it

  1. In the Microsoft 365 admin center, go to Settings > Domains > Add domain.

  2. In the Enter a domain you own box, type the FQDN of the subdomain for this organisation. In the example below, the subdomain is customer1.mssbc.byphone.co.uk.

  3. Click Use this domain.

  4. The FQDN has never been registered in the tenant. In the next step, you will need to verify the domain. Select Add a TXT record to the domain’s DNS records.

  5. Click Continue, and note the TXT value generated to verify the domain name.

  6. Add the TXT value to the support request on the Byphone Helpdesk which includes your allocated subdomain.

  7. This will be added to the Byphone name servers by one of our support staff. Once confirmed by support, go back to the Microsoft 365 admin center and click Verify.

  8. On the next page, select I'll add the DNS records myself and click Next.

  9. On the next page, clear all options and click Next.

  10. Click Finish on the Update DNS settings page.

  11. Ensure that the status is Setup complete.

  12. Notify Byphone support that the subdomain has been verified.

Activate the subdomain name

After you register a domain name, you need to activate it by adding at least one user and assign a SIP address with the FQDN portion of the SIP address matching the created subdomain in the customer tenant. License can be revoked from user after the subdomain activation (it can take up to 24 hours). An alias is not sufficient.

For example: test@customer1.mssbc.byphone.co.uk

Create a trunk and provision users

Assumptions

  1. You have the latest version of PowerShell installed on the administration machine (using an older version of Powershell is likely to cause delays/prevent the configuration from being successful).  

  2. You have a Teams Admin account that has full access to the Teams role

  3. You have the Microsoft Teams PowerShell module (version 4.0.0 or newer) installed https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-install

 

  • To use the Teams Module:
    Import-Module MicrosoftTeams

  • To get the admin logon details:  
    $credential = Get-Credential

  • To establish the session:
    Connect-MicrosoftTeams -Credential $credential

Configure PSTN Usage

We’re going to create a PSTN Usage called All. This will be the policy we use for routing all calls between Byphone SBC and Teams.

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="All"}

Configure Online Voice Routing

We’re going to define how calls are routed using a match (regular expression). To ensure all calls are passed to Byphone Teams SBC, we’re going to make our Route match any digits dialled.

New-CSOnlineVoiceRoute -Identity "All" -NumberPattern ".*" -OnlinePstnGatewayList <SBC FQDN> -Priority 1 -OnlinePstnUsages "All"

i.e. SBC FQDN = customer1.mssbc.byphone.co.uk

Create Online Voice Routing Policy

This step now links our Voice Route and PSTN Usage.

New-CSOnlineVoiceRoutingPolicy "Byphone" -OnlinePstnUsages "All"

Enable User(s) for Calling

For each user, make sure they have the correct license first as well as the AllowCalling policy.

Then, run the following command (per user) to enable calling for them. Repeat the below steps for each user in your organisation with the required licenses listed at the top of this page. The Username used should be the default username for the user (not required to include the new domain added).

Set-CsPhoneNumberAssignment -Identity <User name> -PhoneNumber 9<Byphone Extension> -PhoneNumberType DirectRouting

Grant-CsOnlineVoiceRoutingPolicy -Identity <User name> -PolicyName "Byphone"

Important - When adding each number, ensure it matches the user’s Byphone extension prefixed by a 9.  If you don’t, calls will fail.

i.e. Byphone Extension 1000 becomes TEL:91000

User name = "test@customer1.mssbc.byphone.co.uk"

Allow all Dialplan rule

Within the Microsoft Teams Admin center on the Microsoft tenant, select the Voice > Dial plans

Select the exisiting Global Dial plan policy and then Edit.

Create a new Normalization rule named All matching the If condition ^(\d*)$ translated to $1 and select Save, as per the below image.

This will allow any number format to be dialled from the Teams client via the Byphone route.

How to Ensure Connectivity

There are a number of checks we can perform, these should be done either as you configure the Teams tenant, or once the initial configuration has been done.

Checking a User has Voice Enabled

To check that a user has voice enabled, go to the Microsoft Teams Admin Center.  In the Users section, select the user that you want to check.

As per the example below, they are voice enabled if they have a phone number derived from their Byphone extension and they have the AllowCalling policy set in the policies section:

Get-CsOnlineVoiceRoutingPolicy

Confirms the routing policy is set up correctly

Get-CsOnlineVoiceRoute

Confirmes the voice route is configured correctly

Get-CsOnlineUser -identity <username> | fl *OnPrem*

Confirms the user is set up correctly and the number is in the correct format

Get-CsOnlineUser -identity <username> | fl *Policy*

This ensures the user has the correct policies enabled

 

Add MS Teams Extension to a Ring Group/Follow Me

Currently we use the External number method to add a MS Teams Extension to a Ring Group or Follow Me. While editing a Ring Group choose the Add Identity option (for Follow Me the option is called Add Follow Me). In the box that appears, toggle the External option, enter a memorable label to identify this extension (generally the User’s name followed by Teams). Then in the Number field, enter 9 followed by the desired user’s Byphone extension i.e. 1000 becomes 91000. Finish by selecting the Add button and then Save. MS Teams extension is not directly diallable from a normal dialpad. It must be included in a Ring Group or Follow Me.

Note: An Offline/Inactive Teams user included in a Ring Group or Follow Me will automatically answer calls with their Voicemail. If this is not desired, Voicemail can be disabled in Teams (this does not affect Byphone Voicemail).

Teams Call Settings

Coexistence Mode - Teams Only - Upgrade

https://docs.microsoft.com/en-us/microsoftteams/troubleshoot/teams-administration/cannot-switch-to-teams-only-mode