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:
- Download the current topology using topology builder
- Expand the mediation pool and right click and edit properties
- 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.
- In topology builder, Expand Shared Components and PSTN Gateways, right click and add a new PSTN gateway
- Enter the FQDN of the SBC (or IP Address). This will be the DNS FQDN you provisioned before you began, press next
- 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
- 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
- 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:
- 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
- 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.
- 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.
- 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.
- 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.
- Open the Skype for Business Control Panel, and browse to Voice Routing > Dial Plan page
- Edit the Global dial plan
- Scroll down to normalization rules and click new
- 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
- Next we want to declare the digits to add in replacement of the removal e.g. +44
- 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
- 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.
- Repeat the process for other number strings. The above is a simple example, don’t forget the UK Emergency Services!
- 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.
- From the Voice Routing page, click voice policy and select new user policy
- Give the policy a name e.g. UK National. This policy will allow calls to UK numbers and Emergency services
- Enable / disable the calling features as required
- Scroll down to PSTN usages and click new
- Give the PSTN usage a name e.g. UK National. Then click new under voice routes
- 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
- Scroll down to associated trunks and click on add, select the Sonus SBC
- 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
- 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.
- Select Trunk Configuration from the Voice Routing page. Change the encryption support level to Not Supported
- Leave all other settings as they are.
- Press OK and then commit the change
- 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.
- Open users page and click find, select your user
- 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