[Asterisk-Users] fax still fails, ideas sought! Re: rxfax/spa ndsp fails to decode

Stephen J. Wilcox steve at telecomplete.co.uk
Wed Jul 14 07:43:09 MST 2004


Hi Steve,
 not boring at all, I'm out of ideas and I'm not clued up about how to look into
this problem further so your suggestion is appreciated.

Looking into /proc/zaptel/1 what am I looking for?
# more /proc/zaptel/1 
Span 1: WCT1/0 "Digium Wildcard E100P E1/PRA Card 0" HDB3/CCS/CRC4 ClockSource 
           1 WCT1/0/1 ClearChannel (In use) 
<snip repeated 2-15>
          16 WCT1/0/16 HDLCFCS (In use) 
          17 WCT1/0/17 ClearChannel 
<snip repeated 18-31>

Listening to audio isnt something that I think I will be able to diagnose, I'll 
give it a go but it'll sound like a fax machine to me ;) [now, give me v90 any 
day and i'll tell you whats going on! ;) ]

I'm testing from the office fax machine which is used a lot all the time and 
never has problems, I tried the tpc.int and the fax comes thro fine.

Hmm so what is that telling me? The office fax really does send dozens of faxes 
per day with no failures

Looking at the debug output of the two, heres the ey differences:

"Slow carrier up
Slow carrier down" - prior to start receiving, altho slow carrier up is shown in 
both a couple times once transmission begins.

The good one goes into 'start rx document' but the bad one seems to keep trying 
to train.. i have put a diff in below .. is there anything useful here?

Thanks for any help!

Steve

# diff fax-good-tpc.int fax-bad-office 
1c1
<     -- Executing RxFAX("Zap/1-1", 
"/var/spool/asterisk/faxes/20040714-140202.tif") in new stack
---
>     -- Executing RxFAX("Zap/2-1", 
"/var/spool/asterisk/faxes/20040714-143316.tif") in new stack
2a3,4
> Slow carrier up
> Slow carrier down
22c24
< <<< TSI: 43 74 65 6e 72 65 74 6e 49 20 6e 6f 6d 65 44 20 20 20 20 20 20
---
> <<< TSI: 43 31 37 31 31 36 35 34 35 34 38 30 20 20 20 20 20 20 20 20 20
24,25c26,27
< Remote fax gave TSI as: "Demon Internet"
< <<< DCS: 83 00 46 f0 00
---
> Remote fax gave TSI as: "08454561171"
> <<< DCS: 83 00 86 90 00
31c33
< R8x7.7lines/mm and/or 200x200pels/25.4mm OK
---
> 2D coding OK
34c36
< Minimum scan line time: 0ms
---
> Minimum scan line time: 5ms
39a42,49
> Coarse carrier frequency 1698.91 (60)
> Training error 93.312809
> Training succeeded (constellation mismatch 48.327239)
> Fast carrier trained
> Fast carrier down
> Trainability test failed - longest run of zeros was 23
> >>> FTT: 44
> Fast carrier up
44,46c54,56
< Coarse carrier frequency 1700.20 (56)
< Training error 5.448260
< Training succeeded (constellation mismatch 13.584253)
---
> Coarse carrier frequency 1699.55 (60)
> Training error 61.497972
> Training succeeded (constellation mismatch 40.535409)
49,55c59,60
< Changed from phase 5 to 4
< Start rx document - compression 1
< Start rx page
< >>> CFR: 84
< HDLC underflow in state 5
< Post trainability
< Changed from phase 4 to 5
---
> Trainability test failed - longest run of zeros was 31
> >>> FTT: 44
61,63c66,68
< Coarse carrier frequency 1700.15 (56)
< Training error 5.155357
< Training succeeded (constellation mismatch 11.403019)
---
> Coarse carrier frequency 1700.09 (60)
> Training error 46.800474
> Training succeeded (constellation mismatch 33.977520)
65,71d69
< Fax3Decode1D: Warning, (FakeInput): Premature EOL at scanline 2155 (got 0, 
expected 1728).
< Page 1 of /var/spool/asterisk/faxes/20040714-140202.tif:
< 2156 rows received
< 0 total bad rows
< 0 max consecutive bad rows
< Rx page end detected
< Changed from phase 5 to 3
73,81c71,72
< Slow carrier up
< <<< MPS: 4f
< MPS with final frame tag
< In state 5
< Changed from phase 3 to 4
< Start rx page
< >>> MCF: 8c
< HDLC underflow in state 7
< Changed from phase 4 to 5
---
> Trainability test failed - longest run of zeros was 77
> >>> FTT: 44
87,113c78,80
< Coarse carrier frequency 1700.20 (56)
< Training error 6.299062
< Training succeeded (constellation mismatch 14.358997)
< Fast carrier trained
< Fax3Decode1D: Warning, (FakeInput): Premature EOL at scanline 2155 (got 0, 
expected 1728).
< Page 2 of /var/spool/asterisk/faxes/20040714-140202.tif:
< 2156 rows received
< 0 total bad rows
< 0 max consecutive bad rows
< Rx page end detected
< Changed from phase 5 to 3
< Slow carrier up
< <<< EOP: 2f
< EOP with final frame tag
< In state 5
< Changed from phase 3 to 4
< >>> MCF: 8c
< HDLC underflow in state 8
< Changed from phase 4 to 3
< Slow carrier up
< <<< DCN: fb
< DCN with final frame tag
< In state 8
< Disconnecting
< Changed from phase 3 to 7
< Changed from phase 7 to 8
<     -- Channel 0/1, span 1 got hangup
---
> Coarse carrier frequency 1808.78 (4)
> Fast carrier down
>     -- Channel 0/2, span 1 got hangup




On Tue, 13 Jul 2004, Steve Hanselman wrote:

> Sorry to bore you more with the clock issue, but have you check
> /proc/zaptel/<span> to make sure it's not missing interrupts?
> 
> There's also an option to record the audio for the fax, you could listen to
> that vs a recorded file that will receive correctly on a fax machine and see
> whether there is an obvious difference? (Good luck, that'll be really
> scraping the barrel!!)
> 
> Does it matter where you're faxing from?  (I'm wondering whether there's an
> issue with a specific machine? (You can use http://www.tpc.int to send test
> faxes, you'll get some extra info if a fax fails as to why in the
> transmission report).
> 
> Can you successfully send faxes out from your system, what do they look like
> at the remote end?
> 
> Steve
> 
> 
> -----Original Message-----
> From: Stephen J. Wilcox [mailto:steve at telecomplete.co.uk] 
> Sent: 13 July 2004 18:12
> To: asterisk-users at lists.digium.com
> Subject: [Asterisk-Users] fax still fails, ideas sought! Re: rxfax/spandsp
> fails to decode
> 
> Okay having taken in some suggestions and googled this topic to death I'm
> still 
> stuck - anyone got any ideas?
> 
> To recap, the faxes are coming in via a digium E1 card but failing to train 
> properly or if they manage it sending a garbled and very truncated fax.
> 
> A number of folks have suggested clock sync issues.. my zaptel.conf is set
> to 
> use the PRI as primary clock, i have no evidence of issues altho dont know
> how 
> to check (other than the call quality is fine, no clicks, no pri down/ups).
> 
> What can i try?
> 
> Steve
> 
> On Mon, 12 Jul 2004, Stephen J. Wilcox wrote:
> 
> > Hi,
> >  I just sent this to Steve Underwood, but then found a bunch of posts on
> the
> > mailing list about similar issues.. does anyone have the fix?
> > 
> > I'm running asterisk CVS-HEAD-06/28/04-18:13:13, spandsp 0.0.1k, libtif
> 3.5.7
> > 
> > one thing i just noticed is that calls come in with format '72' which is
> > G711A-law or LinearPCM.. it uses PCM for the call, i assume this is ok
> > 
> > the results of RxFAX vary, it sometimes saves the file in which case i get
> 
> > errors: 
> > Fax3Decode2D: Warning, (FakeInput): Line length mismatch at scanline 0
> (got 
> > 2383, expected 1728).
> > Fax3Decode2D: (FakeInput): Bad code word at scanline 1 (x 137).
> > 
> > and the resulting tif looks to be only a few rows long
> > 
> > or more commonly it just fails entirely.. i paste the output below so you
> can 
> > see. is there anything obvious i'm doign wrong here?
> > 
> > TIA! Steve.
> > 
> >     -- Executing RxFAX("Zap/1-1", 
> > "/var/spool/asterisk/faxes/20040712-183339.tif") in new stack
> > Changed from phase 0 to 1
> > Start receiving document
> > Changed from phase 1 to 4
> > Sending ident
> > >>> CSI: 40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
> > DIS:
> > Preferred octets: 256
> > Can receive fax
> > Supported data signalling rates: V.27ter and V.29
> > R8x7.7lines/mm and/or 200x200pels/25.4mm OK
> > 2D coding OK
> > Scan line length: 215mm
> > Recording length: A4 (297mm)
> > Receiver's minimum scan line time: 0ms at 3.85 l/mm: T7.7 = T3.85
> > R8x15.4lines/mm OK
> > Minimum scan line time for higher resolutions: T15.4 = T7.7
> > >>> DIS: 80 00 ce f0 80 80 01
> > HDLC underflow in state 9
> > Changed from phase 4 to 3
> > Slow carrier up
> > <<< TSI: 43 31 37 31 31 36 35 34 35 34 38 30 20 20 20 20 20 20 20 20 20
> > TSI without final frame tag
> > Remote fax gave TSI as: "xxxx"
> > <<< DCS: 83 00 86 90 00
> > DCS with final frame tag
> > In state 9
> > DCS:
> > Can receive fax
> > Selected data signalling rate: V.29, 9600bps
> > 2D coding OK
> > Scan line length: 215mm
> > Recording length: A4 (297mm)
> > Minimum scan line time: 5ms
> > Get at 9600
> > Changed from phase 3 to 5
> > Fast carrier up
> > Fast carrier down
> > Fast carrier up
> > Coarse carrier frequency 1699.90 (64)
> > Training error 56.874846
> > Training succeeded (constellation mismatch 44.212022)
> > Fast carrier trained
> > Fast carrier down
> > Trainability test failed - longest run of zeros was 14
> > >>> FTT: 44
> > Fast carrier up
> > Training failed (sequence failed)
> > Fast carrier training failed
> > Fast carrier down
> > Fast carrier up
> > Coarse carrier frequency 1700.33 (64)
> > Training error 51.989152
> > Training succeeded (constellation mismatch 37.988826)
> > Fast carrier trained
> > Fast carrier down
> > Trainability test failed - longest run of zeros was 15
> > >>> FTT: 44
> > Fast carrier up
> > Training failed (sequence failed)
> > Fast carrier training failed
> > Fast carrier down
> > Fast carrier up
> > Coarse carrier frequency 1700.32 (64)
> > Training error 60.898646
> > Training succeeded (constellation mismatch 46.138793)
> > Fast carrier trained
> > Fast carrier down
> > Trainability test failed - longest run of zeros was 17
> > >>> FTT: 44
> > Fast carrier up
> > Training failed (sequence failed)
> > Fast carrier training failed
> > Fast carrier down
> > Fast carrier up
> > Coarse carrier frequency 1795.61 (4)
> > Fast carrier down
> > Fast carrier up
> > Coarse carrier frequency 1789.60 (4)
> > Fast carrier down
> >     -- Channel 0/1, span 1 got hangup
> >     -- Hungup 'Zap/1-1'
> > 
> > 
> > 
> > 
> > 
> > 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> The information contained in this email is intended for the personal and confidential use
> of the addressee only. It may also be privileged information. If you are not the intended
> recipient then you are hereby notified that you have received this document in error and
> that any review, distribution or copying of this document is strictly prohibited. If you have 
> received  this communication in error, please notify Brendata immediately on: 
> 
> +44 (0)1268 466100, or email 'technical at brendata.co.uk' 
> 
> Brendata (UK) Ltd
> Nevendon Hall, Nevendon Road, Basildon, Essex. SS13 1BX  UK
> Registered Office as above. Registered in England No. 2764339
> 
> See our current vacancies at www.brendata.co.uk
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 





More information about the asterisk-users mailing list