[Home]

Summary:ASTERISK-13383: app_fax: ReceiveFax fails with more than 1 page.
Reporter:Sean Darcy (seandarcy)Labels:
Date Opened:2009-01-16 11:38:27.000-0600Date Closed:2011-06-07 14:03:07
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_fax
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:1.6.1-beta4: pstn connected to TDM400P. The sender is the office fax ( Brother ) used daily without problems. I can receive faxes with the pstn hooked up to my fax machine.

A one page fax works fine, but two pages causes an error. Same problem whether using * built with and using spandsp-0.0.5-pre4 or built with and using 0.0.6-pre3, but different error messages:

0.0.5-pre4:

   -- Executing [fax@incoming-pstn-line:1] NoOp("DAHDI/4-1", "Fax Detected") in new stack
   -- Executing [fax@incoming-pstn-line:2] Goto("DAHDI/4-1", "incoming-fax,s,1") in new stack
   -- Goto (incoming-fax,s,1)
   -- Executing [s@incoming-fax:1] Set("DAHDI/4-1", "FAXFILE=/var/spool/asterisk/fax/200901161227-0") in new stack
   -- Executing [s@incoming-fax:2] ReceiveFAX("DAHDI/4-1", "/var/spool/asterisk/fax/200901161227-0.tif") in new stack
[Jan 16 12:28:58] WARNING[24687]: app_fax.c:177 phase_e_handler: Error transmitting fax. result=49: The call dropped prematurely.
[Jan 16 12:28:58] WARNING[24687]: app_fax.c:644 transmit: Transmission error
 == Spawn extension (incoming-fax, s, 2) exited non-zero on 'DAHDI/4-1'

0.0.6-pre3:

   -- Executing [s@incoming-fax:1] Set("DAHDI/4-1", "FAXFILE=/var/spool/asterisk/fax/200901161136-0") in new stack
   -- Executing [s@incoming-fax:2] ReceiveFAX("DAHDI/4-1", "/var/spool/asterisk/fax/200901161136-0.tif") in new stack
[Jan 16 11:37:35] WARNING[6584]: app_fax.c:177 phase_e_handler: Error transmitting fax. result=13: Unexpected message received.
[Jan 16 11:37:35] WARNING[6584]: app_fax.c:647 transmit: Transmission failed
   -- Executing [s@incoming-fax:3] Hangup("DAHDI/4-1", "") in new stack

On the sending machine, no error for one page faxes, for two pages "Poor line condition"
Comments:By: Sean Darcy (seandarcy) 2009-01-20 17:10:51.000-0600

Went and got spandsp-20090117.tar.gz. Installed it and rebuilt asterisk.

Same problem with two pages, and now it errors out with ONE page.  The error message is like 0.0.5-pre4 - result=49:

   -- Executing [s@incoming-fax:1] Set("DAHDI/4-1", "FAXFILE=/var/spool/asterisk/fax/200901201802-0") in new stack
   -- Executing [s@incoming-fax:2] ReceiveFAX("DAHDI/4-1", "/var/spool/asterisk/fax/200901201802-0.tif") in new stack
[Jan 20 18:03:15] WARNING[3719]: app_fax.c:177 phase_e_handler: Error transmitting fax. result=49: The call dropped prematurely.
[Jan 20 18:03:15] WARNING[3719]: app_fax.c:644 transmit: Transmission error

By: Sean Darcy (seandarcy) 2009-01-23 16:24:59.000-0600

Still with spandsp-20090117.tar.gz, I got this:

ReceiveFAX("DAHDI/4-1", "/var/spool/asterisk/fax/200901231628-0.tif") in new stack
[Jan 23 16:28:36] WARNING[1295]: app_fax.c:177 phase_e_handler: Error transmitting fax. result=5: The HDLC carrier did not stop in a timely manner.
[Jan 23 16:28:36] WARNING[1295]: app_fax.c:647 transmit: Transmission failed
   -- Executing [s@incoming-fax:3] Hangup("DAHDI/4-1", "") in new stack

2 of 3 pages were received.

But a resend of the same fax 5 minutes later worked for all 3 pages.

Saw there was a 20090124 snapshot. I'll try that.

By: pj (pj) 2009-01-30 14:49:35.000-0600

I have similar problem with Asterisk SVN-trunk-r171528 and libspandsp1-0.0.5-0.pre4.1

I'm receiving fax via SIP channel, using codec alaw

Is there some way, how to debug similar problems with fax transmission?
it ends with following error:

[Jan 30 21:40:02] WARNING[28027]: app_fax.c:222 phase_e_handler: Error transmitting fax. result=49: The call dropped prematurely.
[Jan 30 21:40:02] WARNING[28027]: app_fax.c:689 transmit: Transmission error


core show channel:

          Type: SIP
      UniqueID: 1233347938.561
     Caller ID: 0950516569
Caller ID Name: (N/A)
   DNID Digits: 1#530507
      Language: cz
         State: Up (6)
         Rings: 0
 NativeFormats: 0x8 (alaw)
   WriteFormat: 0x40 (slin)
    ReadFormat: 0x40 (slin)
WriteTranscode: Yes
 ReadTranscode: Yes
1st File Descriptor: 14
     Frames in: 3394
    Frames out: 2026
Time to Hangup: 0
  Elapsed Time: 0h0m47s
 Direct Bridge: <none>
Indirect Bridge: <none>
--   PBX   --
       Context: prijem_faxu
     Extension: s
      Priority: 5
    Call Group: 0
  Pickup Group: 0
   Application: ReceiveFAX
          Data: /var/spool/asterisk/fax/20090130-213904.tif
   Blocking in: ast_waitfor_nandfds
     Variables:
FAXMODE=audio
FAXERROR=Channel problems
FAXSTATUS=FAILED
FAXFILE=/var/spool/asterisk/fax/20090130-213904

By: Dwayne Hubbard (dhubbard) 2009-02-09 12:54:04.000-0600

seandarcy, can you please post a dahdi_monitor recording of a failed fax attempt ?

By: Dwayne Hubbard (dhubbard) 2009-02-09 15:55:35.000-0600

waiting for a dahdi_monitor recording of a failed fax transmission...

By: Leif Madsen (lmadsen) 2009-04-01 19:52:40

I'm suspending this issue due to lack of inactivity. If someone can provide the requested information either re-open the issue (if you're the original reporter) or find a bug marshal on #asterisk-bugs on the Freenode IRC network at irc.freenode.net. Thanks!