Enterprise Guide: Microsoft Teams Integration - Licensing and configuration


Introduction

Microsoft Teams offers an inside service called “Direct Routing” that allows organizations to connect external phone lines and use Teams as an office phone system. It gives businesses the ability to bring Public Switched Telephone Network (PSTN) connection to Microsoft Teams users. This enables them to make and receive external phone calls without a Microsoft calling plan.

Integrating of the Movius platform with Microsoft “Direct Routing” allows the Movius MultiLine to be offered as the business phone number for Microsoft Teams users who will use it to place and receive call through either Movius Multiline or Microsoft Teams clients.

Overview

Microsoft Phone System Direct Routing allows the connection of a supported Session Border Controller (SBC) provided by Movius to Microsoft Phone System. With this capability Movius can bring Public Switched Telephone Network (PSTN) connectivity with Microsoft Teams client in addition to the MultiLine client connectivity, as shown in the following diagram:

In this integrated scenario:

  1. Microsoft Teams users can initiate external calls in the Teams application that are terminated by the Movius platform via a configured telephone service provider.
  2. Make a call from any number to Movius MultiLine number and it will ring simultaneously to Microsoft Teams. Users can choose in which application the incoming calls will be answered (Movius MultiLine or Microsoft Teams).

Requirements

Infrastructure

The infrastructure to deploy Direct Routing and integrate to Movius platform are listed in the following table:

Microsoft 365 or Office 365 organization

An Microsoft 365 or Office 365 organization that it is used to home the Microsoft Teams users, and the configuration and connection to the Movius SBC.

User registrar

Users must be homed in Microsoft 365 or Office 365.

If the company has an on-premises Skype for Business or Lync environment with hybrid connectivity to Microsoft 365 or Office 365, it will not allow to enable voice in Teams for a user homed on-premises.

Domains

One or more domains added to the Microsoft 365 or Office 365 organizations.

Note that the default domain, *.onmicrosoft.com, that is automatically created for your tenant cannot be used.

Fully Qualified Domain Name (FQDN) for the Movius SBC

A FQDN for the Movius SBC, where the domain portion of the FQDN is one of the registered domains in the Microsoft 365 or Office 365 organization.

Public DNS entry for the Movius SBC

A public DNS entry mapping the Movius SBC FQDN to the public IP Address that Movius will provide.

Public trusted certificate for the Movius SBC

A certificate for the Movius SBC to be used for all communication with Direct Routing.

Licensing

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

  • Microsoft Phone System

Phone System is a hosted telephone service that gives call control and Private Branch Exchange (PBX) capabilities, with options for connecting to the Public Switched Telephone Network (PSTN). Phone System features include cloud voicemail, caller ID, call park, call forwarding, auto attendants, call queues, call transfer, caller ID, and more.

Configurations

This topic lists the high-level steps required to connect the Movius Session Border Controller (SBC) to Direct Routing, and how to configure Teams users to use Direct Routing to make and receive calls to and from the Public Switched Telephone Network (PSTN).

To complete some steps explained in this topic, administrators need familiarity with Microsoft Teams PowerShell cmdlets. Microsoft Teams PowerShell module is a set of cmdlets for managing Teams directly from the PowerShell command line. It is a single module to manage all aspects of Teams administration, including users, teams, policies, and configuration.

Connect to Movius SBC

It is possible to use the Microsoft Teams admin center or PowerShell to configure and connect an SBC to Direct Routing: 

Using the Microsoft Teams admin center

(https://admin.teams.microsoft.com) 

  1. In the left navigation, go to Voice > Direct Routing, and then click the SBCs tab.
  2. Click Add.
  3. Enter a FQDN for the Movius SBC.

Note: if there is a message stating that the system can't use the entered domain as it hasn't been set up in the organization, please register the base domain in the organization using the following procedure: 

https://docs.microsoft.com/en-us/microsoftteams/direct-routing-sbc-multiple-tenants#register-a-base-domain-name-in-the-carrier-tenant

4. Configure the following settings for the SBC, based on the organization's needs. For details on each of these settings, see SBC settings.

5. When it is done, click Save.

Using PowerShell

1 - Connect to Microsoft Teams by using PowerShell.

After you establish a remote PowerShell session, verify that you can see the commands to manage the SBC. To verify the commands, type the following command in the PowerShell session, and then press Enter:

Get-Command *onlinePSTNGateway*

This command returns the four functions shown below that will allow to manage the SBC.

2 - Connect the SBC to the tenant

Use the New-CsOnlinePSTNGateway cmdlet to connect the SBC to the tenant. In a PowerShell session, type the following, and then press Enter:

New-CsOnlinePSTNGateway -Fqdn <SBC FQDN> -SipSignalingPort <SBC SIP Port> -MaxConcurrentSessions <Max Concurrent Sessions the SBC can handle> -Enabled $true

Example: New-CsOnlinePSTNGateway -Identity sbc.contoso.com -Enabled $true -SipSignalingPort 5067 -MaxConcurrentSessions 100

3 - Verify the SBC connection

First, it is necessary to establish a connection with the Microsoft Teams instance using the following command: 

Connect-Microsoft Teams 

Example: Connect-MicrosoftTeams


After you connect the SBC, use the Get-CsOnlinePSTNGateway cmdlet to verify that the SBC is present in the list of paired SBCs.

Get-CsOnlinePSTNGateway [[-Identity] <String>][AS1]

Example: Get-CsOnlinePSTNGateway -Identity vavsbc.moviusauth.com


Get-CsOnlinePSTNGateway -Identity vavsbc.moviusauth.com

Validate SIP options: When Direct Routing sees incoming OPTIONS from the Movius SBC, it will start sending outgoing SIP Options messages to the SBC FQDN configured in the Contact header field in the incoming OPTIONS message. The Movius SBC also replies to the Direct Routing SIP Options with the response code 200 OK.

In the Teams admin center under “Voice” > “Direct Routing” it is possible to check the status of the connection to the Movius SBC:


SBC Settings

The following table lists the options that can be used for setting the SBC in the Microsoft Teams admin center and by using the New-CsOnlinePSTNGateway cmdlet:

Required?

Microsoft Teams admin center setting

PowerShell parameter

Description

Default

Possible values

Type and restrictions

Yes

Add an FQDN for the SBC

FQDN

None

FQDN name, limit 63 characters

String


No

Enabled

Enabled

Use to turn on the SBC for outbound calls. This is used to temporarily remove the SBC from service while it's being updated or during maintenance.

FALSE

TRUE / FALSE

Boolean

Yes

SIP signaling port

SipSignalingPort

This is the listening port that's used to communicate with Direct Routing by using the Transport Layer (TLS) protocol.

None

Any port

0 to 65535

No

Send SIP options

SendSIPOptions

Defines whether the SBC will send SIP options messages. It is recommended to turn on this setting. When this setting is off, the SBC is excluded from the Monitoring and Alert system.

TRUE

TRUE / FALSE

Boolean

No

Forward call history

ForwardCallHistory

Indicates whether call history information is forwarded through the trunk. When turning this on, the Microsoft 365 or Office 365 proxy sends a History-info and Referred-by header.

FALSE

TRUE / FALSE

Boolean

No

Forward P-Asserted-identity (PAI) header

ForwardPAI

Indicates whether the PAI header is forwarded along with the call. The PAI header provides a way to verify the identity of the caller. If this setting is on, the Privacy:ID header is also sent.

FALSE

TRUE / FALSE

Boolean

No

Concurrent call capacity

MaxConcurrentSessions

When a value is set, the alerting system will notify when the number of concurrent sessions is 90 percent or higher than this value. If a value is not set, alerts aren't generated. However, the monitoring system will report the number of concurrent sessions every 24 hours.

Null

Null
 1 to 100,000


No

Failover response codes

FailoverResponseCodes

If Direct Routing receives any 4xx or 6xx SIP error code in response to an outgoing Invite, the call is considered completed by default. Outgoing means a call from a Teams client to the PSTN with traffic flow: Teams client -> Direct Routing -> SBC -> telephony network). When you specify a failover response code, this forces Direct Routing to try another SBC (if another SBC exists in the voice routing policy of the user) when it receives the specified codes if the SBC can't make a call because of network or other issues.

408, 503, 504


Int

No

Failover times (seconds)

FailoverTimeSeconds

When you set a value, outbound calls that aren't answered by the gateway within the time that you set are routed to the next available trunk. If there are no additional trunks, the call is automatically dropped. The default value is 10 seconds. In an organization with slow networks and gateway responses, this could potentially result in calls being dropped unnecessarily.

10

Number

Int

No

Preferred country or region for media traffic

MediaRelayRoutingLocationOverride

Not applicable to Direct Routing. This parameter is reserved for use with managed carriers in Calling Plans

None



No

SBC supports PIDF/LO for emergency calls

PidfloSupported

Specify whether the SBC supports Presence Information Data Format Location Object (PIDF/LO) for emergency calls.




No

-

MediaBypass

This setting indicates whether the SBC supports media bypass and whether you want to use it for this SBC.

None

TRUE / FALSE

Boolean

Enable Users

Configure the phone number and enable enterprise voice

It is possible to use the Microsoft Teams admin center or PowerShell to configure the phone number:

4.2.1.1 Using the Microsoft Teams admin center (https://admin.teams.microsoft.com)

  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.

Using PowerShell

Connect to a Microsoft Teams PowerShell session.

Configuring the user's online phone settings:

Set-CsUser -Identity "<User name>" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:<phone number>

Example: Set-CsPhoneNumberAssignment -Identity "ailton@moviusauth.com" -PhoneNumber +14843123838  -PhoneNumberType DirectRouting

RegistrarPool : sippoolwu2ed602.infra.lync.com

OnPremLineUri :

LineUri:  tel:+14783777138

Disable Online Voicemail 

Disabling online voicemail: 

Set-CsOnlineVoicemailUserSettings  -Identity <String>  [-VoicemailEnabled <Boolean>]

Example: Set-CsOnlineVoicemailUserSettings -Identity ailton@moviusauth.com -VoicemailEnabled $false


Configure Call Routing

Microsoft Phone System has a routing mechanism that allows a call to be sent to a specific Session Border Controller (SBC) based on:

  • The called number pattern
  • The called number pattern plus the specific user who makes the call

SBCs can be designated as active and backup. When the SBC that is configured as active is not available for a specific call route, then the call will be routed to a backup SBC.

Call routing is made up of the following elements:

  • Call routing policy – Also called a voice routing policy. A container for PSTN usages, which can be assigned to a user or to multiple users.
  • PSTN usages – A container for voice routes and PSTN usages, which can be shared in different voice routing policies.
  • Voice routes – A number pattern and set of online PSTN gateways to use for calls where the calling number matches the pattern.
  • Online PSTN gateway - A pointer to an SBC that also stores the configuration that is applied when a call is placed through the SBC, such as forward P-Asserted-Identity (PAI) or Preferred Codecs; can be added to voice routes.

Example: Voice routings with one and two PSTN usages

In this example, two voice routing policies will be created which use one or two PSTN usages. One policy will allow calls only to US and Canada only (+1) an the other will have no restrictions.

Create PSTN usages

  1. In the left navigation of the Microsoft Teams admin center, go to “Voice” > “Direct Routing”, and then in the upper-right corner, select Manage PSTN usage records.
  2. Click Add, type US and Canada, and then click Apply.
  3. Select Manage PSTN usage records again.
  4. Click Add, type International and then click Apply.

Create voice routes

  1. In the left navigation of the Microsoft Teams admin center, go to “Voice” > “Direct Routing”, and then select the Voice routes tab.
  2. Click Add, and then enter a name and description for the voice route.
  3. Set the priority and specify the dialed number pattern.
  4. To enroll an SBC with the voice route, under SBCs enrolled (optional), click Add SBCs, select the SBCs you want to enroll, and then click Apply.
  5. To add PSTN usage records, under PSTN usage records (optional), click Add PSTN usage, select the PSTN records you want to add, and then click Apply.
  6. Repeat the steps to create the second voice route.
  7. Click Save.

Create voice routing policies

  1. In the left navigation of the Microsoft Teams admin center, go to “Voice” > “Voice routing policies”, and then click Add.
  2. Type “US Only” as the name and add a description.
  3. Under PSTN usage records, click Add PSTN usage, select the "US and Canada" PSTN usage record, and then click Apply.
  4. Click Add.
  5. Type “No Restrictions” as the name and add a description.
  6. Under PSTN usage records, click Add PSTN usage, select the "US and Canada" and “International” PSTN usage record, and then click Apply.
  7. Click Save.

Assign voice routing policies to users

  1. In the left navigation of the Microsoft Teams admin center, go to “Users” > “Manage users” and then click the “pauluser”, for example. 
  2. Click Policies, and then next to Assigned policies, click Edit.
  3. Under Voice routing policy, select the "US Only" policy, and then click Apply.
  4. In the left navigation of the Microsoft Teams admin center, go to “Users” > “Manage users” and then click the “ailton”, doe example. 
  5. Click Policies, and then next to Assigned policies, click Edit.
  6. Under Voice routing policy, select the "No Restrictions" policy, and then click Apply.

Note: The example shows the necessary steps to make the configuration using Microsoft Teams admin center. The same configuration can be achieved using PowerShell cmdlets.

References

https://docs.microsoft.com/en-us/microsoftteams/direct-routing-connect-the-sbc