Existing or new MS Teams users can benefit from using alternative voice service provider with a Thirdlane system as a gateway. This will allow to use any SIP carrier of your choice with benefits they provide and will add more configuration flexibility.
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.
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.
One time configuration steps in Thirdlane and MS Teams
In Thirdlane
- 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, and insert 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.
- 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).
- If using Thirdlane Multi Tenant PBX you also have to configure and enable MS Teams for any tenant that will be using it
In Microsoft 365 Admin Center
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.
Here is how to add the domain:
Microsoft requires the added domain to be verified:
After the domain is added, an alias has to be configured in MS
Using Windows Desktop with PowerShell
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
Configure SBC using PowerShell commands:
New-CsOnlinePSTNGateway -Fqdn sbc.yourdomain.com -Enabled $true -SipSignalingPort 5062 -MaxConcurrentSessions 100 -ForwardCallHistory $false -ForwardPai $true
Configure outbound Calls from Teams
If using Thirdlane Multi Tenant PBX, run the following PowerShell command for each tenant replacing tenantx with Thirdlane tenant name, or run the command omitting tenantx 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"
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}
Configure MS Teams for Each User
In Thirdlane Configuration Manager
In MS Teams
Assign local number to the MS Teams users
Set-CsPhoneNumberAssignment -Identity "userx@domainx.com" -EnterpriseVoiceEnabled $true
Set-CsPhoneNumberAssignment -Identity "userx@domainx.com" -PhoneNumber "extensionx" -PhoneNumberType DirectRouting
Here userx@domainx.com is the "Primary email address and username" defined in MS Teams, and extensionx is User's Thirdlane extension number.
Disable VM box on MS Teams side
Set-CsOnlineVoicemailUserSettings -Identity "userx@domainx.com" -VoicemailEnabled $false
Here userx@domainx.com is the "Primary email address and username" is the same as in the step above.