Lync vs Fax vs G.711

I was faced with the task of integrating fax machines into an Enterprise Voice deployment using an AudioCodes MP118.

Analogue phones were configured and tested successfully without any trouble. I’ve always made the recommendation that where fax is concerned, keep it as far away from Lync as possible, such as on an upstream gateway etc.

With the equipment that was available, there were 3 options open to us…


First Scenario – A Fax is a Fax, right?

The powershell cmdlet  New-CsAnalogDevice has a parameter called -AnalogFax that expects to be set to either a true or false… so, with little deliberation I went with $true  and learnt something interesting.

In my opinion, the available documentation on the  -AnalogFax parameter isn’t great. This is my attempt at explaining it..

An analogue fax, according to Lync, is the same as a normal analogue device insofar as SIP signalling, the rather large exception is how the media is handled. For example if Lync receives a call for a DDI assigned to a fax machine the media is directed from the source directly to the fax (i.e. media bypass is required). It gets more intriguing with outbound faxing, the  SIP INVITE is generated from the gateway to Lync, and then rather then carrying on it’s journey, the call is hair-pinned back to the gateway, this is because Lync shares my recommendation from above, and tries to keep faxes as far away as possible, so it palms off the call back to the analogue gateway.

The only supported scenario to integrate fax machines with Lync is really only designed for CDR purposes, and Lync expects the fax machine to be connected to what is sometimes called an ‘enhanced media gateway’ which should also have it’s own PSTN connection.

And here’s how it should work…

Fax Diagrams - AnalogFax

Unfortunately the upstream SBC didn’t have any FXS ports on it, so it wasn’t possible to hook up the fax machines to the SBC, and the AudioCodes MP118 didn’t have any FXO ports so it wasn’t possible (nor desirable) to connect the AudioCodes to spare analogue telephone lines. (although the AudioCodes MP1xx series is available in different configurations of FSX and or FXO ports).

This was the result, the  -AnalogFax $true parameter makes Lync send the  SIP INVITE back to the originating gateway, and doesn’t look at any of the configured routes that a normal analogue phone call would take.

Fax Diagrams - AnalogFax 404

Second Scenario – A Fax is an Analogue Device, right?

It’s at this point I answered a question I’d had for quite a while… Can Lync actually send/receive faxes using G.711 as a transport protocol.. the answer is… Yes!… well, not really, but ‘sort of’…. During testing there were successful faxes sent and received. Although the more we tested, the more failures that occurred – the success rate was about 20%. The rest either showed up as “No Fax Detected” on the receiving end, or a diagnostic page showing “Error in T.30 Protocol”.

Now, I know that faxes CAN be transmitted using G.711, but Lync doesn’t seem to be able to do so reliably. To my untrained ear, a fax configured as a normal analogue device through Lync, suffered from Automatic Gain Control (AGC) at least (and possibly AEC, or other audio filtering), the initial handshaking screech had a ‘soft’ start, quickly fading in, compared to the harsh start hearing it over a real analogue line. (brought back memories of copying Spectrum games, and my first dial-up modem).


Third Scenario

The solution that worked the best giving 100% success rate sending and receiving faxes (and we tested thoroughly), was to configure the AudioCodes MP118 with two trunks, so the physical ports that with the DDIs of fax machines were configured to use a SIP Trunk directly to the SBC, whilst leaving analogue phones using the SIP Trunk to Lync.

I would have liked to change it from G.711 to T.38 as both the SBC and the MP118 both supported that protocol, but time was against us, and using G.711 worked 100%.

The only downside to this is the lack of logging for fax calls, but that was considered to be acceptable.

And since I’ve still got Visio open, here’s another diagram to finish this off.

Fax Diagrams - via SBC

Tweet about this on TwitterShare on LinkedInShare on Facebook
Pin on PinterestShare on Google+Digg thisShare on RedditShare on StumbleUponEmail this to someone

About Graham Cropley

Working as a Senior Consultant for Skype for Business, Exchange, and Office 365.

One Comment

  1. “we tested thoroughly” <- indeed, a ream of paper and the fax numbers of all machines embedded in my memory says it was a damn thorough test!!

Leave a Reply

Your email address will not be published. Required fields are marked *