Hylafax Mailing List Archives

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

Re: Re: egetty and vgetty



Thanks very much for the example, the only difference between what you are
doing and what I was doing is that you are issuing ATA before exiting
egetty. 100 to 1 that was my mistake, now I realize that of course hylafax
should expect that start the fax call handling is the responsibility of
the egetty program. And of course egetty should also reinitialize the
modem before issuing the ATA command. 

If this works I will still read the changes sent to me and try to see what
he did. I'll also send you a few lines with the changes that I recommend,

Thanks very much!

Julio

On Wed, 22 Oct 1997 Matthias.Apitz@SOFTCON.de wrote:

> Julio C Spinelli wrote:
>     
>     Thanks for the info. egetty is nothing, it does not exist at all. The 
>     only meaning of the string egetty is that if EGettyArgs is defined as 
>     a non nul string and AnswerRotary is set to "extern". Hylafax will 
>     call a program /bin/egetty. If that program does not exist...
>     
>     It is the user/system developer's responsibility to write that 
>     program. This program's job is to answer the incoming call, determine 
>     its type and then exit with a CALLTYPE_XXX (FAX, DATA, DONE, ERROR, 
>     VOICE) code. Hylafax will then proceed as if it itself would have 
>     determined the type of call.
>     
>     The issue I have is that when I do this I get a modem write error 
>     after calling the sys::write(fd,......   call and as I don't fully 
>     understand the inheritance rules that Sam applies and neither have I 
>     been able to understand the Dispatch class. I am at a loss in trying 
>     to guess what is going wrong.
>     
>     This is why I am looking for any working example for simple and bare 
>     bones it is.
>     
>     Thanks for your help,
>     
>     Julio
>     
>     Note: I hope this clarifies what egetty is.
> 
> Try this small example. It works for me (don't blame me about
> this C-code, it's not the way I'm writing real code :-))
> It works for me and faxgetty(1M) receives the fax fine (see the log).
> 
> 	matthias
> 
> 
> /* change this define to the real device on your system */
> #define LINE "/dev/ttyFN02" 
> main()
> {
> 	int fd;
> 	fd = open(LINE, 2);
> 	if(fd < 0)
> 		exit(0);
> 	write(fd, "ATA\r", 4);   /* time to pick up the call */
> 	close(fd);
> 	exit(2);
> }
> 
> it gives the following session log:
> 
> 
> Oct 22 19:10:12.67: [ 7560]: SESSION BEGIN 00003087 498961308189
> Oct 22 19:10:12.74: [ 7560]: EXTERN GETTY: START "/bin/egetty test", pid 7798
> Oct 22 19:10:12.98: [ 7560]: MODEM input buffering enabled
> Oct 22 19:10:13.36: [ 7560]: EXTERN GETTY: exit status 01000
> Oct 22 19:10:13.38: [ 7560]: ANSWER: FAX CONNECTION
> Oct 22 19:10:13.39: [ 7560]: MODEM input buffering enabled
> Oct 22 19:10:13.45: [ 7560]: RECV FAX: begin
> Oct 22 19:10:30.07: [ 7560]: --> [11:CONNECT FAX]
> Oct 22 19:10:30.08: [ 7560]: --> [4:+FCO]
> Oct 22 19:10:32.59: [ 7560]: --> [26:+FTI:        498961308398 ]
> Oct 22 19:10:32.59: [ 7560]: REMOTE TSI "498961308398"
> Oct 22 19:10:32.60: [ 7560]: --> [20:+FCS:0,3,0,2,1,0,0,5]
> Oct 22 19:10:32.61: [ 7560]: REMOTE wants 9600 bit/s
> Oct 22 19:10:32.62: [ 7560]: REMOTE wants page width 1728 pixels in 215 mm
> Oct 22 19:10:32.62: [ 7560]: REMOTE wants unlimited page length 
> Oct 22 19:10:32.63: [ 7560]: REMOTE wants 3.85 line/mm
> Oct 22 19:10:32.63: [ 7560]: REMOTE wants 2-D MR
> Oct 22 19:10:32.64: [ 7560]: --> [2:OK]
> Oct 22 19:10:32.73: [ 7560]: <-- [7:AT+FDR\r]
> Oct 22 19:10:34.37: [ 7560]: --> [20:+FCS:0,3,0,2,1,0,0,5]
> Oct 22 19:10:34.37: [ 7560]: REMOTE wants 9600 bit/s
> Oct 22 19:10:34.38: [ 7560]: REMOTE wants page width 1728 pixels in 215 mm
> Oct 22 19:10:34.38: [ 7560]: REMOTE wants unlimited page length 
> Oct 22 19:10:34.39: [ 7560]: REMOTE wants 3.85 line/mm
> Oct 22 19:10:34.40: [ 7560]: REMOTE wants 2-D MR
> Oct 22 19:10:34.87: [ 7560]: --> [7:CONNECT]
> Oct 22 19:10:34.87: [ 7560]: RECV: begin page
> Oct 22 19:10:34.88: [ 7560]: RECV: send trigger 022
> Oct 22 19:10:34.89: [ 7560]: <-- data [1]
> Oct 22 19:11:04.60: [ 7560]: RECV: 13292 bytes of data, 1145 total lines
> Oct 22 19:11:04.68: [ 7560]: --> [16:+FPS:1,474,0,0,0]
> Oct 22 19:11:05.94: [ 7560]: --> [6:+FET:2]
> Oct 22 19:11:05.95: [ 7560]: RECV recv EOP (no more pages or documents)
> Oct 22 19:11:05.96: [ 7560]: --> [2:OK]
> Oct 22 19:11:06.01: [ 7560]: RECV send MCF (message confirmation)
> Oct 22 19:11:06.04: [ 7560]: RECV FAX (00003087): from 498961308398, page 1 in 0:34, INF, 3.85 line/mm, 2-D MR
> Oct 22 19:11:06.13: [ 7560]: RECV FAX (00003087): recvq/fax00201.tif from 498961308398, route to <unspecified>, 1 pages in 0:53
> Oct 22 19:11:06.20: [ 7560]: <-- [7:AT+FDR\r]
> Oct 22 19:11:09.08: [ 7560]: --> [7:+FHS:00]
> Oct 22 19:11:09.08: [ 7560]: REMOTE HANGUP: Normal and proper end of connection (code 0)
> Oct 22 19:11:09.12: [ 7560]: RECV FAX: bin/faxrcvd "recvq/fax00201.tif" "ttyFN02" "00003087" ""
> Oct 22 19:11:12.13: [ 7560]: RECV FAX: end
> Oct 22 19:11:12.14: [ 7560]: SESSION END
> 



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services