Configure PSTN Gateway in Office 365

configure PSTN Gateway in Office 365 for Direct Routing



Install Skype for Business Online Connector


Download and Install Skype for Business Online Connector Information available here



Connect to SfBO using PowerShell


import-module SkypeOnlineConnector
$credential = Get-Credential -username "admin@shoey.example" -message "Login details for admin@shoey.example"
$session = New-CsOnlineSession -Credential $credential
Import-PSSession -Session $session -AllowClobber



Add a new PSTN Gateway


The following example contains all the minimum parameters required to configure to pair the SBC to the tenant.

parameter Default Value
FQDN sbc.shoey.example
SipSignallingPort 5067
FailoverTimeSeconds 10
ForwardCallHistory false
ForwardPAI false
SendSIPOptions true
MaxConcurrentSessions 10
Enabled true
MediaBypass false

New-CsOnlinePSTNGateway -Fqdn "sbc.shoey.example" -SipSignallingPort "5067" -MaxConcurrentSessions "10" -Enabled $true



Add online PSTN Usage


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



Add online voice route


** Example 1 - Voice Route for Australia Calls **

New-CsOnlineVoiceRoute -Identity "Australia" -NumberPattern "^+61(\d{9})$" -OnlinePstnGatewayList  -Priority 1 -OnlinePstnUsages "Australia"

** Example 1 - Voice Route for All Calls **

New-CsOnlineVoiceRoute -Identity "Australia" -NumberPattern ".*" -OnlinePstnGatewayList -Priority 1 -OnlinePstnUsages "Australia"



Validate Online Voice Routes


Get-CSOnlineVoiceRoute



Add Online Voice routing Policy


New-CsOnlineVoiceRoutingPolicy -identity "Australia" -OnlinePstnUsages "Australia"