DAHDI timing source

Hello,
After weeks of fighting with fax reception errors using Hylafax (many bad lines resulting in distorted faxes), I think I’ve found the root of the problem: DAHDI is not getting the timing sources correctly. According to this configuration:

[quote]span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
hardhdlc=16

span=2,0,0,ccs,hdb3
bchan=32-46,48-62
hardhdlc=47

span=3,0,0,ccs,hdb3
bchan=63-77,79-93
hardhdlc=78

span=4,0,0,ccs,hdb3,crc4
bchan=94-108,110-124
hardhdlc=109
[/quote]

Only span 1 should be taken as a clock source. However, after starting DAHDI with this setup and running dahdi_scan, the four spans have “syncsrc=1”.

The card is a Digium TE410P (4x E1 PCI).

Furthermore, I have set up another server with an identical card and I experience the same problem. For instance, if I use this:

[quote]span=1,3,0,ccs,hdb3,crc4
bchan=1-15,17-31
hardhdlc=16

span=2,2,0,ccs,hdb3,crc4
bchan=32-46,48-62
hardhdlc=47

span=3,1,0,ccs,hdb3,crc4
bchan=63-77,79-93
hardhdlc=78

#span=4,0,0,ccs,hdb3,crc4
#bchan=94-108,110-124
#hardhdlc=109
[/quote]

All spans have “syncsrc=3” (including span 4, unconfigured).

It looks like the wct4xxp driver is messing up with this parameter, taking into account only the first spans’ value and then setting up all the spans competing to be the main clock source, using whichever priority number is configured for span 1.

I’m using DAHDI 2.9.1.1 (latest release).

Is there a workaround for this?

This is actually the correct behavior. In your first example it is showing that all the spans on the card are deriving timing from span 1 (which is how you have it setup) and in your second example span 3 is where the timing is coming for the card.

For the way you have it in configured in the first example makes senes, since you typically want to recover the timing clock from your provider, and use that as the source of timing to any downstream devices (those spans you have configured with 0 timing).

Thanks for your quick response. I thought that number was the priority, not the master span.

Back to finding other causes for the noise in my faxes!

Just in case, the noise in the received faxes was a combination of shared IRQ between the Digium card and a NIC and irqbalance not really balancing the load between all four CPUs. Fixed it by using another NIC controller, disabling irqbalance and setting smp_affinity manually.

Ahh, this makes sense if you are using one of the older cards that required 1ms service intervals. Newer TE410 and the TE435 do not have the 1ms interrupts service latency requirement.

You are probably right, these cards (I have two) exhibit the same problem. Anyway, thanks for the previous response, I felt a bit dumb afterwards. I should have tried running “service dahdi status” before posting :laughing: