Fax to Email issue

I’m trying to get the Fax to Email system working, and have hit a brick wall. I can send and receive faxes via FXO on a Grandstream gateway, to Freepbx, to a Linksys FXS gateway, to a actual fax machine. This works both ways. I’ve got a dedicated trunk / FXO port for the fax line. However, when I attempt to use fax to email, it gets to receiving the fax (writing the TIF) and then says “Unexpected message received”. Then it fails.

I don’t know of a good way to see what that message is or what is going on in more detail. I’ve posted the log snip below at the point where it fails.

Any help would be awesome! This has been driving me crazy for a while.

[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx_builtins.c: Goto (ext-fax,3,1)
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx.c: Executing [3@ext-fax:1] Set("PJSIP/Line_1-2_PSTN-00000017", "FAX_FOR=FAX (3)") in new stack
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx.c: Executing [3@ext-fax:2] NoOp("PJSIP/Line_1-2_PSTN-00000017", "Receiving Fax for: FAX (3), From: "UT SUPPORT" <9568151391>") in new stack
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx.c: Executing [3@ext-fax:3] Set("PJSIP/Line_1-2_PSTN-00000017", "FAX_RX_USER=3") in new stack
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx.c: Executing [3@ext-fax:4] Set("PJSIP/Line_1-2_PSTN-00000017", "FAX_RX_EMAIL_LEN=20") in new stack
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx.c: Executing [3@ext-fax:5] Goto("PJSIP/Line_1-2_PSTN-00000017", "s,receivefax") in new stack
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx_builtins.c: Goto (ext-fax,s,3)
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx.c: Executing [s@ext-fax:3] StopPlayTones("PJSIP/Line_1-2_PSTN-00000017", "") in new stack
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] pbx.c: Executing [s@ext-fax:4] ReceiveFAX("PJSIP/Line_1-2_PSTN-00000017", "/var/spool/asterisk/fax/1517533567.75.tif,f") in new stack
[2018-02-01 20:06:07] VERBOSE[24721][C-0000002e] res_fax.c: Channel 'PJSIP/Line_1-2_PSTN-00000017' receiving FAX '/var/spool/asterisk/fax/1517533567.75.tif'
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx.c: Executing [s@ext-fax:5] ExecIf("PJSIP/Line_1-2_PSTN-00000017", "1?Set(FAXSTATUS="FAILED: error: Unexpected message received statusstr: Unexpected message received")") in new stack
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx.c: Executing [s@ext-fax:6] Hangup("PJSIP/Line_1-2_PSTN-00000017", "") in new stack
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx.c: Spawn extension (ext-fax, s, 6) exited non-zero on 'PJSIP/Line_1-2_PSTN-00000017'
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx.c: Executing [h@ext-fax:1] GotoIf("PJSIP/Line_1-2_PSTN-00000017", "1?failed") in new stack
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx_builtins.c: Goto (ext-fax,h,104)
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx.c: Executing [h@ext-fax:104] NoOp("PJSIP/Line_1-2_PSTN-00000017", "FAX "FAILED: error: Unexpected message received statusstr: Unexpected message received" for: FAX (3) , From: "UT SUPPORT" <9568151391>") in new stack
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx.c: Executing [h@ext-fax:105] Macro("PJSIP/Line_1-2_PSTN-00000017", "hangupcall,") in new stack
[2018-02-01 20:06:25] VERBOSE[24721][C-0000002e] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/Line_1-2_PSTN-00000017", "1?theend") in new stack

Bump…?

I know this feature is probably not used that often, but since I have never dealt with FAX before, I’m hoping for some insight.

I wish there was some good overview on the entire fax protocol and troubleshooting… Anyone have a recommendation? Anyway, just trying to get this all figured out…

Can not get incoming faxing to work on FreePBX 12.0.45 to work either. Incoming call fax detected and routed to fax extension.
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: == Spawn extension (ext-fax, s, 4) exited non-zero on ‘SIP/8004-00001fd5’
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Executing [h@ext-fax:1] GotoIf(“SIP/8004-00001fd5”, “1?failed”) in new stack
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Goto (ext-fax,h,103)
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Executing [h@ext-fax:103] NoOp(“SIP/8004-00001fd5”, “FAX FAILED for: [email protected] , From: “PLANO TX” <2142998687>”) in new stack
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Executing [h@ext-fax:104] Macro(“SIP/8004-00001fd5”, “hangupcall,”) in new stack
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Executing [s@macro-hangupcall:1] ExecIf(“SIP/8004-00001fd5”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Executing [s@macro-hangupcall:2] GotoIf(“SIP/8004-00001fd5”, “1?theend”) in new stack
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Goto (macro-hangupcall,s,4)
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: – Executing [s@macro-hangupcall:4] Hangup(“SIP/8004-00001fd5”, “”) in new stack
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/8004-00001fd5’ in macro ‘hangupcall’
[2018-02-09 09:25:25] VERBOSE[16727][C-00006d71] pbx.c: == Spawn extension (ext-fax, h, 104) exited non-zero on ‘SIP/8004-00001fd5’

Get the above.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.