The Structure and Technology Behind T.38 Fax Over IP

 In Troubleshooting and Performance Monitoring
Reading Time: 4 minutes

There are still many businesses, enterprises and government organizations which use Fax for their official activities. So, it makes sense for these organizations using VoIP to move their fax traffic onto the IP network as well. They can then converge their fax and voice communications into one network. This will enable lower operating costs, simplified infrastructure deployment, and eliminate costly analog lines.

foip

Fax Over IP (FoIP) sends/receives fax through the IP network rather than through traditional phone lines and utilizes SIP, i.e., the same protocol used for setting up VoIP calls. The popular options for transmitting fax in a VoIP network are using either T.38 fax relay or using G.711 audio codecs as a fall back in case T.38 is not supported by some network elements along the call path. T.38 devices use standard call setup protocols to negotiate the T.38 call, e.g., H.323, SIP and MGCP.

In legacy systems fax transmission use T.30 fax protocol. However, in VoIP networks, T.38 protocol, an ITU-T recommendation for fax data to be carried over IP networks is used. T.38 media is preferred for fax, as opposed to normal voice codecs. Voice codecs are good for sending voice-based audio but are unreliable when it comes to transmitting fax.

T.38 sessions are described using the “image/t38” within the SDP part of the SIP message [ click here to learn more about Session Description Protocol (SDP) https://teraquant.com/understand-media-sip-session-description-protocol/ ]. T.38 fax/IP is detailed in RFC 3362. The SDP negotiation for SIP signaling for T.38 is nearly identical to a VoIP call with the exception of the listed Fax image media with media type formerly known as MIME. Data is transmitted directly using T.38 without being converted into audio streams. This saves the amount of bandwidth needed. Since audio streams are transmitted using RTP over UDP, there is a possibility of significant loss of packets (based on underlying network, traffic etc.), which might still be OK for audio (as you would prefer audio being sent immediately without delay rather than send all audio packets with significant delay) but not for images being sent for Fax. T.38 where reassembly of the image occurs after a significant part of the transmission. So, T.38 also supports data and control redundancy to mitigate the effects of packet loss.

The originating or terminating side could have analog fax machines which are connected to the VoIP network using adapters/gateway for SIP signaling and to convert the T.30 protocol to T.38. The modes of negotiating T.38 using offer/answer model within the network can be categorized into the following:

faxoverip-1
faxoverip-2
faxoverip-3

In most of the Operator networks, Fax communications in SIP are handled in a “voice first” manner, i.e., fax calls are always considered voice calls until after they are connected. Indications that a user desires to use a fax transport protocol, such as T.38, to send a fax are not known when the initial INVITE message is sent. The call is set up as a voice call first, and then, only after it is connected, does a switchover to the T.38 protocol occur. This could cause a problem in case fax calls are routed to SIP user agents that are not fax capable.

To resolve this issue of calls not arriving at a UA that supports fax, RFC6913 defines a new media feature tag specific to fax. Caller preferences, as defined in RFC 3841 can be used for registering UAs that support fax and for routing fax calls to these UAs. For example:

REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/UDP bob-TP.example.com:5060;branch=z9hG4bK309475a2
From: <sip:bob-tp@example.com>;tag=a6c85cf
To: <sip:bob-tp@pexample.com>
Call-ID: a84b4c76e66710
Max-Forwards: 70
CSeq: 116 REGISTER
Contact: <sip:bob-tp@pc33.example.com;transport=udp>;+sip.fax=”t38″
Expires: 3600

Callers desiring to express a preference for fax will include the “sip.fax” media feature tag in the Accept-Contact header of their INVITE as shown below:

INVITE sip:bob@biloxi.example.com SIP/2.0
Via: SIP/2.0/UDP client.atlanta.example.com:5060;branch=z9hG4bK74b43
Max-Forwards: 70
From: Alice <sip:alice@atlanta.example.com>;tag=9fxced76sl
To: Bob <sip:bob@biloxi.example.com>
Accept-Contact: *;+sip.fax=”t38″
Call-ID: 3848276298220188511@atlanta.example.com
CSeq: 1 INVITE
Contact: <sip:alice@client.atlanta.example.com;transport=udp>
Content-Type: application/sdp
Content-Length: 151

The T.38 recommendation defines the use of both TCP and UDP to transport T.38 packets. However, implementations mostly use UDP, due to TCP’s requirement for acknowledgement of packets and resulting re-transmission during packet loss, which introduces delays. More particularly, Fax transmissions use UDPTL (layer utilizing UDP) which makes use of redundancy and Forward Error Correction techniques for error correction as per ITU-T T.38 recommendation. UDPTL is preferred instead of RTP as UDPTL packet only requires 2 bytes per header, while RTP requires 12 bytes for its basic header.

A few issues that you can run into while faxing are listed below:

  • Some VoIP networks might not have the capability to handle fax and may optimize the G.711 stream for voice using silence suppression, echo cancellation, or trans-coding to a different codec for higher compression. Such optimizations can cause a loss of data and prevent Fax interoperability over VoIP networks.
  • The modem specifications for fax widely use either V.17 or V.34 standards. These were developed pre-Fax over IP times, and so have certain limitations for handling impairments within VoIP networks. Error Correction Mode (ECM) is a traditional fax check-sum method applied to blocks of fax data. V.34 supports and requires the use of ECM, however within V.17 ECM is optional and configurable to be On or Off. However, since many fax devices do not support it, missing data will be omitted from the received fax image, causing degradation in image quality. support within gateways for fax parameters, such as V.34 higher transmission speed and ECM is a major industry deficiency.
  • Owing to the mix of packet-based and circuit-switched connections within the operator network, T.38 often has a trans-coding overhead which normally adds latency and cost to fax services. T.38 renegotiates after a normal fax handshake which can make the call setup a little longer. Also, since it has a maximum speed of 14.4 Kbps using V.17 and 33.6 kbps using V.34, this makes it slower than the speed using G.711 codec.

T.38 is the preferred way to send faxes over VoIP networks, however there are a few caveats to be kept in mind and appropriate configurations needed in the network to ensure best results from your faxing.

If you would like help troubleshooting T.38 fax/IP or to know more about the subjects in this article, please get in touch as below.

For more information, view the OCOM information on:
SIP Monitoring in Real-Time