I was recently engaged to configure a fax-to-email solution using a Cisco AS5300 and Asterisk. My original idea was to compile spandsp into Asterisk and use the RxFax() application to receive faxes. Everything seemed to work OK on the Asterisk side, but I had a lot of trouble with incoming faxes as they passed through the Cisco AS5300. The issue was also confounded by the fact that the AS5300 was in production and couldn't afford to be broken.
So I decided to try a different angle all together: T.37 Store and Forward Faxing.
The concept is pretty simple, really. The fax comes into the Cisco AS5300 where it's converted into a TIF file and emailed to the proper recipient. What could be easier? Well, lots of things, but you get the idea.
I'm going to break down the various parts of my configuration for you, and at the end I'll provide a link to a full-length uninterrupted configuration.
fax interface-type fax-mail
This is the most important command in the whole set up. Without this, the Cisco AS5300 will not try to recognize the incoming faxes and pass them along properly. Unfortunately, this command requires a reboot, so be prepared.
fax receive called-subscriber $d$
This simply tells the AS5300 to present itself as the dialed number when receiving a fax.
mta send server mail.example.com port 25 mta send subject Incoming Fax Received mta send postmaster firstname.lastname@example.org mta send mail-from hostname example.com mta send mail-from username $s$
First of all, I've obviously changed the domain name to protect all parties involved. I was disappointed that I couldn't use macros like
$s$ in the
mta send subject command. As far as I can tell, all emails will be sent with the same subject.
$s$ expands to the calling number received from the PSTN.