Normalization and Translation with Gateways and SfB

Skype for Business has a number of areas where you can normalize or translate a number. When we’re dealing with users, normalization is the process of taking the number that they’ve entered or “dialed”, and converting it to a standard format for further processing. This normalization allows the user to maintain local dialing habits, and convert them to a standard format. That standard format is E164, which also ensures the number is globally unique. When we’re dealing with calls received from the telco or PBX, normalization refers to the process of converting the called number into E164 standard format.

Normalization is a form of translation, but not all translation is normalization. When we’re sending a call out of SfB, we might need to translate to a format that’s expected by the device we are sending the call to. That format might not be standard or globally unique. This translation can take place on both the called and calling numbers. This translations is configured in Trunk Translation Rules.

Trunk Translation rules can only match and translate same field. For example, SfB cannot match on Calling Number and translate the Called Number. However you can match and modify a called number and match and modify the calling number, on the same call.

Outside of SfB, number translation can happen

  • At a PSTN gateway or SBC
  • At an analog gateway
  • At a PBX
  • At the telco (few and far between, but some do!)

The options you have within these systems will vary. Generally speaking, the gateways and SBCs are very flexible, PBXs somewhat flexible, and telcos are something that you shouldn’t count on.

Depending on what are we’re talking about, there are a number of overlapping options available, so which ones should you use?

In general, you’ll want to avoid a smattering of different translations. Where ever possible, keep all of your translations in one system. Which system? Usually SfB, because most organizations have more people that understand SfB more thoroughly than gateways. For example, when you’re sending a call to +14258675309, the telco probably wants you to send only 4258675309 to them. You could strip the +1 within SfB before you had the call to the gateway, or you could strip it at the gateway before you hand it to the telco. SfB is my preferred option here.

Sometimes, your hand will be forces. Let’s say you want all calling numbers (your caller ID) to be changed when you call to a certain area code. You need to match on the called number, but change the calling number. SfB doesn’t handle complex translations like this, so you’ll have to use a gateway.

When you’re considering analog devices dialing through SfB, you can perform normalization in the gateway or in SfB.¬† If you use a dialplan within SfB, you can take advantage of the “select” feature to select normalization rules that already exist in SfB. Generally, you would want to use the same rules that are in the Dialplan that apply to the local users.

There’s some confusion over how to assign a Skype for Business Dial Plan to an analog device. Technet¬†states “you can then manage the analog device by assigning policies and dial plans to the contact.” It turns out that you can’t apply a dial plan to a CsAnalogDevice. Well, you can apply it, it just won’t work.

When you look at how user level dial plans work, this makes sense. User dial plans are applied at the device level: your SfB client on your PC, your mobile client, or your AudioCodes 440HD phone – any SfB client. An analog phone isn’t an SfB client, nor is the gateway that it plugs into, so there is no place for the normalization rules to be downloaded to and applied. Instead, you need to use a pool level, site level, or global dial plan. These dial plans will apply at the server level for inbound calls, but will also be used for users if a user level dial plan doesn’t exist.

For gateways, I’ll use the Global Dial Plan in smaller environments, and Pool level Dial Plans in more complex or geographically diverse environments. The Global Dial Plan can quickly get messy if you try to stuff in enough rules to handle larger, global deployments.

FXO vs FXS in Skype for Business

Analog trunks and devices are less and less of a factor in many of the projects that I work on. Areas where I still see analog are branch office trunks, faxes, door buzzers/enterphones, paging systems, and ring-down phones that you might see in a parking lot to contact security or a cab company.

To integrate analog trunks or devices with SfB, you connect them to a gateway. The gateway can come with two types of ports: FXO, and FXS. FXO is an abbreviation for Foreign eXchange Office, and FXS for Foreign eXchange Subscriber.

So, clear as mud and we’re done here, right? If you’re an old school telecom guy, you know there’s a lot of complexity hidden behind that simple jack in the wall. The good news is for nearly all SfB use cases we can boil things down so they’re very simple.

FXO is a port that you plug a telco trunk line into. FXS is a port that you plug your phone or other device into. Mostly. Confusion pops into the picture when you have paging systems or enterphones, which may oddly use the opposite interface than you’re expecting, or give you the option for both.

You can think of FXO and FXS as North and South on a magnet, or male and female, or whatever pairing you’d like. A FXO device plugs into an FXS device, and all is well, like this:

Your phone, which has an FXO jack on it, plugs into the wall, which is an FXS interface.

Your phone, which has an FXO jack on it, plugs into the AudioCodes MP-118 gateway FXS port.

The AudioCodes MP-114 gateway FXO jack plugs into the wall, which is an FXS interface.


MP114 back

An AudioCodes MP-114 gateway. From the left are power, Ethernet, RS-232 serial console, two FXS ports and two FXO ports.

Great, so why then would a paging system offer both FXO and FXS interfaces? The answer is that there are two different use cases for the paging system.

One use case is a standalone, where a phone plugs directly into the paging system. You pick up the phone, maybe enter some digits to indicate what zone to page, and you talk away. The paging system is acting as a PBX in this scenario.

The second use case is PBX integrated, where the paging system acts as a phone. You dial the extension for the paging system, it rings and then answers, you maybe enter some digits to indicate what zone to page, and you talk away.

These two use cases also apply to things like enterphones or gate/door buzzers. You can have a phone plugged directly into the enterphone, or you have have the enterphone act as an extension on your PBX.

The standalone option is simple, but restricts you to interacting via a single phone. The PBX integrated option is more complex, but allows you to interact via any phone on the PBX.

Caution: “interact via any phone on the PBX” in the SfB world means that in a global deployment, you could have a prankster user in New York telling jokes over a paging system in Paris. Configure your dial plans appropriately if your paging system doesn’t offer PIN functionality!

If you have a choice between using an FXO port or FXS port on a gateway to integrate with an analog device that offers both, I recommend you pick the FXO port. This has the device act as a PBX, which means that there is no ringing when you call it, and call setup is faster. Disconnects are usually quicker too, which is important if the paging system or enterphone is used a lot.

When you configure the device to plug into an FXO port on the gateway, set the gateway to route calls to that number out via the FXO port you’ve connected it to. If the device will be sending calls to the gateway, set the gateway to

You’ll need to use an FXS port on your device to connect to the gateway’s FXO port. If your device has one port that’s switchable between FXO and FXS, read the manual carefully – I’ve seen some that aren’t clear whether they mean FXO mode is “setting this device to FXO” or “setting this device to talk to FXO”. If it’s really unclear, plug a boring analog phone in. If the line is dead, the device is set to act as an FXS device and the port is configured as an FXO interface.