Despite being an older technology, fax remains genuinely required in some industries (legal, healthcare, certain government processes) — T.38 enables reliable fax transmission over IP networks. This guide covers setting this up.
Why Fax Over Regular VoIP Codecs Doesn't Work Well
Standard voice codecs (designed for human speech) don't reliably transmit fax tones, which require precise timing and frequency handling that voice-optimized compression disrupts — T.38 is a dedicated protocol specifically designed for reliable fax transmission over IP networks.
Verifying T.38 Support in Your Asterisk Build
asterisk -rx "module show like fax"
Confirm your Asterisk installation includes fax-related modules (res_fax, and a fax technology backend) — not always included in every build/distribution by default.
Configuring T.38 in PJSIP
[fax-endpoint]
type=endpoint
fax_detect=yes
t38_udptl=yes
t38_udptl_ec=fec
Enables T.38 negotiation for this endpoint — when a fax tone is detected, Asterisk attempts to renegotiate the call to use T.38 rather than continuing with regular voice codec handling.
Configuring Your SIP Trunk Provider for T.38
Verify your SIP trunk provider (see How to Set Up SIP Trunking for Your PBX) supports and is configured for T.38 passthrough — not all providers support this equally well; some require specific configuration or have known compatibility limitations worth checking directly with your specific provider.
Setting Up Fax-to-Email (Receiving)
exten => 5000,1,ReceiveFAX(/tmp/incoming-fax-${UNIQUEID}.tiff)
same => n,System(echo "Fax received" | mail -s "New Fax" -a /tmp/incoming-fax-${UNIQUEID}.tiff [email protected])
A common modern use case: receiving faxes and automatically emailing them as an attachment, rather than requiring a genuine physical fax machine for reception.
Setting Up Fax Sending
exten => _9X.,1,SendFAX(/path/to/document.tiff)
Programmatically send a fax by dialing out with the SendFAX application, referencing a TIFF-format document to transmit.
Converting Documents to Fax-Compatible Format
convert document.pdf -resize 1728x2200 fax-ready.tiff
Fax transmission typically requires TIFF format at specific resolution — convert from common formats (PDF) before sending, since Asterisk's fax applications expect this specific format.
Testing Fax Reliability
Fax over IP, even with T.38, can have reliability quirks depending on your specific provider and network path — test thoroughly with your actual expected fax volume/patterns before relying on it for genuinely important fax communications.
Considering a Dedicated Fax-to-Email Service (Alternative)
If T.38 reliability proves genuinely problematic for your specific setup, dedicated fax-to-email services exist as an alternative to self-hosted fax handling — worth considering if self-hosted fax reliability doesn't meet your genuine business needs.
Common Errors
Fax transmission fails or produces garbled output — verify T.38 is genuinely being negotiated (not silently falling back to regular voice codec handling, which fax tones don't survive well); check Asterisk logs specifically for T.38 negotiation messages during a test fax call.
Continue Reading
- How to Set Up SIP Trunking for Your PBX
- How to Install Asterisk PBX on a VPS
- How to Configure Extensions and Voicemail in Asterisk
Browse more articles in VoIP & Communication Servers.