Skype for Business and Sonus – Part 3 – Configuring Skype for Business

In Part 2 we discussed and walked through how to configure the Sonus SBC system settings including networking, security and other system dependencies. In this article we will be configuring Skype for Business to use the Sonus SBC as an appropriate gateway to the PSTN for Enterprise Voice. To begin with we will be making the connection using unencrypted TCP connections to make it simple. TLS trunk configuration will come in a later article that will cover some common advanced configurations and settings.

As part of this article we will setup the gateway and trunk inside Skype for Business, create a simple dial plan and voice policy and assign a user a DDI so that we can test inbound and outbound calling later on. Please excuse the briefness of some topics as this article assumes a level of competency with Skype for Business.

Firstly, please make sure that you have a DNS record configured for your Sonus SBC in your internal DNS zone. This record is a simple “A” or pointer record to the SBC IP. Alternatively, an IP address of the SBC can be used instead of the FQDN for TCP connectivity.


Enabling TCP Mode

By default, Skype for Business wants to communicate with PSTN gateways over TLS using TCP port 5067. To allow unencrypted communication follow the below steps:

  1. Download the current topology using topology builder
  2. Expand the mediation pool and right click and edit properties
  3. Check the box to enable TCP port. The default port used is 5068. This can be changed if necessary, but we are leaving it as the default

Adding the Sonus SBC to the Topology

In order to make Skype for Business aware of the Sonus SBC, we need to add it to the topology.

  1. In topology builder, Expand Shared Components and PSTN Gateways, right click and add a new PSTN gateway

  2. Enter the FQDN of the SBC (or IP Address). This will be the DNS FQDN you provisioned before you began, press next
  3. Leave the define an IP address page as default, unless you want the mediation server to talk to the SBC using a defined IP address (if multi-homed), and press next
  4. Edit the listening port of the SBC from 5066 to 5068 (good habit to match the ports) and change the protocol from TLS to TCP on the root trunk configuration screen, press finish
  5. Finally, publish the topology, Action > Topology > Publish

Enterprise Voice 101

Before we start talking about dial plans, normalization rules, PSTN usages etc., I thought it would be a good place to just spend five minutes explaining how Skype for Business routes a call inbound and outbound to a user. The Voice routing section in the control panel can be quite confusing. However, the basic flow description is:

  1. Dial Plan – This defines the valid number strings that a user can dial. There is a global dial plan which should be configured, and the option of creating per site, or per user dial plans. Dial Plans contain normalization rules which are important to any enterprise voice deployment
  2. Normalization Rules – These are regex patterns that match a user inputted number string. These are necessary to convert a user vanity number into a valid E.164 number e.g. +441270892000 instead of 01270892000. The reason for this conformity is to ensure called numbers can be interpreted across multiple PSTN gateways to ensure the correct destination is dialled. Simply passing user inputted number strings introduce a level of uncertainty and make troubleshooting harder.
  3. Voice Policy – This can be either global, per site or per user. The Voice Policy dictates the level of access to the PSTN a user is permitted, along with voice features, such as call park, simultaneous ring etc. The restriction on dialled numbers is governed by the PSTN Usage Policies assigned to the voice policy.
  4. PSTN Usage Policy – The PSTN usage policy dictates which voice route a user can use to make a call based on a particular number string dialled. Each PSTN usage policy is matched to a voice route.
  5. Voice Route – The voice route is used to match a dialled number to a valid gateway to the PSTN. This might be the same gateway as all the other routes, or may be different especially for multi-national companies with gateways around the world taking benefit of least cost routing (where legal of course). The voice route looks at the start of the dialled number and if a match is found, the call is processed through this route.

Therefore, the voice logic and flow can be drawn out like so:

If the number dialled by the user cannot be normalized, or a voice route is not configured to allow the normalized pattern, the call will not be able to processed to the gateway.

Creating Normalization Rules

Now we need to create a normalization rule or two in order to convert number strings into E.164 standardized numbers. If you want to learn about normalization rules, I blogged about this a while ago and I suggest you read if you’re not up to speed in this area yet.

  1. Open the Skype for Business Control Panel, and browse to Voice Routing > Dial Plan page
  2. Edit the Global dial plan
  3. Scroll down to normalization rules and click new

  4. In the first part of the normalization rule, enter a name e.g. UK national numbers, a starting digit, followed by the minimum, or exact length the string should be. For instance 10 for the UK. Then enter the number of digits to remove. This will remove digits from the left, or start of the string e.g. 0 (zero) we want to remove that and then replace with E.164 standard
  5. Next we want to declare the digits to add in replacement of the removal e.g. +44
  6. Now we can test the rule by inputting the expected end user string e.g. 01270892000, and as we can see we get a match
  7. Press OK to add the normalization rule to the dial plan. Please note, changes will not come into effect until the dial plan has been committed.
  8. Repeat the process for other number strings. The above is a simple example, don’t forget the UK Emergency Services!
  9. When complete commit the changes on the dial plan

A note to bear in mind. The normalization rules are processed top to bottom. If a number string matches a pattern expression in rule 1, it does not look any further and will not match against subsequent rules.

Creating Voice Policy, PSTN Usage and Route

Next we need to create a voice policy. Typically, you would create various depending on the level of access you want to grant users. For instance, the global voice policy should only contain the least amount of privileges e.g. Emergency number dialling (E911). User Policies should then be created for various steps e.g. Internal Only, National, International, Premium etc. The UI is not intuitive here, to create the PSTN usage you must create via a Voice Policy. A Voice Route can only be created if there is a PSTN usage. Therefore, all these are usually created during the voice policy configuration.

  1. From the Voice Routing page, click voice policy and select new user policy
  2. Give the policy a name e.g. UK National. This policy will allow calls to UK numbers and Emergency services
  3. Enable / disable the calling features as required
  4. Scroll down to PSTN usages and click new
  5. Give the PSTN usage a name e.g. UK National. Then click new under voice routes

  6. Give the voice route a name e.g. UK National and add the starting digits the normalized number must have to use this route and press add
  7. Scroll down to associated trunks and click on add, select the Sonus SBC
  8. Press OK to return to the PSTN Usages screen. Press OK again to return to the voice policy screen. Press OK again on the voice route screen, then commit the change
  9. Repeat for any other policies, or add more PSTN usages, routes etc. until your policy is configured as you want.

Modifying Trunk Configuration

Now we have the route and policies defined, we need to make some changes to the trunk configuration to support TCP and unencrypted media.

  1. Select Trunk Configuration from the Voice Routing page. Change the encryption support level to Not Supported
     image
  2. Leave all other settings as they are.
  3. Press OK and then commit the change
  4. Restart the mediation service to bring this change into immediate effect, or if not possible due to use, wait approximately 5 minutes for the next mediation configuration refresh.

Note, you can apply different trunk configurations to different PSTN usages if you require. I.e you can allow TCP connections to other internal legacy PBXs systems, but enforce encryption to the SBC.

Assigning a DDI

The last item we need to perform on Skype for Business is to assign a DDI to a user.

  1. Open users page and click find, select your user
  2. Edit the user properties and change their telephony type to enterprise voice. Assign them a Line URI in the format of tel:<E1.64 number> e.g. tel:+441270892000. If you want to include extension dialling append the following ;ext=<extension> e.g. tel:+441270892000;ext=2000. Finally, select the required voice policy and press OK to commit the change.

We now have a very basic configuration within Skype for Business that will allow for a user to make and receive a call to the UK PSTN, subject to Sonus configuration (of course). In Part 4 we will discuss and walkthrough how to create the SIP trunk to Skype for Business, setup call routing tables and establish a phone call.

Part 4  >> – Connecting it all together

3 thoughts on “Skype for Business and Sonus – Part 3 – Configuring Skype for Business

  1. Great articles Mark, thanks very much.

    One question – I notice you mentioned being able to use Media Bypass on the first part but have left it unchecked here in Part 3. Is it something you’d recommend setting if the SBC has a port on the LAN or does it rely on e.g. the SIP provider supporting it?

    Like

    1. Hi Mike Mark (apologies I am speaking to a Mike right now!)

      Thanks for the feedback, appreciated!

      Media bypass is something that depends on the environment. I called it out, just to show that it is possible, rather than advising it to be the recommended approach. Enabling media bypass is something you can do in some circumstances. The internal endpoints must all be able to reach the SBC without having to go via any proxy servers including the Edge server in an ideal world. And in doing so will lighten the load placed on the mediation server. However, the most important thing to note about using media bypass is that the endpoint must support the supported codecs on the SBC i.e. G.711a/u G.722 and G.729. 99.999% of devices will. The other thing to consider is while the Skype client will prefer to use SILK it will negotiate G.711 in SDP. If you can neg the codec between the internal trunk and the trunk to your ITSP to be the same e.g. G.711 then the Sonus SBC will not need to perform any transcoding and therefore will be able to handle a higher call volume. If you have desk phones then these will prefer RTAudio if LPE or G.722 and then G.729 before G.711 for 3PIP, so to get this to match you may need to alter the codec preference.

      If in doubt, always go via the Skype mediation server😉

      Hope this helps

      mark

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s