SendFax only sending the headers

Community-based Support for users of Free Fax For Asterisk

SendFax only sending the headers

Postby Cybertoy » Sat Apr 16, 2011 3:16 pm

Hi,

Today I installed Free Fax for Asterisk. The receiving part is working. When I send the receiving fax only gets my headers but none of the content. I am using the setup as described on teamforrest (google: teamforrest fax for asterisk integration). In the pasted example below I am sending a fax to extension 106 which is a fax connected via linksys ATA. The only line that goes through is the header which in this example says "Fax from Cybertoy +12 34 567 8901". It will go through for every page in the tif - however none of the content of the tif.

Any ideas what could be wrong?

Using asterisk 1.8.3.2 with res_fax_digium-1.8.0_1.3.0-core2_32 .. also tried res_fax_digium-1.8.0_1.3.0-i686_32

Code: Select all
    -- Attempting call on Local/106@local for s@outboundfax:1 (Retry 1)
    -- Executing [106@local:1] Dial("Local/106@local-0ead;2", "SIP/fax") in new stack
  == Using UDPTL CoS mark 5
  == Using SIP RTP CoS mark 5
    -- Called fax
    -- SIP/fax-00000002 is ringing
    -- SIP/fax-00000002 answered Local/106@local-0ead;2
    -- Executing [s@outboundfax:1] NoOp("Local/106@local-0ead;1", "send a fax") in new stack
    -- Executing [s@outboundfax:2] Set("Local/106@local-0ead;1", "FAXOPT(filename)=fax.tif") in new stack
[Apr 16 22:45:36] WARNING[29355]: res_fax.c:2776 acf_faxopt_write: channel 'Local/106@local-0ead;1' set FAXOPT(filename) to 'fax.tif' is unhandled!
    -- Executing [s@outboundfax:3] Set("Local/106@local-0ead;1", "FAXOPT(ecm)=yes") in new stack
    -- Executing [s@outboundfax:4] Set("Local/106@local-0ead;1", "FAXOPT(headerinfo)=Fax from Cybertoy +12 34 567 8901") in new stack
    -- Executing [s@outboundfax:5] Set("Local/106@local-0ead;1", "FAXOPT(localstationid)=0345678901") in new stack
    -- Executing [s@outboundfax:6] Set("Local/106@local-0ead;1", "FAXOPT(maxrate)=14400") in new stack
    -- Executing [s@outboundfax:7] Set("Local/106@local-0ead;1", "FAXOPT(minrate)=2400") in new stack
    -- Executing [s@outboundfax:8] SendFAX("Local/106@local-0ead;1", "/tmp/fax.tif,d") in new stack
    -- Channel 'Local/106@local-0ead;1' sending FAX:
    --    /tmp/fax.tif
  == Spawn extension (local, 106, 1) exited non-zero on 'Local/106@local-0ead;2'
    -- Channel 'SIP/fax-00000002' FAX session '2' started
    -- FAX handle 0: [ 000.000052 ], STAT_EVT_STRT_TX       st: IDLE         rt: IDLENSTX
    -- FAX handle 0: [ 000.000114 ], STAT_EVT_TX_HW_RDY     st: WT_TX_HW_RDY rt: TRDYNHTY
    -- FAX handle 0: [ 000.000154 ], P30EVN_SEND_STARTED
    -- FAX handle 0: [ 004.959939 ], STAT_INFO_NSF
    -- FAX handle 0: [ 005.379573 ], STAT_INFO_DIS
    -- FAX handle 0: [ 005.379614 ], STAT_EVT_DIS           st: WT_DIS       rt: XXXXNDIS
    -- FAX handle 0: [ 005.379633 ], STAT_EVT_REMOTE_RX     st: WT_DIS       rt: WDISNRRX
    -- FAX handle 0: [ 005.379650 ], STAT_NEG_V17_14400
    -- FAX handle 0: [ 005.379661 ], STAT_NEG_MR
    -- FAX handle 0: [ 005.379673 ], STAT_NEG_RES_204x196
    -- FAX handle 0: [ 005.379687 ], STAT_NEG_A4
    -- FAX handle 0: [ 005.379699 ], STAT_INFO_TSI
    -- FAX handle 0: [ 005.379746 ], STAT_INFO_DCS
    -- FAX handle 0: [ 007.405761 ], STAT_EVT_TX_V21_DONE   st: WT_DIS       rt: WDISNT21
    -- FAX handle 0: [ 010.644098 ], STAT_EVT_TX_TRN_END    st: WT_TRN_RESP  rt: XXXXNT21
    -- FAX handle 0: [ 012.480223 ], STAT_FRM_CFR
    -- FAX handle 0: [ 012.480266 ], STAT_EVT_CFR           st: WT_TRN_RESP  rt: WTTNNCFR
    -- FAX handle 0: [ 012.480290 ], P30EVN_PHASE_C
    -- FAX handle 0: [ 012.480304 ], P30EVN_DOC_START
    -- FAX handle 0: [ 012.480316 ], P30EVN_PAGE_START
    -- FAX handle 0: [ 012.769342 ], STAT_EVT_TX_IMG_STRT   st: SEND_IMAGE   rt: XXXXNTIB
    -- FAX handle 0: [ 013.210220 ], STAT_EVT_TX_IMG_END    st: SEND_IMAGE   rt: XIMGNETI
    -- FAX handle 0: [ 013.210252 ], P30EVN_PAGE_END
    -- FAX handle 0: [ 013.210267 ], P30EVN_DOC_END
    -- FAX handle 0: [ 013.210277 ], STAT_EVT_LAST_DOC      st: SEND_IMAGE   rt: XIMGNLST
    -- FAX handle 0: [ 013.210289 ], STAT_FRM_EOP
    -- FAX handle 0: [ 014.399722 ], STAT_EVT_TX_V21_DONE   st: WT_EOP_RSP   rt: XXXXNT21
    -- FAX handle 0: [ 016.420116 ], STAT_FRM_MCF
    -- FAX handle 0: [ 016.420157 ], STAT_EVT_MCF           st: WT_EOP_RSP   rt: WEOPNMCF
    -- FAX handle 0: [ 016.420180 ], P30EVN_PHASE_E
    -- FAX handle 0: [ 016.420191 ], entering CLOSING state
    -- FAX handle 0: [ 016.420197 ], STAT_FRM_DCN
    -- FAX handle 0: [ 017.615292 ], STAT_EVT_TX_V21_DONE   st: SEND_DCN     rt: XDCNNT21
    -- FAX handle 0: [ 020.117389 ], STAT_EVT_HW_CLOSE      st: WT_HW_CLS    rt: WCLSNCLS
    -- FAX handle 0: [ 020.117473 ], STAT_SES_COMPLETE
    -- FAX handle 0: [ 020.117502 ], P30EVN_COMPLETE
    -- Channel 'SIP/fax-00000002' FAX session '2' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x196', transfer rate: '14400', remoteSID: ''
  == Spawn extension (outboundfax, s, 8) exited non-zero on 'SIP/fax-00000002'
    -- Executing [h@outboundfax:1] NoOp("SIP/fax-00000002", "FAXOPT(ecm) : no") in new stack
[Apr 16 22:45:59] NOTICE[29355]: pbx_spool.c:362 attempt_thread: Call completed to Local/106@local
Cybertoy
Newsterisk
 
Posts: 24
Joined: Thu Dec 21, 2006 10:56 pm

Re: SendFax only sending the headers

Postby Cybertoy » Sun Apr 17, 2011 6:28 am

I guess I can answer my own question. The generated TIFF file didn't seem good. I changed the command line to be

Code: Select all
gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg3 -sPAPERSIZE=a4 -g1680x2285 -sOutputFile=$tifname $pdfname


This works better and the FAX went through.
Cybertoy
Newsterisk
 
Posts: 24
Joined: Thu Dec 21, 2006 10:56 pm

Re: SendFax only sending the headers

Postby malcolmd » Mon Apr 18, 2011 11:21 am

What conversion line were you using before? Was it something from our documentation?
Malcolm Davenport
Digium, Inc. | Senior Product Manager
malcolmd
Moves Like Spencer
 
Posts: 3019
Joined: Wed Aug 03, 2005 3:53 pm
Location: Huntsville, AL, US

Re: SendFax only sending the headers

Postby Cybertoy » Mon Apr 18, 2011 1:49 pm

the original code I used was:
Code: Select all
gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sOutputFile=$tifname $pdfname


tiffg3 option did the trick though.
Cybertoy
Newsterisk
 
Posts: 24
Joined: Thu Dec 21, 2006 10:56 pm

Re: SendFax only sending the headers

Postby mwhite41 » Thu Jul 21, 2011 12:08 am

Hi

I'm having a similar problem, using 1.6.2.17, and the Free Asterisk for Fax. Specifically, on p39 of the Digium documentation it suggests using the following gs conversion:

Code: Select all
# gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sPAPERSIZE=a4 -sOutputFile=<dest.tiff> <src.pdf>


This creates a file of the following dimensions: 1728 × 2262; I believe I have the T.38 stuff working OK because I can receive faxes just fine, and sending the fax completes without error, however during the fax transmission I note the following:

Code: Select all
-- Channel 'SIP/engage-fax-0000137e' FAX session '22' started
    -- FAX handle 0: [ 000.000203 ], STAT_EVT_STRT_TX       st: IDLE         rt: IDLENSTX
    -- FAX handle 0: [ 000.000299 ], STAT_EVT_TX_HW_RDY     st: WT_TX_HW_RDY rt: TRDYNHTY
    -- FAX handle 0: [ 000.000379 ], P30EVN_SEND_STARTED
    -- FAX handle 0: [ 008.020939 ], STAT_INFO_NSF
    -- FAX handle 0: [ 008.772259 ], STAT_INFO_CSI
    -- FAX handle 0: [ 009.260681 ], STAT_INFO_DIS
    -- FAX handle 0: [ 009.260694 ], STAT_EVT_DIS           st: WT_DIS       rt: XXXXNDIS
    -- FAX handle 0: [ 009.260701 ], STAT_EVT_REMOTE_RX     st: WT_DIS       rt: WDISNRRX
    -- FAX handle 0: [ 009.260715 ], STAT_NEG_V17_14400
    -- FAX handle 0: [ 009.260718 ], STAT_NEG_MH
    -- FAX handle 0: [ 009.260722 ], STAT_NEG_RES_204x196
    -- FAX handle 0: [ 009.260733 ], STAT_NEG_A4
    -- FAX handle 0: [ 009.260740 ], STAT_INFO_TSI
    -- FAX handle 0: [ 009.260763 ], STAT_INFO_DCS
    -- FAX handle 0: [ 011.281208 ], STAT_EVT_TX_V21_DONE   st: WT_DIS       rt: WDISNT21
    -- FAX handle 0: [ 014.536283 ], STAT_EVT_TX_TRN_END    st: WT_TRN_RESP  rt: XXXXNT21
    -- FAX handle 0: [ 017.879623 ], STAT_FRM_CFR
    -- FAX handle 0: [ 017.879639 ], STAT_EVT_CFR           st: WT_TRN_RESP  rt: WTTNNCFR
    -- FAX handle 0: [ 017.879650 ], P30EVN_PHASE_C
    -- FAX handle 0: [ 017.879654 ], P30EVN_DOC_START
    -- FAX handle 0: [ 017.879658 ], P30EVN_PAGE_START
    -- FAX handle 0: [ 018.161020 ], STAT_EVT_TX_IMG_STRT   st: SEND_IMAGE   rt: XXXXNTIB
    -- FAX handle 0: [ 019.250115 ], STAT_EVT_TX_IMG_END    st: SEND_IMAGE   rt: XIMGNETI
    -- FAX handle 0: [ 019.250137 ], P30EVN_PAGE_END
    -- FAX handle 0: [ 019.250143 ], P30EVN_DOC_END
    -- FAX handle 0: [ 019.250147 ], STAT_EVT_LAST_DOC      st: SEND_IMAGE   rt: XIMGNLST
    -- FAX handle 0: [ 019.250153 ], STAT_FRM_EOP
    -- FAX handle 0: [ 020.441321 ], STAT_EVT_TX_V21_DONE   st: WT_EOP_RSP   rt: XXXXNT21
    -- FAX handle 0: [ 023.999693 ], STAT_FRM_MCF
    -- FAX handle 0: [ 023.999708 ], STAT_EVT_MCF           st: WT_EOP_RSP   rt: WEOPNMCF
    -- FAX handle 0: [ 023.999715 ], P30EVN_PHASE_E
    -- FAX handle 0: [ 023.999720 ], entering CLOSING state
    -- FAX handle 0: [ 023.999722 ], STAT_FRM_DCN
    -- FAX handle 0: [ 025.187442 ], STAT_EVT_TX_V21_DONE   st: SEND_DCN     rt: XDCNNT21
    -- FAX handle 0: [ 027.697224 ], STAT_EVT_HW_CLOSE      st: WT_HW_CLS    rt: WCLSNCLS
    -- FAX handle 0: [ 027.697331 ], STAT_SES_COMPLETE
    -- FAX handle 0: [ 027.697340 ], P30EVN_COMPLETE
    -- Channel 'SIP/engage-fax-0000137e' FAX session '22' is complete, result: 'SUCCESS' (FAX_SUCCESS), error: 'NO_ERROR', pages: 1, resolution: '204x196', transfer rate: '14400', remoteSID: 'FAX'


In other words, it is sent as a 204 x 196 image - FAXOPT(resolution) : 204x196 is reported afterwards.

Elsewhere, I found a note on Noojee's site to the effect that (and this is for their fax management product):

"please note that the TIFF files used for faxing MUST be in the correct format (1728X1078, min-is-white)"

This didn't make huge amounts of sense so I went to p40 of the Digium documentation and added "-g1680x2285" to the gs incantation as follows:

Code: Select all
# gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sPAPERSIZE=a4 -g1680x2285
-sOutputFile=<dest.tiff> <src.pdf>


The resulting TIFF file looks OK, but finder in OS X reports the resolution as 1728 × 2285, and when I try and send the fax it again transmits successfully but is received as a fairly pointless 204x196 image.

Any clues to whether this should really be working? Is there a different gs incantation that should work?

Thanks in advance,

Mark
mwhite41
Newsterisk
 
Posts: 14
Joined: Tue Sep 01, 2009 7:06 am


Return to Fax For Asterisk

Who is online

Users browsing this forum: Google [Bot] and 1 guest