[Asterisk-Users] Re: TDM users: modified zttest.c for testing

Rich Adamson radamson at routers.com
Wed May 4 06:04:53 MST 2005


> > It would be very interesting to see everyone's results in running
> > this, and even more interesting to report the results with the OS
> > distro in use, mobo in use (if known), etc. If anyone actually
> > get's a result that is very close to 1.000 seconds, I'd really
> > like to know more about those systems. (email off list is fine
> > if you want.)
> 
> Details below; Fedora Core 1. I also tried using "nice" to raise the
> process priority, but it made no difference.
> 
> [root at softins zaptel]# ./zttest-mod -v
> Objective: to read 8192 bytes from TDM card in 1.000000 seconds.
> Opened pseudo zap interface, measuring accuracy...
> 
> 8192 bytes in 1.023981 seconds
> 8192 bytes in 1.023995 seconds
> 8192 bytes in 1.023992 seconds
> 8192 bytes in 1.023996 seconds
> 8192 bytes in 1.023991 seconds
> 8192 bytes in 1.023994 seconds
> 8192 bytes in 1.023992 seconds
> 8192 bytes in 1.023994 seconds
> 8192 bytes in 1.024003 seconds
> 8192 bytes in 1.023986 seconds
> 8192 bytes in 1.023992 seconds
> 8192 bytes in 1.023993 seconds
> 8192 bytes in 1.023994 seconds
> 8192 bytes in 1.023993 seconds
> 8192 bytes in 1.023993 seconds
> 8192 bytes in 1.023995 seconds
> 8192 bytes in 1.023992 seconds
> 8192 bytes in 1.023995 seconds
> 8192 bytes in 1.023992 seconds
> 8192 bytes in 1.023993 seconds
> --- Results after 20 passes ---
> Best: 1.024003 -- Worst: 1.023981 -- Average: 1.023993
> 
> This looks very close to 1024ms instead of 1000ms. That got me thinking:
> 
> I believe your premise is wrong. The sample rate of telephony audio
> is 8kHz. With 8-bit samples (uLaw or aLaw), that means 8000 bytes
> should be supplied in 1 second, not 8192.
> 
> At a rate of 8000 bytes/sec, 8192 bytes will arrive in 1.024 seconds.

That makes a lot of sense and also supports the reported numbers that
folks are posting.

Can we actually _assume_ 8000 bytes/sec though? In other words, is
there something more in the inbound frame (besides pcm audio) to
indicate which of 4 ports the data belongs to, etc?





More information about the asterisk-users mailing list