Asterisk + HylaFax

I’ve inherited an Asterisk based PBX using HylaxFax. The server recently crashed (motherboard failure) and all hardware was transplanted into a new chassis. Post-transplant has left the FaxDispatch in a state to where it appears to not be applied.

I am by no means a HylaxFax admin, nor Asterisk admin (I wouldn’t even call myself a Linux admin honestly) but it’s what is in place and what I have to work with. I’ll do my best to completely explain my setup and issue but I apologize if I miss something along the way.

Currently, Asterisk is configured with 8 IAX modems and can accept incoming faxes without issue if sent to the DID #, if sent to the toll free number attached to the DID, it has issues, but that’s not for this crowd. Anyways, the fax gets stored in the /tmp directory and I am able to copy it out to a desktop and view the file as a tiff document. The issue is the FaxDispatch is telling it to use FILETYPE=pdf but that doesn’t happen. The SENDTO=myname@mydomain.com does not happen either. The setup uses a postfix relay to send to MS Exchange server and has worked for years without issue.

FaxDispatch (old version from when it was working, names and numbers have been changed to protect the innocent) – (No clue why this worked, but it did, and converted things to PDF as well…)
case “$CALLID4” in
1111111111)
SENDTO="1@mydomain.com";
;;
2222222222)
SENDTO="2@mydomain.com";
;;
esac

FaxDispatch (my attempt to resolve issues)
FILETYPE=pdf;
SENDTO=me@mydomain.com;
MIMENCODE=bin/uuencode_it;

extensions.conf (Asterisk)
;*** Fax modems
exten => 900,1,Dial(IAX2/iaxmodem7/${DID},10,r)
exten => 900,n,Dial(IAX2/iaxmodem6/${DID},10,r)
exten => 900,n,Dial(IAX2/iaxmodem5/${DID},10,r)
exten => 900,n,Dial(IAX2/iaxmodem4/${DID},10,r)
exten => 900,n,Dial(IAX2/iaxmodem3/${DID},10,r)
exten => 900,n,Dial(IAX2/iaxmodem2/${DID},10,r)
exten => 900,n,Dial(IAX2/iaxmodem1/${DID},10,r)
exten => 900,n,Dial(IAX2/iaxmodem0/${DID},10,r)
exten => 900,n,Goto(900,1)

[faxin]
exten => faxin,1,NoOp("**** RECEIVING FAX ****")
exten => faxin,n,Set(TempFax=/tmp/inbound-fax-${CDR(uniqueid)}.tiff)
exten => faxin,n,ReceiveFax(${TempFax})
exten => faxin,n,Hangup()

exten => h,1,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten => h,n,NoOp(FAXOPT(filename) : ${FAXOPT(filename)})
exten => h,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten => h,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten => h,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten => h,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten => h,n,NoOp(FAXOPT(pages) : ${FAXOPT(pages)})
exten => h,n,NoOp(FAXOPT(rate) : ${FAXOPT(rate)})
exten => h,n,NoOp(FAXOPT(remotestationid) : ${FAXOPT(remotestationid)})
exten => h,n,NoOp(FAXOPT(resolution) : ${FAXOPT(resolution)})
exten => h,n,NoOp(FAXOPT(status) : ${FAXOPT(status)})
exten => h,n,NoOp(FAXOPT(statusstr) : ${FAXOPT(statusstr)})
exten => h,n,NoOp(FAXOPT(error) : ${FAXOPT(error)})
exten => h,n,NoOp(DNIS: ${RECEIVER})

IAXModem
device /dev/ttyIAX0
owner uucp:uucp
mode 660
port 4570
refresh 60
server 127.0.0.1
peername iaxmodem0
secret iaxmodem0
cidname IAX Modem 0
cidnumber 1111111111
codec slinear

faxrcvd(excerpts)
ENCODING=base64
TIFF2PDF=bin/tiff2pdf
TTYCMD=tty

. etc/setup.cache

INFO=$SBIN/faxinfo
FAX2PS=$TIFFBIN/fax2ps
TIFF2PS=tiff2ps
TOADDR=FaxMaster
FROMADDR=FaxMaster
TIFFINFO=tiffinfo
NOTIFY_FAXMASTER=always

FILETYPE=pdf
SENDTO=

if [ -f etc/FaxDispatch ]; then
. etc/FaxDispatch # NB: FaxDispatch sets SENDTO
fi

Any ideas on what the issue could be? No messages in /var/log/mail.log after fax has been received however a sendmail will deliver and attach a message to the log file.

Joshua Link
IT Manager