Skip to main content

Microsoft Teams

Thirdlane platform can be integrated with Microsoft Teams and act as an SBC for routing calls from and to Microsoft Teams users.

To enable integration with Thirdlane all the MS Teams users will need to have Office 365 Enterprise E3 and Phone System License, or Office 365 Enterprise E5 license.

Microsoft Teams integration is a complex multi step process so we don't recommend to do it alone without Microsoft Teams integration experience. Engaging Thirdlane support team is the best option.

You have to configure the integration on Microsoft web site, as well as in Thirdlane Configuration Manager.

If you don't already have it, you will also have to obtain an SSL certificate. Note that if you are using Thirdlane Multi Tenant PBX you will need a wildcard certificate.

In Thirdlane, you will also have to specify whether the Microsoft Teams integration is available for individual tenants and enabled for individual users.

General Configuration

On Microsoft web site

If you already have base domain and users, add domain alias for the newly added Thirdlane domain for each user, otherwise, create users with the newly created Thirdlane domain. The screens below show you how to register a domain record following the Microsoft Teams documentation.

Adding MS Teams Domain

Here is how to add the domain:

Microsoft Teams

Adding MS Teams Domain - step 2

Microsoft Teams

The newly added domain must be verified, which requieres a few steps:

Verifying MS Teams Domain

Connecting DNS record

Microsoft Teams

Verification using TXT record

Microsoft Teams

Verification using TXT record completed

Microsoft Teams

After the domain is added, an alias has to be configured.

Adding domain alias

Microsoft Teams

On Windows Desktop with PowerShell

Install PowerShell modules

Install required PowerShell modules using the following commands:

Install-Module -Name PowerShellGet -Force -AllowClobber

Install-Module -Name MicrosoftTeams -Force -AllowClobber

Connect to MS Teams backend

$credentials=Get-Credential

Connect-MicrosoftTeams -Credential $credentials

Microsoft Teams

backend 2

Microsoft Teams

Configure SBC using PowerShell commands

New-CsOnlinePSTNGateway -Fqdn sbc.yourdomain.com -Enabled $true -SipSignalingPort 5062 -MaxConcurrentSessions 100 -ForwardCallHistory $false -ForwardPai $true

Microsoft Teams

Configure outbound Calls from Teams

If using Thirdlane Multi Tenant PBX, run the following PowerShell command for each tenant replacing tenant with Thirdlane tenant name, or run the command omitting tenant if using Thirdlane Business PBX.

Set-CsOnlinePstnUsage -Identity Global -Usage @{Add=”Default”}

New-CsOnlineVoiceRoute -Identity "All" -NumberPattern ".*" -OnlinePstnGatewayList tenantx.sbc.yourdomain.com -Priority 0 -OnlinePstnUsages "Default"

Set-CsOnlineVoiceRoutingPolicy "Global" -OnlinePstnUsages "Default"

Microsoft Teams

Setup a Normalization Rule for Outbound Dialing

$TCXExt = New-CsVoiceNormalizationRule -Parent Global -Name "All numbers" -Description "All numbers" -Pattern '^(\d+)$' -Translation '$1' -IsInternalExtension $false -InMemory

Set-CsTenantDialPlan -Identity "Global" -NormalizationRules @{add=$TCXExt}

Microsoft Teams

In Configuration Manager

In Thirdlane Configuration Manager go to System Management > Telephony Settings > Microsoft Teams screen and specify your Base Domain, SIP signaling Port for Direct Routing TLS connections, nsert your certificate, its key and a root certificate.

In addition to any other root certificates a 'Baltimore CyberTrust Root' certificate is required and has to be added to the Root Certificate section. This root certificate can be copied from here

System level configuration for MS Teams integration in Configuration Manager

Microsoft Teams

Base Domain. Specify Base Domain.

Port. Specify SIP signaling port for Direct Routing SBC.

Endpoint TLS Connection Options. Specify your TLS protocol method choosing one of the options:

  • Accept only TLSv1.2 Connections
  • Accept TLSv1.1 or Newer Connections
  • Accept only TLSv1.1 Connections
  • Accept TLSv1.0 or Newer Connections
  • Accept only TLSv1 (TLSv1.0) Connections

Certificate. Copy your certificate here. This field is required for TLS transport.

Private Key. Copy your private key here. This field is required if TLS transport.

Root Certificate. Sets the root certificate (Certificate Authority). This field is required if TLS transport.

Require Certificate. When enabled, system will require a certificate from a client connecting to the TLS port. If the client does not offer a certificate, certificate verification will fail.

Verify Certificate. If enabled, it will force certificate verification when connecting to SIP endpoints.

Additional steps outside of Configuration Manager

In the system firewall configuration and on the external firewall (if your server is behind it) create a rule for the specified port.

In /etc/kamailio/local.cfg uncomment MS_TEAMS_FEATURE and restart Kamailio with "systemctl restart kamailio" (do not do this during working hours).

Tenant configuration for MS Teams integration

You have to configure and enable MS Teams for any Tenant that will be using it.

Microsoft Teams

Configure MS Teams for Each User

In Thirdlane Configuration Manager

User Extension configuration for MS Teams integration

You also have to enable MS Teams for User Extensions.

Microsoft Teams

In Microsoft Teams

Microsoft Teams