This article describes how to use Asterisk to monitor incoming (or outgoing) calls for fax tones (traditional fax tones, not T.38), and then react to those tones. Using Asterisk this way enables users to use their phone number as their personal fax number. This is a useful feature, especially if you have some form of automated fax server (or fax to e-mail server). It is intended for configurations where incoming calls pass through Asterisk before reaching Microsoft Office Communications Server, (essentially using Asterisk as a gateway).
Author: Paul Adams
Publication date: June 2010
Product version: Microsoft Office Communications Server 2007 R2, Asterisk 1.6
During a Communications Server 2007 R2 implementation, I used Asterisk 1.6 as a gateway for Communications Server to the outside world. This means that all incoming calls passed through Asterisk before reaching Communications Server.
I’d read that Asterisk could detect incoming fax tones (regular fax tones, not T.38) and redirect the call. I thought that if I could use Asterisk to detect the fax tones, I could then pass the call to a fax machine or fax server. When implementing this, I discovered that you can also pass extra information (in the form of DTMF tones) to indicate who the fax is intended for.
In my network, my users were already using a fax server (Hylafax, a Linux based fax solution). It sends and receives faxes by using four modems. When the fax server receives a fax, it converts the fax to a PDF, and then sends it as an attachment in an e-mail. The address the fax is sent to is based on which modem it arrived in on. For example, a fax arrives on line 1, and is then sent to email@example.com, or a fax arrives on line 2, and is then sent to firstname.lastname@example.org. I configured modem 4 to send faxes out, and that left three modems for incoming fax lines, and, therefore, a three fax number limit.
Asterisk can pass dual-tone multifrequency (DTMF) codes out to fax machines or other devices. I learned that some fax machines or fax servers can process faxes by using the “extra” DTMF digits sent to them. I also learned that most modern large-scale photocopier, printer, and fax devices can be programmed in this way. In addition, a large number of those devices can receive a fax, convert it to a picture file or PDF, attach it to an e-mail, and send it (and many devices come with free desktop fax sending software).
The point being that you may not need to invest in a separate fax server to get the benefits from this solution. You can even just redirect to a regular fax machine and that still allows your users to use their direct number as their fax number.
In this article, I explain how to configure Asterisk to detect fax tones, and then pass some sort of identification to the fax server so the fax can be routed correctly. I have assumed that the reader has some experience with Linux and Asterisk administration.
We Want to Hear From You