HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Weird Phase B Error (with solution)



Hello !

There is a very weird problem with hylafax. I will describe it here for
reference. Please respond to me directly, I am not subscribed on the
mailinglist.

Ok, however. I got 

REMOTE HANGUP: Unspecified Transmit Phase B error (code 20)

when using WHFC. To make things even more worse, the sender of the fax get
a email notification "all right, fax sended" (which is IMHO a very Bad
Thing).

Everything worked right when I used sendfax to send the same postscript
file.

The whole story and the conclusio from 4 hours of debugging:

I used a Xerox Postscript Printer Driver on a Windows NT Box to generated
the output for WHFC. This postscript files start with

ESC%-12345X@PJL
@PJL ENTER LANGUAGE = POSTSCRIPT
%!PS-Adobe-3.0

. All right, this wouldn't recogniced as postscript. I changed the
typerules file and wrote a script which produced 'real' postscript from
this.

This doesn't work. I you send a file via hfaxd, the typerules mechanism
isn't used for processing documents. The whole document type checking in
hfaxd is 


    if (cc > 2 && b.buf[0] == '%' && b.buf[1] == '!')
                op = FaxRequest::send_postscript;
            else if (cc > sizeof (b.h) && isTIFF(b.h))
                op = FaxRequest::send_tiff;
            else
                op = FaxRequest::send_data;


(in FileSystem.c++)

With my files, hfaxd uses the send_data-Type and tries to use this direct
as raw fax data - which fails with the Phase B error.

The problems with this:

- The typechecking in hfaxd/FileSystem.c++ is not very smart and not
sufficient, specially when dealing with Windows Clients or other
non-sendfax systems.

- The faxq-System makes no further checking of the page data; 

- The error message "Unspecified Transmit Phase B error" is very
misleading. Maybe there is a way to fix this.

- Creating a "all ok"-notification with this error is not ok. 

Comments ?

Kind regards,

Richard

------
The world is a jungle in general, and the networking game
contributes many animals. ---- David C. Plummer, RFC 826




Project hosted by iFAX Solutions