Direct routing allows organizations to connect their on-premises PBXes or SIP trunks to Microsoft Teams via certified session border controllers (SBCs). This provides a full enterprise calling experience within Teams. The document discusses what direct routing is and when to use it, how to plan direct routing implementations including SBC options, and how to configure direct routing in Teams through settings like voice routing policies and phone number translations. It aims to help organizations optimize their direct routing configurations to leverage existing telephony infrastructure with Microsoft Teams.
6. Enterprise Voice for the cloud
PSTN dial tone
Microsoft
Calling Plans
Direct Routing
in Teams
(Telco calling services)
The hub for teamwork
Microsoft Teams
Office 365
PBX Phone System
Phone System,
when paired with
Microsoft Calling
Plans and/or Direct
Routing, provides a
full enterprise calling
experience for Office
365 users in Teams
on a global scale
7. Direct Routing for Teams
PSTN TRUNK INTERNET
PSTN
network
Analog
telephony
adapter (ATA)
(supported by
certified SBC Partners)
Certified Session Border
Controller(s)
Third-party
PBX
Phone System
12. Self deployed SBC Partner hosted SBC
Benefits • Full control over SBC
• Connectivity to existing PBX
• No need for purchasing, maintaining and
hosting own SBC
Disadvantages • Customer responsible for SBC
configuration
• Need to purchase, maintain and host SBC
• No control over SBC configuration
• Support model more complex
16. DNS name registered in
Office 365 tenant
Can be used for SBC FQDN Examples of FQDNs
contoso.onmicrosoft.com Using *.onmicrosoft.com domains is not supported for SBC names
contoso.com
Valid names:
sbc1.contoso.com;
ussbcs15.contoso.com;
europe.contoso.com
Non-valid name:
sbc1.europe.contoso.com (requires registering domain name
europe.contoso.com in “Domains” first)
IP: 99.66.240.133
DNS Name: sbc1.contoso.com
Phone System
(Cloud PBX)
Internet
17. https://aka.ms/sbc-cert
Minimize certificate cost Balance the cost and security Maximize security
Description
This scenario is for companies that want
to pair many SBCs or change them
frequently
This scenario is good for companies that
do not change the gateways frequently.
In the example below. a company has four
SBCs (gw1.contoso.com; gw2.contoso.com;
gw3.contoso.com; gw4.contoso.com).
In this scenario the company assigns a
certificate to each gateway. There is
only one certificate for every gateway.
Subject name gw1.contoso.com gw1.contoso.com gw1.contoso.com
SAN *.contoso.com
gw1.contoso.com
gw2.contoso.com
gw3.contoso.com
gw4.contoso.com
gw1.contoso.com
18. From IP To IP Source port Destination port
SIP Proxy SBC 1,024 – 65,6536
Defined on the
SBC
SBC SIP Proxy
Defined on the
SBC
5061
From IP To IP Source port Destination port
Media
Processor
SBC 49,152 – 53,247
Defined on the
SBC
SBC Media Processor
Defined on the
SBC
49,152 – 53,247
SIP signaling ports (TLS/SIP)
Media ports (UDP/SRTP)
SIP Proxy
FQDN Connection Points (in order):
sip.pstnhub.microsoft.com – Global FQDN [must be tried first]
sip2.pstnhub.microsoft.com – Secondary FQDN
sip3.pstnhub.microsoft.com – Tertiary FQDN
IP Address Connection Points:
The above FQDNs resolve to one of the following IPs:
52.114.148.0
52.114.132.46
52.114.75.24
52.114.76.76
52.114.7.24
52.114.14.70
sip-all.pstnhub.microsoft.com also resolves to all above IPs
Media
Processors
52.112.0.0/14
52.120.0.0/14
FQDNs and IP ranges
Applicable to O365
Commercial and GCC Only
https://aka.ms/dr-PlanFQDNPorts
19. From IP To IP Source port Destination port
SIP Proxy SBC 1,024 – 65,6536
Defined on the
SBC (must be
5061 or 5062
only)
SBC SIP Proxy
Defined on the
SBC
5061
From IP To IP Source port Destination port
Media
Processor
SBC 49,152 – 53,247
Defined on the
SBC
SBC Media Processor
Defined on the
SBC
49,152 – 53,247
SIP signaling ports (TLS/SIP)
Media ports (UDP/SRTP)
SIP Proxy
FQDN Connection Point:
sip.pstnhub.gov.teams.microsoft.us
IP Address Connection Points:
The above FQDN resolves to one of the following IPs:
52.127.88.59
52.127.92.64
Media
Processors
52.127.88.0/21
FQDNs and IP ranges
Applicable to GCC High
Only
https://aka.ms/dr-PlanFQDNPorts
20. From IP To IP Source port Destination port
SIP Proxy SBC 1,024 – 65,6536
Defined on the
SBC (must be
5061 or 5062
only)
SBC SIP Proxy
Defined on the
SBC
5061
From IP To IP Source port Destination port
Media
Processor
SBC 49,152 – 53,247
Defined on the
SBC
SBC Media Processor
Defined on the
SBC
49,152 – 53,247
SIP signaling ports (TLS/SIP)
Media ports (UDP/SRTP)
SIP Proxy
FQDN Connection Point:
sip.pstnhub.dod.teams.microsoft.us
IP Address Connection Points:
The above FQDN resolves to one of the following IPs:
52.127.64.33
52.127.68.34
Media
Processors
52.127.64.0/21
FQDNs and IP ranges
Applicable to GCC DoD
Only
https://aka.ms/dr-PlanFQDNPorts
23. A PSTN usage record specifies a class of call (such as internal, local, or long
distance) that can be made by various users or groups of users in an
organization
By themselves, PSTN usage records do not do anything. For them to work,
they must be associated with:
Order of Usages is critical
Voice Routing Policies PSTN Usages Voice Routes
24.
25. A set of normalization rules that translate
dial strings to full, unique numbers
^ match the start $ match the end
d match any digit d* 0 or more digits
d{5} any 5 digits [135] 1, 3, or 5
(13)|(17) 13 or 17 [1-5] 1 through 5
(…) “captures” the enclosed characters for referring to them
in the result as $1, $2, $3, etc.
Normalization rules are built
using regular expressions
Limits
26. Dialing Habits
From Legacy PBX to Skype for Business
Keep? Sample Dialing Habits Remark
X Dial “0” / “9” for an outside line No added value, Legacy PBX requirement
V 3/4 digit dialing within the site Used frequently, improves adoption
X / V 3/4 digit dialing between sites High impact on normalization rules
X Use trunk Seizure codes to dial between sites No added value, Legacy PBX requirement
V Use “00” for international calling
Yes, accepted standards, in place for many years
and used by everybody world wide
V Use “0” for national calling
V Use “011” for International access
Etc.
29. Step 4
Maintain consistency in dial plan names
•Develop an organization-wide scheme for naming dial plans
Step 3
Identify valid number patterns for each plan
•Only the number patterns that are not defined in the service level country dial plans are required
Step 2
Determine which dial plan type is required
•Tenant user scoped dial plans are needed if users have different local dialing requirements
•Tenant global dial plans can be used if all users in the tenant share the same requirements
Step 1
Decide if additional rules are required
•The cmdlet Get-CsEffectiveTenantDialPlan for a user will show the default rules
30. User from Netherlands makes
a call to +1 (425) 555-1212
Voice
Routing
Policy
exists?
User has
Microsoft
Calling
Plan?
Domestic
or International?
Call via Microsoft
Calling Plan
No
Yes
International
Usages evaluated in order
Each usage can have multiple routes
PSTN Usage 3
PSTN Usage 2
PSTN Usage 1
Yes
No match
Call Failed
Call via Direct
Routing
Domestic
only
No
Try the call via SBC(s) in the
route(s)
At least one
route matches
the dialed
pattern
All SBCs not
functional
Success
35. From IP To IP Source port
Destination
port
Teams Client SBC Public IP 50,000 – 50,019 Defined on the SBC
SBC Public IP Teams Client Defined on the SBC 50,000 – 50,019
Media ports (UDP/SRTP) – direct media
Media Processor/Transport Relay (Commercial/GCC)
52.112.0.0/14
52.120.0.0/14
Media Processor/Transport Relay (GCC High) 52.127.88.0/21
Media Processor/Transport Relay (DoD) 52.127.64.0/21
IP ranges
From IP To IP Source port
Destination
port
Transport Relay SBC 50,000 – 50,999 Defined on the SBC
SBC Transport Relay Defined on the SBC
50,000 – 50,999,
3478, 3479
Media Processor SBC 49,152 – 53,247 Defined on the SBC
SBC Media Processor Defined on the SBC 49,152 – 53,247
Media ports (UDP/SRTP) – using TR/MP
36. Control how the media traffic flows between the Teams clients and
customer Session Border Controllers (SBCs)
Keep media local within the boundaries of corporate network
subnets
Allowing media streams between the Teams clients and SBCs even if
SBCs are behind the corporate firewalls with private IPs and not
visible to Microsoft directly
37. Desire to keep the media local (within the boundaries of the
corporate network)
Ability to connect to the internal
(private) IP of the SBC
Branch offices with SBCs do not require local
internet breakout with Public IP for the SBC
What about “traditional” Media
Bypass?
If tenant only desires to use SBCs with Public IP
connectivity, no change required
Not mandatory to move to Local Media
Optimization
38.
39. Europe region
• Approximately 30 countries with offices,
each with its own PBX
• Trunks for all offices are centralized in one
location [Amsterdam]
• SBC deployed in Amsterdam with enough
bandwidth for all calls through central
location
• All countries in Europe region are served
by the Amsterdam location
APAC region
• Multiple offices in different countries,
many of which cannot switch to SIP
• Many TDM trunks exist at local branches
• More than fifty branch offices across the
region with hundreds of gateways/SBCs
• Cannot pair all gateways directly due to
lack of public IP addresses/local internet
breakouts
• Need for local PSTN connectivity due to
regulatory requirements in some
countries
50. Online PSTN Gateway
New-CsOnlinePSTNGateway -Fqdn sbc1.contoso.com -SipSignallingPort 5068 -Enabled $true
New-CsOnlinePSTNGateway -Fqdn sbc2.contoso.com -SipSignallingPort 5068 -Enabled $true
Voice Routes
Route for +1425 and +1206 (Priority 1):
New-CsOnlineVoiceRoute -Identity "Redmond 1" -NumberPattern "^+1(425|206)
(d{7})$" -OnlinePstnGatewayList sbc1.contoso.com, sbc2.contoso.com -Priority 1 -OnlinePstnUsages "US and Canada“
PSTN Usages
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="US and Canada"}
New-CsOnlinePSTNGateway -Fqdn sbc3.contoso.com -SipSignallingPort 5068 -Enabled $true
New-CsOnlinePSTNGateway -Fqdn sbc4.contoso.com -SipSignallingPort 5068 -Enabled $true
Route for +1425 and +1206 (Priority 2)
New-CsOnlineVoiceRoute -Identity "Redmond 2" -NumberPattern "^+1(425|206)
(d{7})$" -OnlinePstnGatewayList sbc3.contoso.com, sbc4.contoso.com -Priority 2 -OnlinePstnUsages "US and Canada”
New-CsOnlinePSTNGateway -Fqdn sbc5.contoso.com -SipSignallingPort 5068 -Enabled $true
New-CsOnlinePSTNGateway -Fqdn sbc6.contoso.com -SipSignallingPort 5068 -Enabled $true
Route for other calls:
New-CsOnlineVoiceRoute -Identity "Other +1" -NumberPattern "^+1(d{10})$“
-OnlinePstnGatewayList sbc5.contoso.com, sbc6.contoso.com -OnlinePstnUsages "US and Canada"
Voice Routing Policy
New-CsOnlineVoiceRoutingPolicy "US Only" -OnlinePstnUsages "US and Canada“
Voice Routing Policy “US
Only”
Only for users with “Calling
Plan.” System tries call via
Microsoft Calling Plan
PSTN usage “US and
Canada”
Number Pattern:
^+1(425 | 206)(d{7})$
Priority: 1
Online Gateway List:
sbc1.contoso.com
sbc2.contoso.com
Voice Route “Redmond1”
Number Pattern:
^+1(425 | 206)(d{7})$
Priority: 2
Online Gateway List:
sbc3.contoso.com
sbc4.contoso.com
Voice Route “Redmond2”
Number Pattern:
^+1(d{10})$
Priority: 3
Online Gateway List:
sbc5.contoso.com
sbc6.contoso.com
Voice Route “Other +1”
sbc5.contoso.com
sbc6.contoso.com
sbc3.contoso.com
sbc4.contoso.com
sbc1.contoso.com
sbc2.contoso.com
Advanced voice routing configuration
51.
52. Header Original Translated Parameter and Rule Applied
RequestURI
INVITE
sip:4825@sbc.contoso.com
INVITE
sip:+12065554825@sbc.contoso.com
InboundTeamsNumberTranslationRules
‘AddE164SeattleNPANXX’
TO
TO:
<sip:4825@sbc.contoso.com>
TO:
<sip:+12065554825@sbc.contoso.com>
InboundTeamsNumberTranslationRules
‘AddE164SeattleNPANXX’
FROM
FROM:
<sip:9495552814@sbc.contoso.com>
FROM:
<sip:+19495552814@sbc.contoso.com>
InboundPSTNNumberTranslationRules
‘AddPlus1’
Name Pattern Translation
AddPlus1 ^(d{10})$ +1$1
AddE164SeattleNPANXX ^(d{4})$ +1206555$1
Phone System
Internet
Session Border Controller
Direct Routing
Bob (x2814) is making a call to Alice, using only a 4-digit extension (x4825)
Translation Rules
Created
Applied
53. Direct Routing only Microsoft Calling Plan and Direct Routing
Licenses required
Microsoft Phone System
Microsoft Teams
Audio Conferencing (for scheduled meeting dial in/out)
Microsoft Phone System
Microsoft Teams
Audio Conferencing (for scheduled meeting dial in/out)
Microsoft Calling Plan
Number provisioned In Azure Active Directory (User Online or AADSync) Acquired from Microsoft or ported to Phone System
Enable the user
Set-CsUser -Identity "Spencer Low" -OnPremLineURI
tel:+14255388797 -EnterpriseVoiceEnabled $true -
HostedVoiceMail $true
User is assigned a number through Teams Admin Center or Set-
CsOnlineVoiceUser (inbound calling is anchored on Calling Plan)
Assign Routing Grant-CsOnlineVoiceRoutingPolicy –Identity “Spencer Low” –PolicyName “US Only”
Routing behavior
Only administrator configured routes evaluated, if no routes
exist matching the callee number, the call drops
Step 1. Routes configured by administrator evaluated;
Step 2. If no routes matching the callee number exist on Step 1, route the call
via Microsoft Calling plan
INTERNET
Phone System
56. Configure the
Trusted IP
Addresses
Define network
elements
(regions, sites,
subnets)
Define the
virtual
topology
Configure the
SBCs for Local
Media
Optimization
Configure
Voice Routing
63. Certified Session Border
Controller(s)
PBX
PSTN
network
PSTN
provider
SBC logs
PSTN
provider
PBX logs
Call Quality Dashboard
Current version – https://cqd.teams.microsoft.com
Near Real Time
Contains EUII – BSSID, Call Details with User IDs and users full IP address, MAC address
Call Analytics
Provides information about call quality and reliability for individual calls
64. Overall health of the connected SBCs
https://aka.ms/dr-health
Detailed
information about
the connected SBCs
65. Symptom Common solution
Missing 200 OK for options Missing Root Certificate Chain
Firewall misconfiguration
“Fail to verify peer certificate” Missing Baltimore Root Certificate
403 Forbidden on options; “Provided trunk FQDN is not
allowed”
Contact Header not defined
Transfer fails with 603 decline from SBC Refer Support not enabled
Call connects but no audio; call disconnects shortly after NAT traversal not configured correctly for NATed IP
address
Outbound Caller ID Anonymous ForwardPAI is set to true causing all outgoing calls to be
anonymized; can be fixed with additional SBC
configuration
“404 Not Found” for incoming calls User Phone Number not configured correctly in Office
365
Outbound Calls Fail Dial Plan includes Regex for one or more rules are invalid
(even if not used for particular call)
78. Communicate early and often
Articulate the value of Teams
Accommodate a variety of learning styles
Sustain excitement and momentum
https://aka.ms/UpgradeSuccessKit
https://aka.ms/UpgradeWorkshops
79. 2016 C2R min version: 11727.20210 (1906)
MC: June 24th, 2019
SAC-T: Sept 10th, 2019
SAC: Jan 2020
2016 MSI min version: 4888.1000 [Aug 2019]
2019 C2R VL min version: 10348.20020 [July 2019]
Mac Client min version: 16.24.191 [Jan 2019]
84. • %userprofile%DownloadsMSTeams Diagnostics Log
<timestamp>.txt
callingSupportService:
Calculated isPSTNCallingAllowed with the following flags:
{"isCallingAllowed":true,"isSkypeCloud":true,"isEvEnabled
":true,"disableCallingForHybridVoice":false,"pstnType":"On
Prem","isBusinessVoicePath":false,"isByotEnabled":true,"r
esult":true}. Old state: true, Current state true
One, or both of these parameters must be true:
(isBusinessVoicePath, isByotEnabled)
92. Create the user account in on-premises Active Directory
Enable user in Skype for Business Server
Enable for Enterprise Voice in Skype for Business
Ensure user is synced to Azure Active Directory
Migrate the user to Teams (as noted earlier in this session)
93. Create the user account in on-premises Active Directory
Sync the user to Azure Active Directory
License the User
Ensure user is Teams Only (tenant mode, or user policy)
In on-premises Skype Management Shell:
Run Enable-CsUser to register the Teams user in Skype on-premises
Run Set-CsUser to enable for Enterprise Voice
Complete and verify the Direct Routing configuration
97. Ensure there are no users/apps/accounts remaining that are hosted on-premises
Remove the deployment in Topology Builder (wait for CMS replication)
• Get-CsConferenceDirectory | Remove-CsConferenceDirectory
• Publish-CsTopology –FinalizeUninstall
Remove all remaining conference directories
• Remove-CsConfigurationStoreLocation
Remove the configuration store location from AD
• Disable-CsAdDomain -Domain contoso.com
• Disable-CsAdForest -Domain contoso.com
Unprep the domain and the forest
98. Disable-CsUser removes all Skype for Business attributes from the user account
• Critical if the user was enabled for Enterprise Voice on-premises
This includes msRTCSIP-Line
• It will remove the user’s LineURI for the Direct Routing configured user
• It will also lift the restriction for being able to manage the phone number online
If this is run, and synchronized to Azure AD
• Set-CsUser <user> -OnPremLineURI tel:+19495552319
To correct this after Disable-CsUser is run, in TRPS:
• Continue to manage through on-premises using the LineURI attribute in Active Directory -> impacts use of
Disable-CsUser
• Manage through Azure AD going forward
Need to determine the path forward for number management
Slide title: Enterprise Voice for the Cloud
Slide notes:
The Microsoft Teams client is the best in-class solution for teamwork, as awarded at Enterprise Connect 2018.
Teams users can take advantage of the Office 365 Phone System, which is in the Microsoft cloud. This is the same phone system that is used by Skype for Business online. For users, that means they can make and receive calls from the Microsoft Teams client.
The benefit of using the Office 365 Phone System is that it gives the Private Branch Exchange (PBX) capabilities without the complicated and expensive equipment.
With the Phone System add-on, Microsoft Teams and Skype for Business Online can be used to complete basic tasks, such as making and receiving calls, transferring calls, and muting or unmuting calls from nearly anywhere with internet access. This add-on is available worldwide. The full feature set of the Phone System is listed at the following link: https://docs.microsoft.com/en-us/skypeforbusiness/what-is-phone-system-in-office-365/here-s-what-you-get-with-phone-system
The Phone System can be connected to a telephony network in two ways:
Obtain a Microsoft Calling Plan. This option means that Microsoft not only provides the Microsoft Phone System, but also will interconnect the system to the telephony network and will be a personal carrier. More about the Calling Plans can be found at the following link: https://docs.microsoft.com/en-us/skypeforbusiness/what-are-calling-plans-in-office-365/what-are-calling-plans-in-office-365
The second option is to interconnect a carrier/telco to the Microsoft Phone System. In this case, Microsoft will provide the Microsoft Phone System and access to the telephony network will be from a third-party carrier.
Why would customers go with Direct Routing if Microsoft Phone System + Calling Plans is the easier option? See the following slide for more information.
Slide title: Direct Routing for Teams
Slide notes:
There are two main reasons why customers would want to deploy Direct Routing instead of Calling Plans.
1. Connect the PSTN trunk – One of the reasons why customers want to use Direct Routing is that the Calling Plans are not available in all regions. The list of Calling Plans is available at the following link: https://github.com/MicrosoftDocs/OfficeDocs-SkypeForBusiness/blob/live/Skype/SfbOnline/downloads/country-and-region-availabilty/country-and-region-availability-(v-03202018)-(en-us).xlsx?raw=true
Direct Routing can provide access in most countries, except where Microsoft does not sell Office 365.
Another reason to interconnect the PSTN trunk is that customers might have an existing contract with their telco that they cannot break.
2. Interoperability with third-party systems (for example, PBXs, Call Centers) - The second reason is to provide the interoperability between existing telephony entities and Microsoft Phone System. This scenario allows customers to migrate to the cloud gradually, move users to a Microsoft Calling Plan where available, leave users requiring specific functionality, (which Microsoft does not currently support on third-party on-premises voice infrastructure (example: PBXs, Call Centers)) and configure interoperability between the systems.
There is a case when Direct Routing can co-exist with the Calling Plan, which is reviewed on the next slide.
Let’s talk about the benefits of Direct Routing!
A) Interoperability with on-prem PBXs\IP-PBXs
A customer can virtually connect any PSTN trunk with Microsoft Teams Direct Routing. This would allow a customer to continue leveraging benefits of existing design. Many customers use their on-prem PBX\IP-PBX as a backbone of the contact center infrastructure. Direct Routing allows such customers to continue using existing PBX setup as a backbone of their contact center infrastructure.
B) Interoperability with analogue devices
It helps enabling interoperability between customer-owned telephony equipment (such as 3rd party PBXs and analogue devices) and the end points registered on Microsoft Teams.
C) Seamless migration plan to the cloud
Easier to plan migration of non-Microsoft end points to Microsoft Teams. Interoperability between on-prem and Ms Teams infra gives IT admins sufficient time to plan the batches of migration. One doesn’t have to rush up migration of on-prem end points to Office 365 because of design constraint. Instead, an IT admin can plan the migration batches and run adoption program at ease while their on-prem and Ms Teams users are still able to communicate with each other without pain.
D) Leverage existing contracts with service providers
Allows a customer to use existing telephony arrangements with the service provider(s). Existing DIDs and investment could still be used under this arrangement.
E) Easier Deployment of Calling Plan
Much easier to deploy. If planned properly, it can be deployed in an hr.
F) Where Calling Plans not available
Organizations might use Direct Routing if Calling Plan isn't available in their country locations.
G) No CCE anymore!
This, itself, is a huge relief. Being able to use a standard SBC gives lot of benefits to an organization.
H) Leverage on-prem devices until end of life
Many organizations may decide to keep the end points using on-prem infra until their devices get end of life. Such migration strategy is aimed at ensuring less wastage of invested amount. This type of migration strategy could be feasible only if hybrid infra is deployed using Direct Routing.
B2BUA – Back to Back User Agent
Title: PSTN Usages
Length: 1 minute
Participant Notes:
A Public Switched Telephone Network (PSTN) usage record specifies a class of call (such as internal, local, or long distance) that can be made by various users or groups of users in an organization
By themselves, PSTN usage records do not do anything. For them to work, they must be associated with the following:
Voice policies, which are assigned to users
Routes, which are assigned to phone numbers
Slide title: Voice routing basics
Slide notes:
The goal of the slide to show a high-level picture of Voice routing.
A user in Germany makes a call to a US number +1 (800) 642-7676. It is assumed that user is voice enabled.
Check if a Voice Routing Policy exists. If a Voice Routing Policy does not exist:
Check if the user has a Microsoft Calling Plan. If there is no path to send the call, the call will fail.
If the Calling Plan is assigned to the user, check whether it is domestic or international.
If the Calling Plan is domestic, the call will fail (German user places the call to the US number).
If the Calling Plan is international, send the call via the Microsoft Calling Plan.
2. If the Voice Routing Policy exists, check whether there is a route matching the dialed number. If the route does not exist:
Check if the user has a Calling Plan and repeat Step 1, a through d.
3. If the Voice Routing Policy exists, and at least one route matches the dialed number:
Try to place a call using all SBCs in the route(s).
If at least one SBC is available, make a call via Direct Routing.
If no SBCs are available, the call will fail.
Slide title: Pairing the SBC
Slide notes:
To pair an SBC:
Connect to the Skype for Business Online admin center using PowerShell.
Pair the SBC using the command: new-csonlinePSTNGateway
A PowerShell session connected to the tenant to pair the SBC to the Direct Routing interface can be used. To open a PowerShell session, follow the steps outlined in Using Windows PowerShell to manage Skype for Business Online, (https://technet.microsoft.com/library/dn362831.aspx).
To pair the SBC to the tenant, in the PowerShell session, type the following command and press Enter:
New-CsOnlinePSTNGateway -Fqdn <SBC FQDN> -SipSignallingPort <SBC SIP Port> -MaxConcurrentSessions <Max Concurrent Session which SBC capable handling> -Enabled $true
Note 1: It is highly recommended to set a limit for the SBC using information that can be found in the SBC documentation. The limit will trigger a notification if the SBC is at the capacity level.
Note 2: Only an SBC with a FQDN can be paired. In this scenario, a domain portion of the name matches one of the domains registered in the tenant, except *.onmicrosoft.com. Using *.omicrosoft.com domain names are not supported for the SBC FQDN names. For example, with two domain names, such as abc.xyz and abc.onmicrosoft.com, sbc.abc.xyz can be used as the SBC name. Trying to pair the SBC with a name sbc.xyz.abc, the system will not pair the SBC, as the domain is not owned by this tenant.
Note 3: With regard to the “Enabled” parameter:
If the SBC is in a “Disabled” state, (for example, the tenant administrator runs the command: Set-CSOnlinePSTNGateway -Fqdn sbc1.contoso.com -Enabled $false), the SBC will do the following:
If two or more SBCs exist in one route, (for example sbc1.contoso.com and scb2.contoso.com), and sbc2.contoso.com is functional, the sbc1.contoso.com will be demoted, meaning that outbound calls will not be placed to that SBC.
The incoming calls from the sbc1.contoso.com SBC will be accepted.
If all SBCs in the route are not functional or sbc1.contoso.com is the only SBC in the route, the Direct Routing service will still try to place calls to the sbc1.contoso.com because there are no alternatives.
Parameters:
FQDN: Fully Qualified Domain Name of the SBC.
SipSignallingPort: Listening port used for communicating with SIP Proxy by using the Transport Layer Security (TLS) protocol.
Enabled: Used to enable the SBC for outbound calls. Can be used to temporarily remove the SBC while it is being updated (draining).
ForwardPAI: Indicates whether the P-Asserted-Identity (PAI) header will be forwarded along with the call. The PAI header provides a way to verify the identity of the caller. The default value is False ($False).
ForwardCallHistory: Indicates whether call history information will be forwarded through the trunk. If enabled, the Office 365 PSTN Proxy sends two headers, History-info and Referred-By. The default value is False ($False).
SIPOptionsEnabled: This parameter defines whether an SBC will or will not send the SIP options. If disabled, SBC will be excluded from the Monitoring and Alerting system. Microsoft highly recommends turning on SIP options. The default value is True ($True)
MaxConcurentSessions: This parameter is used by an alerting system. When values are set, the alerting system will generate an alert to the tenant administrator if the number of concurrent sessions is 90% or higher than this value.
EnableFastFailoverTimer: When set to True, outbound calls that are not answered by the gateway within 10 seconds will be routed to the next available trunk. If there are no additional trunks, the call will automatically be dropped. In an organization with slow networks and gateway responses, that could potentially result in calls being dropped unnecessarily. The default value is True ($True).
Slide title: Simple configuration: alternate view
Slide notes:
This slide walks through the steps for configuring the simplest case: all calls from a user go to one SBC.
Create an SBC.
New-CsOnlinePSTNGateway -Fqdn sbc1.contoso.com -SipSignallingPort 5068 -Enabled $true
Next, create a PSTN Usage.
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add=“Unrestricted"}
Then, create a route, that:
Checks if the dialed number matches the number pattern. In this example any number will match (-NumberPattern “.*”).
Sends the call that matches the pattern, (in the example, any call) to sbc1.contoso.com (-OnlinePSTNGatewayList sbc1.contoso.com).
Finally, add the route to the existing PSTN Usage (-OnlinePSTNUsages “Unrestricted”).
New-CsOnlineVoiceRoute -Identity “Unrestricted" -NumberPattern “.*" -OnlinePstnGatewayList sbc1.contoso.com -Priority 1 -OnlinePstnUsages “Unrestricted“
4. Create a Voice Routing Policy “Unrestricted” and add to it the PSTN Usage “Unrestricted”.
New-CsOnlineVoiceRoutingPolicy “Unrestricted-OnlinePstnUsages “Unrestricted”
5. Grant the Voice Routing Policy to the user.
Grant-CsOnlineVoiceRoutingPolicy -Identity "Spencer Low" -PolicyName “Unrestricted"
Slide title: Advanced Configuration
Slide notes:
The Microsoft Phone System has a routing mechanism that allows a call to be sent to a specific SBC based on:
Called number pattern
Called number pattern + Specific User who makes the call
SBCs can be designated as active and backup. That means when the SBC that is configured as active for this number pattern, or number pattern + specific user is not available, then the calls will be routed to a backup SBC.
Call routing is made up of the following elements:
Voice Routing Policy – container for PSTN usages that can be assigned to one or multiple users
PSTN Usages – container for Voice Routes and PSTN usages that can be shared in different Voice Routing Policies
Voice Routes – number pattern and set of Online PSTN Gateways to use for calls where the calling number matches the pattern
Online PSTN Gateway – pointer at SBC and also stores the configuration that is applied when a call is placed via the SBC. For example, forward P-Asserted-Identity (PAI) or History-Info; can be added to Voice Routes.
Creating a voice routing policy with one PSTN usage
The following scenario will be configured in this example:
If a user makes a call to +1 425 XXX XX XX or +1 206 XXX XX XX, the call is first routed to sbc1.contoso.com or sbc2.contoso.com. If neither SBC is available, the route with lower priority will be tried, (sbc3.contoso.com and sbc4.contoso.com). If none of the SBCs above are available, the call will be routed via sbc5.contoso.com and sbc6.contoso.com. The calls to any other US numbers, for example to number +1906 XXX XX XX, are routed via sbc5.contoso.com and sbc6.contoso.com. Because the user also has a Microsoft Calling Plan, assigned calls to non-us destinations will be routed via the Microsoft Calling Plan.
Step-by-step instructions:
The SBC needs to be paired with the first two commands:
New-CsOnlinePSTNGateway -Fqdn sbc1.contoso.com -SipSignallingPort 5068 -Enabled $true
New-CsOnlinePSTNGateway -Fqdn sbc2.contoso.com -SipSignallingPort 5068 -Enabled $true
The commands create two PSTN gateways, sbc1.contoso.com and sbc2.contoso.com.
Create the PSTN usage. The usage is a container for future voice routes. The usages can be reused for several users. To create a usage, run the command:
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="US and Canada"}
(The empty usage called “US and Canada” is created as the result of running this command).
Create a voice route, and add it to the PSTN usage “US and Canada.” To create the route and add it to the PSTN usage, follow these instructions:
Route for +1425 and +1206 (Priority 1):
New-CsOnlineVoiceRoute -Identity "Redmond 1" -NumberPattern "^\+1(425|206)(\d{7})$" -OnlinePstnGatewayList sbc1.contoso.com, sbc2.contoso.com -Priority 1 -OnlinePstnUsages "US and Canada
The Route only will be applied to the numbers matching either +1425 XXX XX XX or +1206 XXX XX XX. Note the route has priority 1.
In the next step, two more SBCs will be created, sbc2.contoso.com and sbc3.contoso.com. These SBCs will be used to route calls to the same number, (+1425 XXX XX XX and +1206 XXX XX XX) but with lower priority (backup SBCs).
To create the SBCs, type the following commands:
New-CsOnlinePSTNGateway -Fqdn sbc3.contoso.com -SipSignallingPort 5068 -Enabled $true
New-CsOnlinePSTNGateway -Fqdn sbc4.contoso.com -SipSignallingPort 5068 -Enabled $true
The next step is to add the SBCs to a new route:
Route for +1 425 and +1 206 (Priority 2):
New-CsOnlineVoiceRoute -Identity "Redmond 2" -NumberPattern "^\+1(425|206)
(\d{7})$" -OnlinePstnGatewayList sbc3.contoso.com, sbc4.contoso.com -Priority 2 -OnlinePstnUsages "US and Canada
Note: The route is added to the same PSTN usage, (US and Canada) but with the lower priority. This means that these SBCs will only be tried if both sbc1.contoso.com and sbc2.contoso.com failed.
If a user places a call to any other number, for example +1906 XXX XX XX, the call will not go via any pair to the Direct Routing SBC. The regular expression to match the dialed phone numbers are configured only for numbers +1425 XXX XX XX or +1206 XXX XX XX. In these next steps, two more SBCs will be added, sbc5.contoso.com and sbc6.contoso.com, and will be configured to route calls going to any US or Canadian number.
Two commands to pair the SBCs:
New-CsOnlinePSTNGateway -Fqdn sbc5.contoso.com -SipSignallingPort 5068 -Enabled $true
New-CsOnlinePSTNGateway -Fqdn sbc6.contoso.com -SipSignallingPort 5068 -Enabled $true
Next, create a voice route that matches the pattern +1 XXX XXX XX XX.
New-CsOnlineVoiceRoute -Identity "Other +1" -NumberPattern "^\+1(\d{10})$“
OnlinePstnGatewayList sbc5.contoso.com, sbc6.contoso.com -OnlinePstnUsages "US and Canada“
The route is added to the same PSTN usage “US and Canada” with the priority 3. If a call goes to the number starting from +1 XXX XXX XX XX, (except +1425 XXX XX XX or +1206 XXX XX XX) the first two routes fail to match and the route created on this step will be used.
Now routes created are added to the PSTN usage, but the PSTN usage cannot be assigned to the users directly. The object that can be assigned to the users is Voice Routing Policy, which might contain several PSTN usages. In this example, create a new Voice Routing Policy, add the PSTN usage created on the previous steps, and grant the Voice Routing Policy to a user.
New-CsOnlineVoiceRoutingPolicy "US Only" -OnlinePstnUsages "US and Canada“
Grant-CsOnlineVoiceRoutingPolicy -Identity "Spencer Low" -PolicyName "US Only”
The configuration is complete. In this example, a step-by-step process is used to configure the user. The user can make calls to numbers matching the pattern +1 XXX XX XX. If the number matches +1 425 XXX XX XX or +1 206 XXX XX XX, the call is routed to sbc1.contosocom and sbc2.contoso.com. If these two SBCs are not available, the call goes to sbc3.contoso.com and sbc4.contoso.com. All other calls to +1 XXX XXX XX XX go to sbc5.contoso.com and sbc6.contoso.com.
If a user makes a call to a phone number that is not in the US or Canada, (not starting with +1) there is no route and the call drops. The administrator can create additional routes for calls to another destination.
Direct Routing can co-exist with Calling Plans. One more option is if the user is configured like the example, assign the Microsoft Calling Plan, (the phone number must be ported to Microsoft or a new number can be acquired). The Calling Plan applies last, and in the example, can be used for calls not starting with +1.
Slide title: User provisioning
Slide notes:
The following steps are used to enable users for the Direct Routing Service.
Create a user in Office 365 and assign a Phone System license.
Ensure a user is homed in Skype for Business Online.
Provision a user.
1. Create a user in Office 365 and assign the license
There are two options for creating a new user in Office 365. However, it is recommended that an organization selects and uses one option to avoid routing issues:
Create the user in on-premises Active Directory and sync the user to the cloud, (https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect).
Create the user directly in the Office 365 Administrator Portal, (https://support.office.com/en-us/article/Add-users-individually-or-in-bulk-to-Office-365-Admin-Help-1970f7d6-03b5-442f-b385-5880b9c256ec).
Building a system that co-exists with Skype for Business 2015 or Lync 2010/2013 on-premises, the only supported option is to create use in on-premises Active Directory and sync the user to the cloud (Option 1).
Required licenses:
Office 365 Enterprise E3 (including SfB Plan2, Exchange Plan 2, and Teams) + Phone System
Office 365 Enterprise E5 (including SfB Plan2, Exchange Plan 2, Teams, and Phone System)
Optional licenses:
Calling Plan
Audio Conferencing
Note that without a Microsoft Audio Conferencing license, it is not possible to provide users with a dial-in number to join a scheduled conference or dial-out from the scheduled conference.
2. Ensure that the user is homed in Skype for Business Online
Direct Routing requires the user to be homed in Skype for Business Online. To check this, look at the RegistrarPool parameter. It needs to have a value in the infra.lync.com domain.
Connect to remote PowerShell.
Issue this command: Get-CsOnlineUser -Identity "<User name>" | fl RegistrarPool
3a. Provision a user (Direct Routing only)
Users managed in on-premises Active Directory (recommended):
Assign a license
Microsoft Phone System
Microsoft Teams
Assign a phone number on-premises and synchronize to the Azure Active Directory
Enable Enterprise Voice and voicemail (unless user was EV enabled on-premises), using this command: Set-CsUser -Identity "<User name>" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true
Users managed in Azure Active Directory:
Assign a license
Microsoft Phone System
Microsoft Teams
Assign phone number, enable Enterprise Voice and voicemail: Set-CsUser -Identity "<User name>" -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:+ phone number
3b. Provision a user (Mixed Microsoft Calling Plan and Direct Routing):
Create a user object directly in Azure Active Directory or synchronize from the on-premises Active Directory.
Assign a license
Microsoft Phone System
Microsoft Teams
Microsoft Calling Plan
Acquire a new number from Microsoft or port the existing number to the Phone System.
Assign the phone number.
CQD Helpdesk Report.pbix
Integrating building and EUII data, this report is designed to let you drill up from a single user to find the upstream root cause of poor call quality for that user (for example, the user is in a building that’s experiencing network problems).
CQD Location Enhanced Report.pbix
Re-imagining CQD SPD location reports. Includes 9 reports, providing Call Quality, Building WiFi, Reliability, and Rate My Call (RMC) information with additional drill-thrus by Building or by User.
CQD Mobile Device Report.pbix
Provides insights specifically tuned towards mobile device users, including Call Quality, Reliability, and Rate My Call. View mobile network, WiFi network, and mobile operating system reports (Android, iOS).
CQD PSTN Direct Routing Report.pbix
Provides insights specific for PSTN calls that go through Direct Routing.
CQD Summary Report.pbix
Better visualizations, improved presentation, increased information density, and rolling dates. These reports make it easier to identifier outliers. Drill into call quality by location with an easy-to-use interactive map. 9 new reports:
Quality Overall
Reliability Overall
RMC (Rate My Call) Overall
Conference Quality
P2P Quality
Conference Reliability
P2P Reliability
Conference RMC
P2P RMC
CQD User Feedback (Rate My Call) Report.pbix
Shows Rate My Call data in a way that you can easily use to help support calling for your organization. Cross reference with verbatims to identify end user education opportunities.
Weblogs only capture around last 2 minutes so the ideal capture should be instantly following the reproduction of the issue raised.
Note to show the dial pad a user must have valid PSTN call route, which requires either VoicePolicy = BusinessVoice, (isBusinessVoicePath: True) – this is Calling Plans, or a VoicePolicy = HybridVoice plus Online Voice Routing Policy assigned (isBusinessVoicePath: False plus isBoytEnabled: True). In summary one, or both of these parameters must be true: (isBusinessVoicePath, isByotEnabled)
B2BUA – Back to Back User Agent
C:\Program Files\Skype for Business Server 2015\Deployment\Bootstrapper.exe /scorch