Understanding T.38 Fax Relay vs G.711 Pass-Through over SIP Trunks
Overview
This guide explores the underlying mechanics of transmitting faxes over IP networks using G.711 Pass-Through and T.38 Fax Relay. You will learn how legacy T.30 analog modem signals are handled by IP gateways, the impact of packet loss and jitter on each protocol, and how SIP SDP re-INVITEs manage fax session setup. Understanding these differences allows network engineers to design reliable FoIP solutions over modern SIP trunks.

Key takeaways
- G.711 pass-through sends raw modem audio over RTP and requires near-zero jitter, delay, or packet loss.
- T.38 fax relay demodulates T.30 analog signals into digital data packages sent via UDPTL with redundancy.
- SIP re-INVITEs dynamically transition audio channels into specialized fax sessions upon fax tone detection.
- Disabling Echo Cancellation and Silence Suppression (VAD) is critical when using G.711 pass-through.
- Carrier support for T.38 varies, making proper media gateway fallback configuration essential for reliability.
Prerequisites
- Basic understanding of SIP signaling (INVITE, SDP, re-INVITE)
- Familiarity with standard VoIP audio codecs (G.711a/u) and RTP transport
- General knowledge of analog fax machines and the T.30 protocol
Guide
- section #1
The Challenge of Analog Fax over Packet-Switched Networks Traditional facsimile transmission relies on the ITU-T T.30 protocol operating over dedicated analog PSTN circuits. T.30 uses modems (such as V.17, V.29, or V.34) to convert digital image data into audible phase and frequency-modulated signals. IP networks, however, are inherently packet-switched and subject to packet loss, variable delay (jitter), and packet reordering. Because analog fax modems depend on strict timing and phase continuity, conventional VoIP audio processing like audio compression, silence suppression, and adaptive jitter buffers can desynchronize modem states, leading to dropped calls or corrupt document transmissions.
- section #2
G.711 Pass-Through: Mechanics and Vulnerabilities G.711 Pass-Through attempts to send raw fax audio over IP using uncompressed G.711 (ulaw or alaw) PCM codecs at 64 kbps. During a pass-through session, the media gateways disable Voice Activity Detection (VAD), silence suppression, and Echo Cancellation (EC) to avoid modifying the phase of the modem tones. While simple to implement because it requires no specialized fax demodulation hardware, G.711 pass-through is extremely sensitive to network impairments. A single lost packet or jitter buffer underflow can desynchronize the T.30 modem negotiation, causing training failures (DIS/DCS phase) or image page transmission errors.
- section #3
T.38 Fax Relay: Protocol Architecture and Redundancy T.38 Fax Relay solves packet-network sensitivity by terminating the T.30 audio stream at the local media gateway or SBC. The gateway demodulates the analog modem tones back into raw T.30 HDLC control frames and digital image data. These digital payload structures, called Image Transfer Protocol (IFP) packets, are encapsulated into UDPTL (UDP Transport Layer) or TCP packets and transmitted across the IP network. At the receiving end, the remote gateway remodulates the IFP packets back into analog audio modem tones for the receiving fax device. T.38 incorporates forward error correction (FEC) or packet redundancy (sending duplicate previous frames within subsequent packets), making it resilient against moderate packet loss.
- section #4
SIP Call Setup and Media Renegotiation (Re-INVITE) Most FoIP calls originate as standard audio SIP sessions using standard G.711. When a fax machine answers or transmits CNG (Calling Tone) or CED (Called Station Identifier) tones, the local media gateway detects the fax tone and triggers a SIP re-INVITE or UPDATE to transition the media session. In a T.38 scenario, the re-INVITE offers an SDP media line changing 'm=audio' to 'm=image <port> udptl t38'. If the remote carrier supports T.38, it responds with a 200 OK accepting the image stream, and audio RTP stops while UDPTL media begins. If T.38 is rejected, the gateway typically falls back to G.711 pass-through by renegotiating SDP attributes to disable echo cancellation and VAD.
v=0 o=FreeSWITCH 171829 171830 IN IP4 192.168.1.50 s=FreeSWITCH c=IN IP4 192.168.1.50 t=0 0 m=image 28442 udptl t38 a=T38FaxVersion:0 a=T38MaxBitRate:14400 a=T38FaxRateManagement:transferredTCF a=T38FaxUdpEC:t38UDPRedundancy - section #5
Comparing Key Attributes: T.38 vs G.711 Pass-Through When choosing between T.38 Relay and G.711 Pass-Through, network conditions and carrier infrastructure dictate the best strategy. T.38 offers high tolerance to packet loss (up to 10-20% depending on redundancy settings) and lower bandwidth requirements because modem audio is converted to pure data. G.711 pass-through requires minimal gateway processing power and zero T.38 protocol support from intermediate SBCs, but demands a pristine network with near 0% packet loss and less than 20ms of jitter. For high-volume enterprise environments, T.38 is the preferred standard, whereas G.711 pass-through serves as a useful backup mechanism.
- section #6
Best Practices for Deploying FoIP over SIP Trunks To achieve optimal fax success rates over SIP trunks, configure gateways to support T.38 as the primary method with G.711 pass-through fallback. Set T.38 UDPTL redundancy levels to at least 2 or 3 frames to recover from bursty packet loss. Ensure that all intermediate SBCs allow media type 'image' and pass UDPTL ports through firewall rules. For G.711 fallback pathways, explicitly configure the gateway to turn off echo cancellation (G.168) and silence suppression (VAD) upon CNG/CED detection, and lock the maximum fax speed (baud rate) to 9600 bps if ECM (Error Correction Mode) is disabled or network conditions are unstable.
# Typical FreeSWITCH / Gateway T.38 Configuration Parameters t38_passthru=true fax_enable_t38=true fax_enable_t38_request=true t38_option_redundancy=2 modem_max_rate=9600
Further reading
- RFC 3362 - Real-time Facsimile (T.38) - image/t38 MIME Subtype Registration
- ITU-T Recommendation T.38: Procedures for real-time Group 3 facsimile communication over IP networks
- ITU-T Recommendation T.30: Procedures for document facsimile transmission in the general switched telephone network