Summary:ASTERISK-09320: RTCP reports incorrect packet RTT (round trip time) statistics
Reporter:davetroy (davetroy)Labels:
Date Opened:2007-04-26 11:46:49Date Closed:2007-07-11 19:59:05
Versions:Frequency of
Environment:Attachments:( 0) rtp.c.rttfix-patch
Description:The RTCP implementation in rtp.c produces inconsistent values for RTT (round trip time) resulting in oscillating, incorrect data.  The current implementation roughly follows RFC3550 by subtracting the time of the last sender report (LSR) and the delay since the last sender report (DLSR) from the current time, but attempts to convert all values into decimal floats before performing the calculation.

Instead, it is simpler to leave these NTP values as integers (with units of 1/65536 seconds) while performing the calculations, and then convert the final computed RTT value to a decimal float.  This simpler implementation has resulted in consistent and accurate values in our testing and should be used instead.

Additionally, some people have reported negative RTT values, which result from invalid calculation attempts.  These NTP skews are now detected and reported, and the calculation is skipped in these cases.


Issue affects 1.4.3 and trunk.
Comments:By: Russell Bryant (russell) 2007-05-24 09:51:37

This patch has been committed to 1.4 and trunk in revisions 65842 and 65843.  Thanks!