Media, Codecs & Audio QualitySingle-TestGeneric SIP ยท N/A

Configuring and Troubleshooting T.38 Real-Time Fax Relay over SIP

Problem

T.38 fax transmissions fail during initial SIP re-INVITE negotiation or experience mid-call packet loss resulting in aborted pages (DCN / Disconnect commands) due to misconfigured T.38 gateway attributes, inadequate jitter buffers, or uncoordinated G.711 fallback.

Illustration for Configuring and Troubleshooting T.38 Real-Time Fax Relay over SIP

Symptoms

  • Fax calls disconnect abruptly after 10-15 seconds with SIP 488 Not Acceptable Here during re-INVITE
  • Partial fax pages delivered with heavy image corruption or missing scanlines
  • Fax machine reports communication errors such as EGAL01, DCN, or T.30 response timeout
  • Wireshark traces show T.38 UDPTL packets arriving out of order without redundant error correction enabled

Root cause

T.38 fax failures stem from improper SDP negotiation during the G.711 to T.38 re-INVITE transition, network packet loss affecting un-redundant UDPTL payloads, or firewall/NAT devices blocking dynamic T.38 UDP media ports negotiated in the image/t38 SDP attributes.

Resolution steps

  1. step #1

    Verify carrier and SBC support for T.38 SDP re-INVITE negotiation by capturing SIP signaling during fax setup.

    bash
    tshark -r fax_call.pcap -Y "sip.Method == INVITE || sip.Status-Code == 488" -T fields -e frame.time -e sip.Method -e sip.Status-Code -e sdp.media
  2. step #2

    Enable T.38 Gateway or Passthrough mode on the Session Border Controller and configure UDPTL redundancy parameters.

    text
    [t38-profile]
    t38-pt-maxrate = 14400
    t38-pt-redundancy = 2
    t38-pt-keepalive = true
  3. step #3

    Configure PBX UDPTL settings for redundant error correction to withstand network packet loss without needing FEC overhead.

    ini
    ; /etc/asterisk/udptl.conf
    [general]
    udptlstart=40000
    udptlend=49999
    udptlfecentries=0
    udptlredundancy=2
    udptlchecksums=yes
  4. step #4

    Ensure network firewalls and ALG allow dynamic UDP port ranges allocated for UDPTL image media traffic.

    bash
    iptables -A INPUT -p udp --dport 40000:49999 -j ACCEPT
  5. step #5

    Cap maximum fax transmission speed to 14,400 bps (V.17) and adjust T.30 modem parameters to ensure compatibility with legacy endpoints.

    text
    FAXOPT(maxrate)=14400
    FAXOPT(minrate)=2400
    FAXOPT(ecm)=yes
  6. step #6

    Inspect captured T.38 traffic to verify packet flow and T.30 control frame sequence (DIS, DCS, TCF, CFR, CFR to DCN).

    bash
    tshark -r fax_call.pcap -Y "t38" -V | head -n 30

Verification evidence

SIP PCAP captured via tshark shows a successful re-INVITE exchange containing 'm=image <port> udptl t38' with 'a=T38FaxUdpEC:t38UDPRedundancy', followed by bidirectional UDPTL packet flow without ICMP destination unreachable messages or missing sequence numbers.