Skype for Business and Sonus – Part 4 – Connecting it all together

In Part 3 of this series, we configured Skype for Business for enterprise voice and added the Sonus SBC to the topology as an available PSTN gateway. In this article we will discuss and walkthrough how to accept telephone calls from Skype for Business and route to the PSTN and vice versa.

Before we begin with the walkthrough guides, let’s take a moment to discuss how the SBC will handle this. As we go through this guide you will hear words like Signalling Group (SG), Transformation Table, Call Route, Media List, SIP Server table etc. Don’t be alarmed by the time this is over, you will be comfortable with these terms and what they mean and their role in the successful call flow. To begin with I will show you the call setup (signalling) workflow through the SBC from Skype for Business to the PSTN.

So with this diagram we can easily understand how the call is accepted and processed to the correct destination.

The signalling group accepts incoming SIP requests from a trusted (or federated) peer or peers, i.e. Skype for Business Mediation server(s). It also contains the outbound route the call should take. Additionally, the SG contains a SIP server table that is used for calls being sent to the SG by the route table. The servers listed in this SIP server table will be the destination endpoints the SBC will offload the call to. The SG also contains other settings such as a media list. The media list defines what audio codecs can be used to establish media e.g. G.711a/u, whether the SBC has to traverse NAT (like SIP ALG on firewalls) and a bunch of other settings that you may or may not need beyond the default values.

The route table contains the destination signalling groups that should be used for when a number is matched. The matching of numbers is performed by the transformation table.

The transformation table uses similar regex pattern matching (although it is not .NET regex) to match called numbers to a pattern. If the string is matched to a pattern the route is attempted. If the destination rejects the call, the next route that matches the pattern is used, until one destination accepts, or the call is terminated if no destinations accept the call.

Now that we have a basic understanding of how to configure the SBC, let’s begin.

Configuring the SBC

First we need to create a SIP profile to use for the Skype for Business trunk. No changes need to be made to this profile, but it is a bad habit to use any default tables / rules / profiles etc, as it does not provide flexibility at scale. Using the same settings for more than one trunk could lead to issues if you have to make a change to a shared config for one particular trunk, you could potentially break some or all of the others sharing this config. So don’t do it from the outset and you will be fine.

  1. In the Settings tab > SIP > SIP Profiles, click the + icon to add a sip profile
  2. Enter a name for the SIP Profile e.g. Skype SIP Profile. Leave all the other settings as the default values and press OK
  3. Next we need to create a Media List. This media list will contain all the supported audio codecs that can be used between the SBC and Skype for Business. Click on Settings tab > Media > Media List and press the + Icon to create a new one
  4. Provide a name for the Media list e.g. Skype Media List. Add the required codec in e.g. G.711a (for UK, u for everywhere else, you can add other codecs by creating Media Profiles and choosing the codec for you). Disable tone detection for Fax and Modem and press OK
  5. Next, click on the settings tab > SIP > SIP Server Table and press the + icon to add a new table
  6. Enter a name for the table e.g. Skype Mediation Servers and press OK
  7. Click on the new server table from the navigation tree. Click on Create SIP Server and select IP-FQDN

  8. Enter the hostname of the Skype Mediation Server, the port it is listening on e.g. 5068, protocol which is TCP and finally enable SIP Options which is used to determine if the server is online and accepting connections, press OK
  9. Next click on the settings tab > Signalling Groups and click on Create Signalling Group, choose SIP Signalling Group
  10. When creating the SG, we will complete 50% of the configuration. We will need to come back in here later to finish it off. But for now, enter a name e.g. Skype Signalling Group. Change the admin state to disabled, ensure that the correct SIP Server table is assigned e.g. Skype Mediation Servers. Select the Skype Media list we created and enable Early 183 (early media i.e. ring before setup)
    Scroll down to the bottom of the page. Under Message Ports, select both the defaults and remove them
    Add a new port, as we configured port 5068 TCP in the Skype for Business topology as the listening port of the SBC, this is what we should enter here instead

    Next add a new federated FQDN or IP. This will be the Skype Mediation Servers. This is a list of sources to accept connections from

    So the bottom half of the SG configuration page should look similar to this

    If it does, press OK

  11. Next, in the settings tab > Transformation press the + icon to add a new transformation table. Call this Calls to Skype Transformation Table
  12. Select the transformation table from the navigation tree and press the + icon to create a new rule
  13. Call the rule PSTN to Skype. This will be the transformation rule used to turn standard number strings into E.164 numbers. In the input field enter 0(.*) which translates to numbers starting with a 0 followed by anything after this. In the Output field enter +44\1 +44 is the UK country code, and \1 is referencing the number block located in the brackets. If you had more than one pair of brackets and wanted to reference the second pair, you would enter +44\2 etc. As this number will be coming from your service provider, it should be normalized and vetted to E.164 anyway, but just in case your service provider doesn’t supply E.164 this rule should be there.
  14. Create another rule called Passthrough. This rule is simply going to allow the number to be presented to Skype for Business without normalization. This is for numbers that we are assuming are already E.164 numbers. If they are not, then the Skype for Business normalization rules in the global dial plan will be used to determine proper normalization. If this fails, the call is rejected from Skype for Business not the SBC. The Input field should be (.*) and the output field should reference \1 for called address/number, like below:
  15. Next it would seem logical to create a route. In the Settings tab > Call Routing Table click the + icon to create a new route table
  16. Name the Table Calls From PSTN to Skype and now select this table from the navigation tree and press the + icon to add a route
  17. In the first part of the route description, provide a name for the route e.g. Calls from PSTN to Skype. Select the transformation table Calls to Skype Transformation Table and select the Skype Signalling Group as the destination
  18. Select the Skype Media list to use and press OK

RECAP

So we have made lots of changes here, let’s recap for a minute to explain what we have done before we continue.

  • We created a SIP Profile for Skype for Business trunk to use
  • We created a media list that defined the audio codecs that can be used for media to Skype for Business
  • We created a SIP Server table that included the Skype Mediation Servers as possible endpoints to use for calls
  • We created a Signalling Group that listened for TCP connections from Skype for Business on port 5068 TCP
  • We created a transformation table that would be used to normalize numbers being sent to Skype for Business
  • We created a normalization rule that transformed numbers coming from the PSTN to Skype for Business into E.164 numbers, or passed them through untouched
  • We created a calling route from the PSTN to Skype for Business as the destination

If you are following this correctly, you should realise now, that we need to create the same for connection to the service provider in order to finally tie this together at the end. As it stands, the SBC could be listening for calls from Skype for Business, but has nowhere to route them to. Similarly, we have a route to Skype for Business from the PSTN, but the SBC is not listening for calls from the PSTN because we have not configured access to the service provider.

So, let’s configure this!

  1. Create another SIP Profile, call this “Service Provider” SIP Profile e.g. Tailspin Telecom SIP Profile
  2. Next, create a media list, call this “Service Provide” Media List e.g. Tailspin Telecom Media List, and add the required codecs in
  3. Create a SIP Server Table called “Service Provide” SIP Service e.g. Tailspin Telecom SIP Service
  4. Add the Service Provider Signalling endpoints to this table (you will need this information from your service provider). Assuming Port 5060 TCP for the below example
  5. Create a Signalling Group called “Service Provider” Signalling Group e.g. Tailspin Telecom Signalling Group, changed the admin state to disabled. Change the SIP Server Table to “Service Provider” Server Table, enable Early 183 and choose the “Service Provider” Media list

    At the bottom of the configuration page, edit the listen ports to the port and protocol you have agreed with your service provider e.g. 5060 UDP

    Edit the federated FQDN/IP and include the service provider signalling endpoint IP address

  6. Create a transformation table called “Service Provider” transformation table e.g. Tailspin Telecom Transformation table
  7. Add a transformation rule to the table. This should be a pass-through without touching the numbers as they should be in E.164 format from Skype for Business anyway. However, of your service provider does not allow E.164 and want the number presented in normal format you can remove the +44 by changing the input field for called number to \+44(.*) and the output field to 0\1. For this example we are assuming the service provider accepts E.164
  8. Now create a Call routing table called Calls from Skype to PSTN

  9. Add a route to this table called Calls to the PSTN, select the service provider transformation table and signalling group, add the service provider media list to the route
  10. Now go back to the Skype Signalling Group. Change the admin state to enabled and the call routing table to Calls from Skype to PSTN, and scroll down and apply the settings.
  11. The Skype Signalling Group should now be up and running
  12. Edit the service provide signalling group. Change the admin state to enabled and the call routing table to Calls from PSTN to Skype and apply the settings
  13. The Service provider signalling group should now be up and running as well
  14. Looking at the active monitor we can see all channels are up

Testing a call from the PSTN should now ring the Skype for Business / Lync client

Similarly, you should now be able to call a number on the PSTN from your Skype for Business / Lync client

This completes the simple walk through guide on how to use a Sonus SBC with Skype for Business. In Part 5 we will discuss how to encrypt your media and signalling to Skype for Business

Part 5 >> Adding Encryption

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