[Asterisk-Dev] A pipe length tester for TDM400 cards

Rich Adamson radamson at routers.com
Fri May 13 14:47:39 MST 2005


> I finally put together a simple program for testing what happens to the 
> pipe length out from software, through a TDM400 card, and back to 
> software again. I haven't done much with it yet, or really studied in 
> depth if there are pitfalls in what I have done. However, you can grab 
> the current source from ftp://ftp.soft-switch.org/pub/sliptest.c, and 
> compile it with
> 
>     gcc sliptest.c -lspandsp
> 
> (which, obviously, means you need spandsp installed). When you run it, 
> you need to give it a parameter which is the channel number of a circuit 
> on a TDM400 card. Don't have anything plugged into the card. The 
> software listens to the echo of what it sends. When it runs, it lists 50 
> loop lengths per second. The loop lengths are measured in audio samples.
> 
> The initial results I get are odd. I suspected I might get jumps of 1, 8 
> or 160 samples. These seem to be the significant sizes of things in the 
> zaptel world. However, I get a variety of oddly sized changes, that I 
> haven't yet explained.
> 
> The loop length is evaluated by looking for the peak in the 
> cross-correlation of the Tx and Rx signals. This isn't foolproof, so you 
> may get a few samples which hiccup a little. However consistent changes 
> in loop length are real.
> 
> Treat this code as an interesting (or possibly very dull) experiment, 
> rather than a proof of anything.

Steve,

I ran your app against my tdm04p card just now. Results are as follows:
482
642
802
962
1122
1282
292
447
2559
197
357
518
679
837
995
1158
1319
1477
1637
1799
1957
2117
2277
2439
2257
2201
745
2513
1062
1222
1385
1545
1705
2541
2025
2182
257
417
572
737
898
1052
1217
215
364
535
691
855

This is on a new fedora 3 box with the latest tdm card (rev h) and
nothing else running (including asterisk).

I should note that one has to stop asterisk in order to use the app
to test the card. If asterisk is running, the app errors out.

What does the output actually represent in laymen's terms?

Rich





More information about the asterisk-dev mailing list