Inbound Fax to Email not working after updates

I have been using inbound fax to email for several months now. This has been working fine until yesterday, September 6, 2016 when I applied the module updates. Faxes are coming in and being answered and show up in the CDR’s. However, they do not show up in the Inbox in the UCP and they are not being emailed to the user. I do have Fax Pro installed and I can send outbound faxes just fine from the UCP. I also see nothing useful in the Asterisk logs.

We need to see the logs regardless

[2016-09-07 09:41:23] VERBOSE[1883] pbx.c: Registered extension context ‘send-fax’; registrar: pbx_config
[2016-09-07 09:41:23] VERBOSE[1883] pbx.c: Including context ‘send-fax-custom’ in context ‘send-fax’
[2016-09-07 09:41:23] VERBOSE[1883] pbx.c: Added extension ‘s’ priority 1 to send-fax
[2016-09-07 09:41:23] VERBOSE[1883] pbx.c: Added extension ‘s’ priority 2 to send-fax
[2016-09-07 09:41:23] VERBOSE[1883] pbx.c: Added extension ‘s’ priority 3 to send-fax
[2016-09-07 09:41:23] VERBOSE[1883] pbx.c: Added extension ‘h’ priority 1 to send-fax
[2016-09-07 09:41:23] VERBOSE[1883] pbx.c: Including context ‘app-fax’ in context ‘from-internal-additional’
[2016-09-07 09:41:23] WARNING[1883] pbx.c: Context ‘send-fax’ tries to include nonexistent context ‘send-fax-custom’
[2016-09-07 09:41:23] WARNING[1883] pbx.c: Context ‘app-fax’ tries to include nonexistent context ‘app-fax-custom’
[2016-09-07 09:41:23] WARNING[1883] pbx.c: Context ‘ext-fax’ tries to include nonexistent context ‘ext-fax-custom’
[2016-09-07 09:41:27] VERBOSE[1883] loader.c: Loading res_fax.so.
[2016-09-07 09:41:27] VERBOSE[1883] config.c: Parsing ‘/etc/asterisk/res_fax.conf’: Found
[2016-09-07 09:41:27] VERBOSE[1883] config.c: Parsing ‘/etc/asterisk/res_fax_custom.conf’: Found
[2016-09-07 09:41:27] VERBOSE[1883] loader.c: res_fax.so => (Generic FAX Applications)
[2016-09-07 09:41:28] VERBOSE[1883] loader.c: Loading res_fax_spandsp.so.
[2016-09-07 09:41:28] VERBOSE[1883] res_fax.c: Registered handler for ‘Spandsp’ (Spandsp FAX Driver)
[2016-09-07 09:41:28] VERBOSE[1883] loader.c: res_fax_spandsp.so => (Spandsp G.711 and T.38 FAX Technologies)
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:18] Goto(“PJSIP/VI_Trunk_In_Alt1-00000002”, “ext-fax,3,1”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx_builtins.c: Goto (ext-fax,3,1)
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:1] Set(“PJSIP/VI_Trunk_In_Alt1-00000002”, “FAX_FOR=CloudNet VoIP Fax (3)”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/VI_Trunk_In_Alt1-00000002”, “Receiving Fax for: CloudNet VoIP Fax (3), From: “12487249999” <12487249999>”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:3] Set(“PJSIP/VI_Trunk_In_Alt1-00000002”, “FAX_RX_USER=3”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:4] Set(“PJSIP/VI_Trunk_In_Alt1-00000002”, “FAX_RX_EMAIL_LEN=20”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:5] Goto(“PJSIP/VI_Trunk_In_Alt1-00000002”, “s,receivefax”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx_builtins.c: Goto (ext-fax,s,3)
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:3] StopPlayTones(“PJSIP/VI_Trunk_In_Alt1-00000002”, “”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:4] ReceiveFAX(“PJSIP/VI_Trunk_In_Alt1-00000002”, “/var/spool/asterisk/fax/1473255806.2.tif,f”) in new stack
[2016-09-07 09:43:26] VERBOSE[2357][C-00000001] res_fax.c: Channel ‘PJSIP/VI_Trunk_In_Alt1-00000002’ receiving FAX ‘/var/spool/asterisk/fax/1473255806.2.tif’
[2016-09-07 09:43:39] WARNING[2357][C-00000001] res_fax_spandsp.c: WARNING T.30 Non-ECM carrier not found
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:5] ExecIf(“PJSIP/VI_Trunk_In_Alt1-00000002”, “0?Set(FAXSTATUS=“FAILED: error: statusstr: OK”)”) in new stack
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:6] Hangup(“PJSIP/VI_Trunk_In_Alt1-00000002”, “”) in new stack
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Spawn extension (ext-fax, s, 6) exited non-zero on ‘PJSIP/VI_Trunk_In_Alt1-00000002’
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/VI_Trunk_In_Alt1-00000002”, “0?failed”) in new stack
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:2] Set(“PJSIP/VI_Trunk_In_Alt1-00000002”, “DELETE_AFTER_SEND=true”) in new stack
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:3] GotoIf(“PJSIP/VI_Trunk_In_Alt1-00000002”, “0?noemail”) in new stack
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:4] System(“PJSIP/VI_Trunk_In_Alt1-00000002”, “/var/lib/asterisk/bin/fax2mail.php --remotestationid “2484784302CISCO” --user “3” --dest “17348876151” --callerid ‘“12487249999” <12487249999>’ --file /var/spool/asterisk/fax/1473255806.2.tif --exten “CloudNet VoIP Fax (3)” --delete “true” --attachformat “””) in new stack
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Executing [[email protected]:5] Macro(“PJSIP/VI_Trunk_In_Alt1-00000002”, “hangupcall,”) in new stack
[2016-09-07 09:44:18] VERBOSE[2357][C-00000001] pbx.c: Spawn extension (ext-fax, h, 5) exited non-zero on ‘PJSIP/VI_Trunk_In_Alt1-00000002’

So now run this manually

/var/lib/asterisk/bin/fax2mail.php --remotestationid “2484784302CISCO” --user “3” --dest “17348876151” --callerid ‘“12487249999” <12487249999>’ --file /var/spool/asterisk/fax/1473255806.2.tif --exten “CloudNet VoIP Fax (3)” --delete “true” --attachformat “”

I’m not sure what this command is going to do or how it will help. Can you just try an inbound fax to email on your own fully patched FreePBX 13 server? The updates that were released yesterday caused the inbound faxing to email to stop working properly. I think it would be more productive to find out what was missed related to the fax to email function and your 20+ updates in the last 24-hours.

Hi. I’m a developer on the FreePBX Open Source project. You don’t have to run that command but I will be unable to help you moving forward. Sorry.

2 Likes

This is what the command produces:
email-fax dying, no destination found (User has no email!) and we arent keeping the file!

And there is the problem…

Fixed in: fax v13.0.34

The updated worked. Thanks for the quick fix.

Is there any way to retrieve the undelivered faxes from the last 24 hours?

They will be in “/var/spool/asterisk/fax”

I am having this same issue after running updates yesterday. Where can I find the logs the other user gave to you so I can resolve this issue?

It’s already fixed - just upgrade to the latest fax (13.0.34). Any undelivered faxes will be /var/spool/asterisk/fax

1 Like

Wow, easiest fix yet! Thanks!!!

1 Like

Andrew, please, can you help with 13.0.38 version?

Fax Configuration 13.0.38

===============================

= Using UDPTL CoS mark 5
– Executing [[email protected]:1] GotoIf(“SIP/informsvyaz-000000c1”, “0?failed”) in new stack
– Executing [[email protected]:2] Set(“SIP/informsvyaz-000000c1”, “DELETE_AFTER_SEND=true”) in new stack
[2016-09-08
07:51:01] WARNING[13507][C-00000083]: ast_expr2.fl:470 ast_yyerror:
ast_yyerror(): syntax error: syntax error, unexpected ‘=’, expecting
$end; Input:
= 0
^
[2016-09-08 07:51:01] WARNING[13507][C-00000083]: ast_expr2.fl:474 ast_yyerror: If you have questions, please refer to *
– Executing [[email protected]:3] GotoIf(“SIP/informsvyaz-000000c1”, “?noemail”) in new stack
– Executing [[email protected]:4] System(“SIP/informsvyaz-000000c1”, “/var/lib/asterisk/bin/fax2mail.php --remotestationid “” --user “” --dest “2801007” --callerid “IjQ3MjU0NDQwNTQiIDw0NzI1NDQ0MDU0Pg==” --file /var/spool/asterisk/fax/1473310200.234.tif --exten “” --delete “true” --attachformat “””) in new stack
– Executing [[email protected]:5] Macro(“SIP/informsvyaz-000000c1”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/informsvyaz-000000c1”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/informsvyaz-000000c1”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/informsvyaz-000000c1”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/informsvyaz-000000c1’ in macro ‘hangupcall’
== Spawn extension (ext-fax, h, 5) exited non-zero on ‘SIP/informsvyaz-000000c1’

=========================================

[[email protected] fax]# /var/lib/asterisk/bin/fax2mail.php --remotestationid “” --user “” --dest “2801007” --callerid “IjQ3MjU0NDQwNTQiIDw0NzI1NDQ0MDU0Pg==” --file /var/spool/asterisk/fax/1473310200.234.tif --exten “” --delete “true” --attachformat ""
email-fax dying, no destination found (User has no email!) and we arent keeping the file!

You user is not properly configured for fax. Please follow the wiki on how to properly setup a faxing user.

Andrew, need the destination user for inbound route be configured as fax user (fax group + email) if I’m using fax detection in inbound route and sending it to system fax destination <666>? I have mail and from-mail for system fax feature configured in Fax Configuration.

Faxing was moved to user manager in 13. System fax should not be used. You need to setup a user in user manager for faxing then in drop down of your inbound route you can pick fax receipient.

Pretty sure this bug has come back - or there is a different bug - Looking through the WIKI and looking at the User Management for this user, they are set up correctly, but I am also getting email-fax dying, no destination found (User has no email!) even though they are set up - I even reverted to 13.0.34 but the error is still there - then reverted back up to 13.0.38.

Just noticed - my exten section and user section is blank - Here:

/var/lib/asterisk/bin/fax2mail.php --remotestationid “5053892039” --user “” --dest “5057717705” --callerid ‘“5053430650 5053430650” <5053430650>’ --file /var/spool/asterisk/fax/1475280595.1.tif --exten “” --delete “true” --attachformat “”

Under User Management, I have a proper E-Mail under E-Mail address and under the FAX tab I have Enabled set to yes and Format set to PDF.

Inbound route points to Fax Recipient - This User.

What else is there - the Wiki says this is it.

This was already fixed. Two weeks ago. It’s in edge however as it’s being QA’d