Fax to email not working

I have tried to get fax to email working. Running FreePBX Version 1.818.210.62-1 with a digium TE420 and PRI’s. Here is the log from the CLI. Not sure where it is failing. It looks like it does create the tif file. Any help would be appreciated.

xxxxxxxxx-- Accepting call from ‘xxxxxxxxx’ to ‘4080’ on channel 2/24, span 1
– Executing [4080@from-pstn:1] Set(“DAHDI/i1/xxxxxxxxx-1957”, “__FROM_DID=4080”) in new stack
– Executing [4080@from-pstn:2] Gosub(“DAHDI/i1/xxxxxxxxx-1957”, “app-blacklist-check,s,1()”) in new stack
– Executing [s@app-blacklist-check:1] GotoIf(“DAHDI/i1/xxxxxxxxx-1957”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:2] Set(“DAHDI/i1/xxxxxxxxx-1957”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:3] Return(“DAHDI/i1/xxxxxxxxx-1957”, “”) in new stack
– Executing [4080@from-pstn:3] Set(“DAHDI/i1/xxxxxxxxx-1957”, “CDR(did)=4080”) in new stack
– Executing [4080@from-pstn:4] ExecIf(“DAHDI/i1/xxxxxxxxx-1957”, “1 ?Set(CALLERID(name)=xxxxxxxxx)”) in new stack
– Executing [4080@from-pstn:5] Set(“DAHDI/i1/xxxxxxxxx-1957”, “__CALLINGPRES_SV=allowed”) in new stack
– Executing [4080@from-pstn:6] Set(“DAHDI/i1/xxxxxxxxx-1957”, “CALLERPRES()=allowed_not_screened”) in new stack
– Executing [4080@from-pstn:7] Set(“DAHDI/i1/xxxxxxxxx-1957”, “FAX_DEST=ext-fax^4080^1”) in new stack
– Executing [4080@from-pstn:8] Answer(“DAHDI/i1/xxxxxxxxx-1957”, “”) in new stack
– Executing [4080@from-pstn:9] Wait(“DAHDI/i1/xxxxxxxxx-1957”, “4”) in new stack
– Redirecting DAHDI/i1/xxxxxxxxx-1957 to fax extension
== Spawn extension (from-pstn, fax, 1) exited non-zero on ‘DAHDI/i1/xxxxxxxxx-1957’
– Executing [fax@from-pstn:1] Goto(“DAHDI/i1/xxxxxxxxx-1957”, “ext-fax,4080,1”) in new stack
– Goto (ext-fax,4080,1)
– Executing [4080@ext-fax:1] Set(“DAHDI/i1/xxxxxxxxx-1957”, “FAX_FOR=fax line -Trainers office (4080)”) in new stack
– Executing [4080@ext-fax:2] NoOp(“DAHDI/i1/xxxxxxxxx-1957”, “Receiving Fax for: fax line -Trainers office (4080), From: “xxxxxxx” “) in new stack
– Executing [4080@ext-fax:3] Set(“DAHDI/i1/xxxxxxxxx-1957”, "[email protected]”) in new stack
– Executing [4080@ext-fax:4] Goto(“DAHDI/i1/xxxxxxxxx-1957”, “s,receivefax”) in new stack
– Goto (ext-fax,s,3)
– Executing [s@ext-fax:3] StopPlayTones(“DAHDI/i1/xxxxxxxxx-1957”, “”) in new stack
– Executing [s@ext-fax:4] ReceiveFAX(“DAHDI/i1/xxxxxxxxx-1957”, “/var/spool/asterisk/fax/1357703556.19526.tif,f”) in new stack
– Channel ‘DAHDI/i1/xxxxxxxxx-1957’ receiving FAX ‘/var/spool/asterisk/fax/1357703556.19526.tif’
[2013-01-08 21:52:51] WARNING[1378]: res_fax_spandsp.c:369 spandsp_log: WARNING T.30 ECM carrier not found
[2013-01-08 21:52:51] WARNING[1378]: res_fax_spandsp.c:369 spandsp_log: WARNING T.30 ECM carrier not found
[2013-01-08 21:52:52] WARNING[1378]: res_fax_spandsp.c:369 spandsp_log: WARNING T.30 ECM carrier not found
[2013-01-08 21:52:52] WARNING[1378]: res_fax_spandsp.c:369 spandsp_log: WARNING T.30 ECM carrier not found
– Executing [s@ext-fax:5] ExecIf(“DAHDI/i1/xxxxxxxxx-1957”, “0?Set(FAXSTATUS=“FAILED: error: statusstr: OK”)”) in new stack
– Executing [s@ext-fax:6] Hangup(“DAHDI/i1/xxxxxxxxx-1957”, “”) in new stack
== Spawn extension (ext-fax, s, 6) exited non-zero on ‘DAHDI/i1/xxxxxxxxx-1957’
– Executing [h@ext-fax:1] GotoIf(“DAHDI/i1/xxxxxxxxx-1957”, “0?failed”) in new stack
– Executing [h@ext-fax:2] GotoIf(“DAHDI/i1/xxxxxxxxx-1957”, “0?noemail”) in new stack
– Executing [h@ext-fax:3] Set(“DAHDI/i1/xxxxxxxxx-1957”, “DELETE_AFTER_SEND=true”) in new stack
– Executing [h@ext-fax:4] System(“DAHDI/i1/xxxxxxxxx-1957”, “/var/lib/asterisk/bin/fax2mail.php --to "[email protected]” --dest “4080” --callerid '“xxxxxxxxxx” ’ --file /var/spool/asterisk/fax/1357703556.19526.tif --exten “fax line -Trainers office (4080)” --delete “true””) in new stack
– Executing [h@ext-fax:5] Macro(“DAHDI/i1/xxxxxxxxx-1957”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“DAHDI/i1/xxxxxxxxx-1957”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] ExecIf(“DAHDI/i1/xxxxxxxxx-1957”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [s@macro-hangupcall:4] Hangup(“DAHDI/i1/xxxxxxxxx-1957”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘DAHDI/i1/xxxxxxxxx-1957’ in macro ‘hangupcall’
== Spawn extension (ext-fax, h, 5) exited non-zero on ‘DAHDI/i1/xxxxxxxxx-1957’
– Hungup ‘DAHDI/i1/xxxxxxxxx-1957’

Here is the output of fax show stats. From it, it looks like they completed but I never did get an email.

localhost*CLI> fax show stats

FAX Statistics:

Current Sessions : 0
Reserved Sessions : 0
Transmit Attempts : 0
Receive Attempts : 3
Completed FAXes : 3
Failed FAXes : 0

Spandsp G.711
Success : 3
Switched to T.38 : 0
Call Dropped : 0
No FAX : 0
Negotiation Failed : 0
Train Failure : 0
Retries Exceeded : 0
Protocol Error : 0
TX Protocol Error : 0
RX Protocol Error : 0
File Error : 0
Memory Error : 0
Unknown Error : 0

Spandsp T.38
Success : 0
Call Dropped : 0
No FAX : 0
Negotiation Failed : 0
Train Failure : 0
Retries Exceeded : 0
Protocol Error : 0
TX Protocol Error : 0
RX Protocol Error : 0
File Error : 0
Memory Error : 0
Unknown Error : 0

The first thing I would check is:

  • can you system send email at all?

If so, then check the mail logs to see if there is any evidence of the fax message getting into the mail system.

I am a newbie to asterisk and I am not sure how to check mail logs. How can I make sure if it can send email? I tried to telnet to port 25 to our mail server but telnet is not found.

You will need to log into the Linux command line of your server. Once you are logged in try sending an email with the mail command.

The mail logs on Centos are stored in /var/log/maillog

you can use the tail -f command to have the log displayed in one log in session and use a second log in to send the mail.

Tried setting up with a gmail account and this is what I am getting in the logs now.

Jan 11 06:39:18 localhost postfix/smtp[29293]: warning: SASL authentication failure: No worthy mechs found
Jan 11 06:39:18 localhost postfix/smtp[29293]: 28195ADA1BE: to=[email protected], relay=smtp.gmail.com[74.125.134.108]:587, delay=204380, delays=204380/0.02/0.68/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.gmail.com[74.125.134.108]: no mechanism available)

Any ideas of why the warning: SASL authentication failure: No worthy mechs found?

I just want to throw my hat in here. I set up all the FreePBX fax destinations correctly and was able to receive a fax once. After that, it seems that the send2fax.php is getting called but I never get an email. Checked the maillog and it doesn’t look like it getting anything. Voicemail emails work fine so it’s not an email issue.

Any insight would be great.