[asterisk-dev] definition of RTP jitter - potential bug in Asterisk

Klaus Darilion klaus.mailinglists at pernau.at
Thu Sep 3 10:33:59 CDT 2009


Hi!

In Asterisk 1.6.2.0-beta4, the jitter is internally calculated in 
seconds (see calc_rxstamp() in main/rtp.c).

When the jitter is sent in RTCP reports, the jitter value is multiplied 
with 65536 (e.g. ast_rtcp_write_sr()).

This value of 65536 is all over rtp.c. Also the received RTCP jitter 
reports are scaled by 65536.

I wonder where this 65536 comes from? RFC 3350 describes the jitter in 
"timestamp units". The RTP timestamps are the sample times, and thus the 
  usual timestamp unit is 1s/8000.

Thus, I think if jitter is computed locally in seconds, the scaling 
should use 8000 instead of 65536.

I also observed that the sent jittervalue differs much from the incoming 
jitter value (e.g. tested with eyebeam and pjsip).

Thus, I think the scaling with 65536 is wrong. If there is a reason why 
65536 is used, please describe.

thanks
Klaus



More information about the asterisk-dev mailing list