SOLVED Fax email routing based on DID not working (IncrediblePi 3.11.12)

PatPend

New Member
Joined
Jan 15, 2016
Messages
29
Reaction score
3
I've set up an IncrediblePi 3.11.12 B+ box with multiple GV accounts. For each GV DID, I want to use FaxDispatch to deliver faxes as pdfs to an email address determined by the called number. Multiple searches all say that $(EXTEN) in the iaxmodem dial plan (forgive me if my terminology is off) should make the DID come into FaxDispatch as $CALLID4, but I've been going in circles for the last day and a half with no luck.

I have inbound routes for each GV DID number that go to custom destination "Fax" and faxes are being received and emailed - but they all drop down to the catchall case and go to [email protected]. In the email template $CALLID4 shows up blank, so it's not getting populated. I've tried every variable I could come up with, but I cannot seem to populate $CALLID4 with the DID number. Is there anything obvious that I'm missing?

This is /var/spool/hylafax/etc/FaxDispatch:

[email protected]
TEMPLATE=en/hylafax-html
FILETYPE=pdf
case "$CALLID4" in
631nnnnnnn)
SENDTO="[email protected]"
TOADDR="[email protected]"
;;
347nnnnnnn)
SENDTO="[email protected]"
TOADDR="[email protected]"
;;
*)
SENDTO="[email protected]"
TOADDR="[email protected]"
;;
esac


This is the relevant portion AFAIK of /etc/asterisk/extensions_custom.conf (unchanged from install):

[custom-fax-iaxmodem]
exten => s,1,Dial(IAX2/iax-fax0/${EXTEN})
exten => s,n,Dial(IAX2/iax-fax1/${EXTEN})
exten => s,n,Dial(IAX2/iax-fax2/${EXTEN})
exten => s,n,Dial(IAX2/iax-fax3/${EXTEN})
exten => s,n,Busy
exten => s,n,Hangup


I'll post other conf/log files if needed, just not sure which ones.

thanks,
Russ
 
Last edited:

PatPend

New Member
Joined
Jan 15, 2016
Messages
29
Reaction score
3
Ok, finally got it working. Note these instructions are for the older IncrediblePi 3.11.12 distro for Raspberry Pi B+, but I had a B+ laying around and hate to let good hardware go to waste. Here is the secret sauce:

In /etc/asterisk/extensions_custom.conf change ${EXTEN} to ${FROM_DID} as follows:
[custom-fax-iaxmodem]
exten => s,1,Dial(IAX2/iax-fax0/${FROM_DID})
exten => s,n,Dial(IAX2/iax-fax1/${FROM_DID})
exten => s,n,Dial(IAX2/iax-fax2/${FROM_DID})
exten => s,n,Dial(IAX2/iax-fax3/${FROM_DID})
exten => s,n,Busy
exten => s,n,Hangup

Make sure /etc/hylafax/config.ttyIAX0 1, 2, 3 includes these lines:
ModemResetCmds: AT+VCID=1
CallIDPattern: "NMBR="
CallIDPattern: "NAME="
CallIDPattern: "ANID="
CallIDPattern: "NDID="
# Uncomment these if you really want them, but you probably don't.
#CallIDPattern: "DATE="
#CallIDPattern: "TIME="

In /etc/asterisk/iax_custom.conf add the following line for each modem:
sendani=yes

Notes:
The example /var/spool/hylafax/etc/FaxDispatch listed above is correct.

It's always helpful to have good logs when you're trying to figure stuff out. The iaxmodem logs on this distro go to /var/log/daemon.log rather than /var/log/messages. The default logging was pretty sparse, so to enable more detailed logging I did the following:

In /etc/iaxmodem/ttyIAX0 1, 2, 3 add the line: iax2debug

In /etc/hylafax/config.ttyIAX0 1, 2, 3 add these lines:
ServerTracing: 0xFFF
SessionTracing: 0xFFF

N.b. in the IncrediblePi 3.11.12 distro for Raspberry Pi B+ /etc/hylafax and /var/spool/hylafax/etc are hard linked which initially led (me at least) to some confusion.

Thanks to Ward and the gang for putting together an amazing product!!
 

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top