Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering FreeSWITCH

You're reading from  Mastering FreeSWITCH

Product type Book
Published in Jul 2016
Publisher Packt
ISBN-13 9781784398880
Pages 300 pages
Edition 1st Edition
Languages
Concepts
Authors (8):
Russell Treleaven Russell Treleaven
Seven Du Seven Du
Darren Schreiber Darren Schreiber
Profile icon Darren Schreiber
Ken Rice Ken Rice
Mike Jerris Mike Jerris
Kalyani Kulkarni Kalyani Kulkarni
Florent Krieg Florent Krieg
Charles Bujold Charles Bujold
View More author details

Table of Contents (21) Chapters

Mastering FreeSWITCH
Credits
About the Authors
About the Reviewers
Contributors
www.PacktPub.com
Preface
1. Typical Voice Uses for FreeSWITCH 2. Deploying FreeSWITCH 3. ITSP and Voice Codecs Optimization 4. VoIP Security 5. Audio File and Streaming Formats, Music on Hold, Recording Calls 6. PSTN and TDM 7. WebRTC and Mod_Verto 8. Audio and Video Conferencing 9. Faxing and T38 10. Advanced IVR with Lua 11. Write Your FreeSWITCH Module in C 12. Tracing and Debugging VoIP 13. Homer, Monitoring and Troubleshooting Your Communication Platform Index

Chapter 9. Faxing and T38

Faxing is here to stay. Let's admit it: however much we VoIP practitioners hate fax, however much frustration we feel, most of us must deal with fax transmission. Fax is a way to transmit images via voice circuits that were not designed to work on packet networks, and is inherently difficult to implement reliably over VoIP.

T38 is a standard that mediates between SIP and fax to achieve a reliable transmission, trying to overcoming network induced problems. FreeSWITCH implements world-class T38 (and T30, traditional fax) support, and is widely used to serve from occasional to very high traffic fax communication.

In this chapter, we will cover:

  • How traditional fax works on PSTN

  • How fax works on VoIP

  • How to configure and operate FreeSWITCH for faxing

  • Tips, tricks, and caveats to achieve workflow integration, max success rate, and fax Nirvana

What is Fax on PSTN?


Fax is scanning an image at one end of the communication, and sending the result to the other end, where it will be transformed back into an image.

However impossible it might seem, faxing was invented and patented before voice telephony. The first commercial faxing service was introduced in 1865 between Paris and Lyon. The first desktop fax machine for end users was introduced in 1948, while the 80s saw mass market distribution of compact fax machines very similar and completely compatible with today's models.

Every office still has a fax machine, or a fax server. Modern faxing is governed by the International Telecommunication Union (ITU) standard T30, which is ubiquitous, very reliable (that is, 99% or better completion rates between fax machines connected to PSTN), and is required by law for many legal document transmissions in many countries.

How it works

On a standard PSTN-transmitting fax machine, an image is scanned, the result is converted into TIFF digital image...

What is Fax over IP?


Fax over IP (FoIP) is not the scanning of an image and transmission of the results to a remote end via the Internet. That would be e-mailing (the resulting TIFF file), or FTPing it, or sending the file via HTTP PUT. Or whatever. No, that would be very easy; the Internet was born for it, but that is not faxing.

Fax over IP is actually to interact via the Internet with a remote, regular (T30, PSTN) fax machine. The problem is, to exactly reproduce the characteristics of a PSTN electrical circuit via a packet network is almost impossible. Packets get delayed, they arrive out-of-order (for example, the third packet arrives after the fifth), they get lost (for example, the fourth and seventh packets do not arrive at all), delays are not constant as a transmission proceeds (for example, jitter), and so on. All of this is not a problem for file transfer protocols like HTTP, and is a minor nuisance for voice transmission (both software correction and the human ear are very adaptable...

Fax and FreeSWITCH


Receiving and sending a fax in FreeSWITCH is excruciatingly simple, consisting of two applications:

  • rxfax (/path/where/to/write/TIFF)

  • txfax (/path/where/to/read/TIFF)

That's it. Isn't that a beauty? Thanks to the world-class work of Steve Underwood, the recognized Godfather of Digital Signal Processing, SpanDSP library is integrated into FreeSWITCH and, amid many other goodies, provides complete T30 and T38 fax communication support.

Note

FreeSWITCH sends and receives TIFF files. You must do all the necessary conversions (to/from PDF, and so on).

All the finer details of fax communication are determined by a mod_spandsp configuration file (overridable runtime for each application invocation) and by information contained in the TIFF file itself (for example, resolution, size, color or b/w, and so on). Again, mod_spandsp configuration (overridable) determines if and how a T38 call upgrade will be attempted, and T38 terminal or gateway behavior to/from T30 and TDM (PSTN).

The mod_spandsp...

ITSPs and Real World Fax Support


T38 is your best bet for fax communication through VoIP networks. But, not every VoIP connection has been created equal, nor are all VoIP providers one and the same. Completion rate can be poor, or interoperability wobbly.

You must make careful enquiries about T38 support when shopping for an ITSP or VoIP provider. Ask around, learn which are the proven operators in your region, and do your your research.

It is not unusual for a medium company to use an ITSP specifically for faxes, while using another one for voice traffic. This setup can also double as failover; for example, if one ITSP is down, you will redirect all traffic to the other one.

Summary


In this chapter, we first had an overview of how fax works in both traditional PSTN and VoIP. Then we described a T38 protocol, which makes faxing available on packet networks.

We delved into FreeSWITCH mod_spandsp, the module in charge of faxing (and other Digital Signal Processing features). We've seen how to configure the module, and how to receive, detect, and send faxes.

We then looked at the most common fax-related processing, like conversion from and to PDF, and mail attachment. We closed the chapter with hints on how to integrate FreeSWITCH's fax capabilities with workflows and ITSPs.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Mastering FreeSWITCH
Published in: Jul 2016 Publisher: Packt ISBN-13: 9781784398880
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}