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