FreePBX 13 stopped sending Fax2email

Have had FreePBX working at a customer for almost 4 months now, last month they did a module update and the way emails worked seems to have changed.
First had to redefine the domain and mail address that was being used, and now they can receive User Manager notifications from the PBX, but received faxes appear never to be sent.

The bug report I opened was closed based on “This is not a bug. Confirmed email are working for us.” http://issues.freepbx.org/browse/FREEPBX-11943

Any suggestions why the received fax seems to not be emailed? User Manager Notifications appear in the maillog while faxes don’t. The .tif file is properly stored on the server.

They are using the 1 free Digium fax license
Asterisk Version: 11.20.0
Distro Version: 13.0.95

This is what we see in the log:

Fax attempt:
[2016-03-31 11:27:48] VERBOSE[4595][C-0000c476] app_dial.c: – SIP/5008-0001825b is ringing
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: == Spawn extension (ext-fax, s, 4) exited non-zero on ‘SIP/99665000-00018254’
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [h@ext-fax:1] GotoIf(“SIP/99665000-00018254”, “0?failed”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [h@ext-fax:2] GotoIf(“SIP/99665000-00018254”, “0?noemail”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [h@ext-fax:3] Set(“SIP/99665000-00018254”, “DELETE_AFTER_SEND=true”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [h@ext-fax:4] System(“SIP/99665000-00018254”, “/var/lib/asterisk/bin/fax2mail.php --remotestationid “” --to "[email protected]” --dest “99665021” --callerid '“Anonymous” ’ --file /var/spool/asterisk/fax/1459412755.134924.tif --exten “Nir Cohen (1)” --delete “true” --attachformat “both”") in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [h@ext-fax:5] Macro(“SIP/99665000-00018254”, “hangupcall,”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [s@macro-hangupcall:1] ExecIf(“SIP/99665000-00018254”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [s@macro-hangupcall:2] GotoIf(“SIP/99665000-00018254”, “1?theend”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Goto (macro-hangupcall,s,4)
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [s@macro-hangupcall:4] ExecIf(“SIP/99665000-00018254”, “0?Set(CDR(recordingfile)=)”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: – Executing [s@macro-hangupcall:5] Hangup(“SIP/99665000-00018254”, “”) in new stack
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] app_macro.c: == Spawn extension (macro-hangupcall, s, 5) exited non-zero on ‘SIP/99665000-00018254’ in macro ‘hangupcall’
[2016-03-31 11:27:49] VERBOSE[4346][C-0000c472] pbx.c: == Spawn extension (ext-fax, h, 5) exited non-zero on ‘SIP/99665000-00018254’

As I said, this was working fine for more than 2 months, and suddenly stopped and we can not see why, so any advice would be helpful.

Two things. Firstly free fax for asterisk is depreciated in asterisk 13. Only span dsp is supported.

Secondly have you tried running the script that sends the email manually. You can see the script in the dialplan.

Hi Andrew,

Now I am really confused. Did you mean that FreePBX 13 no longer supports Asterisk free fax? I know that it is still supported in and provided with Asterisk 13. If it is not supported in FreePBX 13 when did this change as we had it working form December 2015 until early March 2016.

Also, DSP span has not been supported in Asterisk since version 1.8.

Tomorrow we will be testing the script and tracing what is going on to see what changed.

I specifically said “Asterisk 13” Digium dropped support for it. http://blogs.digium.com/2015/06/26/fax-asterisk-res_fax_digium-no-longer-supported-asterisk-13-later/

This is not true at all. Please read the blog above.

I am sorry, it appears I was misinformed.

If This being the case, what was included in the FreePBX 13 Distro that was working for 2+ months?

SpanDSP has been what the distro has used for over 4 years now.

Go to your console and enter the line above. Tell us what happens. My suspicion is that something in the fax2mail PHP script has failed

The SpanDSP thing sounds like a red herring to me. .

Hi Dave,

Thanks that seems to have pointed out the problem.
[root@pbx fax]# /var/lib/asterisk/bin/fax2mail.php --remotestationid “” --to "[email protected]" --dest “99665021” --callerid '“Anonymous” ’ --file /var/spool/asterisk/fax/1459412755.134924.tif --exten “Nir Cohen (1)” --delete “true” --attachformat “both”
-bash: /var/lib/asterisk/bin/fax2mail.php:** Permission denied**
[root@pbx fax]#
[root@pbx fax]# ll /var/lib/asterisk/bin/fax2mail.php
lrwxrwxrwx 1 asterisk asterisk 48 Mar 20 22:05 /var/lib/asterisk/bin/fax2mail.php -> /var/www/html/admin/modules/fax/bin/fax2mail.php

Seems that somehow the permissions related to the alias file was suddenly failing. Not sure when or how this could have changed as the user does not know Linux so stays away from the command line.

Reset permissions and it is working.
Thanks again.