Teams Direct Routing with SBC Simple Setup

If you want to quickly setup a Microsoft Teams Direct Routing with your own hosted SBC connected to the PSTN. For a smaller, simple scenario you can use this few commands and will be ready within minutes.

New-CsOnlinePSTNGateway -Identity -SipSignallingPort 5068 -ForwardCallHistory $true -ForwardPai $true -MaxConcurrentSessions 60 -Enabled $true

(-Enabled $true will instantly enable the GW for outbound calling allowed)

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

New-CsOnlineVoiceRoute -identity "Unrestricted" -NumberPattern ".*" -OnlinePstnGateway -Priority 1 -OnlinePstnUsages "Unrestricted"


You create the Online PSTN Gateway, your own SBC and define the SIPSignaling Port and some more parameters, e.g. the maximum concurrent sessions (here 60)

Create an unrestricted PSTN Usage, enabling the user, for allowed callings to anywhere 

Create a Voice route, so the Teams Direct Routing knows where to send and receive calls from. This also sets the PSTN Usage pattern to this route.

It is fast an simple and with the following illustration, you will understand the nested Policies and Routes.
In our case, we have configured the "Global" Policies, meaning this is as a default setting for user and routes.

Configuring the user:
Set-CsUser -Identity "<User name>" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:+4980123456 <phone number>

Set-CsUser - setting the PSTN related parameters
Get-CsOnlineUser - getting the Online User settings

Only if a user is with Calling Plan 100% only the cmdlet
Get/Set-CsOnlineVoiceUser is the command


Popular posts from this blog

Cannot join external Lync Meeting: Lync Edge Server Single IP Address (Lync Edge Server Single IP Web Conferenceing Problem)

How to hide users from GAL if they are AD Connect synchronized

MFA with Guest Access and different tenants settings