On Fri, 8 Dec 2006, Mike Frantzen wrote: > I realize this isn't strictly Sofia-SIP but it affects the RTP side of > things built on Sofia. > > I've tried two windows clients, SJPhone and X-Lite and both lie about their > bitrate. Both are advertising a PCMU/8000 codec. I watched the RTP packets > in a sniffer and ran the numbers: SJPhone is actually sending 8400 bits per > second (52.5 packets per second) and X-Lite is sending 7800 bits per > second. Both are running on the same windows box with a cheap embedded dell > sound board. The RTP stream with 8400 bits per second is causing a nasty 5%
I'm afraid this will always be the case. The sampling rates are _nominal_ sampling rates, and the real rates depend on the clock signals driving the ADC/DAC circuits. In all practical cases, the clock signals will differ at least slightly between the sender and receiver, so you will always have to prepare for clock drift. Additionally, many VoIP clients utilize other clock sources as well (like the PC system clock) for some things (let's say a separate thread that sends packets). As these clocks also have some error with respect to their reported nominal rates, the app might introduce even more drift to the system ... if the app developer doesn't know what he's doing. ;) Of course, a good client should be able to generate a rate of packets close to the nominal rate, and ideally with minimal change over time. But on general purpose platforms (where the app developer cannot define what audio hardware is used), this is difficult to achieve. In many cases the errors can be significant and RTP receivers just have to be prepared to handle all sorts of timing errors in the incoming RTP stream. > audio latency when discontinuous transmission is turned off; the latency > grows at a rate of 3 seconds per minute since the windows client is sending > 20ms worth of audio every 19.05ms. The extra buffering is eventually fatal > to the audio stream on my N770 when the DSP runs out of buffers (I think). That's (19.05/20) is _pretty_ bad. :( Some el-cheapo soundcards can only reliably produce a few well-known sampling rates (48k is nowadays common for desktop uses), and running the cards with any other rates (like 8k for VoIP) will produce suboptimal timing. Many/most USB soundcards will introduce similar problems as they are not driven by the ADC/DAC clock, but by the USB bus clock. -- under work: Sofia-SIP at http://sofia-sip.sf.net ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Sofia-sip-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
