Pair the SBC to Direct Routing Service

The following are the three high-level steps to let you connect, or pair, the SBC to the Direct Routing interface:

  • Connect to Skype for Business Online admin center using PowerShell
  • Pair the SBC
  • Validate the pairing

Connect to Skype for Business Online by using PowerShell

You can use a PowerShell session connected to the tenant to pair the SBC to the Direct Routing interface. To open a PowerShell session, please follow the steps outlined in Set up your computer for Windows PowerShell.

After you establish a remote PowerShell session, please validate that you can see the commands to manage the SBC. To validate the commands, type or copy/paste in the following in the PowerShell session and press Enter:

gcm *onlinePSTNGateway*

Your command will return the four functions shown here that will let you manage the SBCs.

CommandType    Name                       Version    Source

———–    —-                       ——-    ——

Function       Get-CsOnlinePSTNGateway    1.0        tmp_v5fiu1no.wxt

Function       New-CsOnlinePSTNGateway    1.0        tmp_v5fiu1no.wxt

Function       Remove-CsOnlinePSTNGateway 1.0        tmp_v5fiu1no.wxt

Function       Set-CsOnlinePSTNGateway    1.0        tmp_v5fiu1no.wxt

Pair the SBC to the tenant

To pair the SBC to the tenant, in the PowerShell session type the following and press Enter:

New-CsOnlinePSTNGateway -Fqdn <SBC FQDN> -SipSignallingPort <SBC SIP Port> -MaxConcurrentSessions <Max Concurrent Sessions the SBC can handle> -Enabled $true

Note

  1. We highly recommend setting a limit for the SBC, using information that can be found in the SBC documentation. The limit will trigger a notification if SBC is at the capacity level.
  2. You can only pair the SBC with FQDN, where the domain portion of the name matches one of the domains registered in your tenant, except *.onmicrosoft.com. Using *.omicrosoft.com domain names is not supported for the SBC FQDN names. For example, if you have two domain names:

    abc.xyz
    abc.onmicrosoft.com

    For the SBC name, you can use the name sbc.abc.xyz. If you try to pair the SBC with a name sbc.xyz.abc, the system will not let you, as the domain is not owned by this tenant.

New-CsOnlinePSTNGateway -Identity sbc.contoso.com -Enabled $true -SipSignallingPort 5067 -MaxConcurrentSessions 100

Returns:

Identity              : sbc.contoso.com

Fqdn                  : sbc.contoso.com

SipSignallingPort     : 5067

FailoverTimeSeconds   : 10

ForwardCallHistory    : False

ForwardPai            : False

SendSipOptions        : True

MaxConcurrentSessions : 100

Enabled               : True  

There are additional options that can be set during the pairing. In the previous example, however, only the minimum required parameters are shown.

The following table lists the additional parameters that you can use in setting parameters for New-CsOnlinePstnGateway.

Required?

Name

Description

Default

Possible values

Type and restrictions

Yes

FQDN

The FQDN name of the SBC

None

NoneFQDN name, limit 63 characters

String, list of allowed and disallowed characters on Naming conventions in Active Directory for computers, domains, sites, and OUs

No

MediaBypass

The parameter reserved for future use. Parameter indicated of the SBC supports Media Bypass and the administrator wants to use it.

None

True
False

Boolean

Yes

SipSignallingPort

Listening port used for communicating with Direct Routing services by using the Transport Layer Security (TLS) protocol.

None

Any port

0 to 65535

No

FailoverTimeSeconds

When set to 10 (default value), outbound calls that are not answered by the gateway within 10 seconds are routed to the next available trunk; if there are no additional trunks, then the call is automatically dropped. In an organization with slow networks and gateway responses, that could potentially result in calls being dropped unnecessarily. The default value is 10.

10

Number

Int

No

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).

False

True
False

Boolean

No

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).

False

True
False

Boolean

No

SendSIPOptions

Defines if an SBC will or will not send the SIP options. If disabled, the SBC will be excluded from Monitoring and Alerting system. We highly recommend that you enable SIP options. Default value is True.

True

True
False

Boolean

No

MaxConcurrentSessions

Used by alerting system. When any value is set, the alerting system will generate an alert to the tenant administrator when the number of concurrent session is 90% or higher than this value. If parameter is not set, the alerts are not generated. However, the monitoring system will report number of concurrent session every 24 hours.

Null

Null
1 to 100,000

 

No

Enabled*

Used to enable this SBC for outbound calls. Can be used to temporarily remove the SBC, while it is being updated or during maintenance.

False

True
False

Boolean

Verify the SBC pairing

Verify the connection:

  • Check if the SBC is on the list of paired SBCs.
  • Validate SIP Options.

Validate if SBC is on the list of paired SBCs

After you pair the SBC, validate that the SBC is present in the list of paired SBCs by running the following command in a remote PowerShell session: Get-CSOnlinePSTNGateway

The paired gateway should appear in the list as shown in the example below, and verify that the parameter Enabled displays the value True. Enter:

Get-CsOnlinePSTNGateway -Identity sbc.contoso.com 

Which returns:

Identity              : sbc.contoso.com 

Fqdn                  : sbc.contoso.com

SipSignallingPort     : 5067

CodecPriority         : SILKWB,SILKNB,PCMU,PCMA

ExcludedCodecs        : 

FailoverTimeSeconds   : 10

ForwardCallHistory    : False

ForwardPai            : False

SendSipOptions        : True

MaxConcurrentSessions : 100

Enabled               : True

Validate SIP Options flow

To validate the pairing using outgoing SIP Options, use the SBC management interface and see that the SBC get 200 OK responses to the outgoing OPTIONS.

When Direct Routing sees incoming OPTIONS, it will start sending outgoing options to the SBC FQDN configured in the Contact header field in the incoming OPTIONS message.

To validate the pairing using incoming SIP Options, use the SBC management interface and see that the SBC gets reply on the OPTIONS messages coming in from Direct Routing and that the response code is 200 OK.

Enable users for Direct Routing Service

When you are ready to enable users for the Direct Routing Service, follow these steps:

  1. Create a user in Office 365 and assign a phone system license.
  2. Ensure that the user is homed in Skype for Business Online.
  3. Configure the phone number and enable enterprise voice and voicemail.
  4. Configure voice routing. The route is automatically validated.

Create a user in Office 365 and assign the license

There are two options for creating a new user in Office 365. However, we recommend that your organization select and use one option to avoid routing issues:

If you build the system that co-exists with Skype for Business 2015 or Lync 2010/2013 on-premises, the only supported option is to create the user in on-premises Active Directory and sync the user to the cloud (Option 1).

Required licenses:

  • Office 365 Enterprise E3 (including SfB Plan2, Exchange Plan2, and Teams) + Phone System
  • Office 365 Enterprise E5 (including SfB Plan2, Exchange Plan2, Teams, and Phone System)

Optional licenses:

  • Calling Plan
  • Audio Conferencing

Ensure that the user is homed in Skype for Business Online

Direct Routing requires the user to be homed in Skype for Business Online. You can check this by looking at the RegistrarPool parameter. It needs to have a value in the infra.lync.com domain.

  1. Connect to remote PowerShell.
  2. Issue the command:

Get-CsOnlineUser -Identity “<User name>” | fl RegistrarPool

Configure the phone number and enable enterprise voice and voicemail

After you have created the user and assigned a license, the next step is to configure their phone number and voicemail. This can be done in one step.

To add the phone number and enable for voicemail:

  1. Connect to a remote PowerShell session.
  2. Enter the command:

Set-CsUser -Identity “<User name>” -EnterpriseVoiceEnabled $true -HostedVoiceMail $true -OnPremLineURI tel:+ phone number

For example, to add a phone number for user “Spencer Low,” you would enter the following:

Set-CsUser – “Spencer Low” -OnPremLineURI tel:+14255388797 -EnterpriseVoiceEnabled $true -HostedVoiceMail $true

The phone number used has to be configured as a full E.164 phone number with country code.