[Asterisk-Dev] jitterbuf timestamps range

Steve Kann stevek at stevek.com
Tue May 10 06:45:18 MST 2005


Slav Klenov wrote:

> Hi all,
>
> According to the RTP RFC the timestamp field of an rtp frame is 32 bit.
> Looking at rtp.c in * we see all timestamp related fields to be 
> defined unsigned long, instead of long in jitterbuf.h.
>
> I have never seen any SIP phone generating timestamps larger that 
> MAX_LONG, but actually I haven't much
> experience with many phones...
>
> Couldn't this causes any problems and shouldn't timestamps in 
> jitterbuf be defined unsigned long?
>
RTP timestamps are usually not in milliseconds, are they?  (i.e. don't 
they generally use a 90khz clock, etc?).  If they use a timebase more 
than 2Khz, then none of this matters, as the 32bit RTP timestamp will 
flip before the jitterbuffer's timestamps will flip..

I'm not sure why I chose long for all the timestamping, etc, in the 
jitterbuffer, and I haven't really examined what, exactly, will happen 
when they overflow, however overflow on a 32-bit system will happen 
after 596 hours (24.85 days).   It seems like something to think about 
eventually, but calls that last longer than 24 days seem pretty unusual 
(and, who knows how asterisk itself handles this).

-SteveK




More information about the asterisk-dev mailing list