How can calculate the jitter for VOIP ? (200 --> 400 points for this question)

I search on internet and find some formula for calculating the jiter buffer as following

              The mean deviation of the difference in packet spacing at the receiver
                   Si = the RTP timestamp for packet I
                  Ri = the time of arrival
                  D(i,j) = (Rj-Sj) - (Ri- Si)
             The Jitter is calculated continuously
                 J(i) = J(i-1) + (| D(i-1,i) | - J(i-1))/16

However, I  don't know it is correct or not .
Could some experts give me the formula and show examples in all different cases (have and don't have package lost ...)

Thank for reading .

Note : if it is a very good comment or this is a hard question,
           I will give 200 points bonus ==> 400 points for this question.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

havman56Connect With a Mentor Commented:
from rfc 1889

The code fragments below implement the algorithm given in Section 6.3.1 for calculating an estimate of the statistical variance of the RTP data interarrival time to be inserted in the interarrival jitter field of reception reports. The inputs are r->ts , the timestamp from the incoming packet, and arrival , the current time in the same units. Here s points to state for the source; s->transit holds the relative transit time for the previous packet, and s->jitter holds the estimated jitter. The jitter field of the reception report is measured in timestamp units and expressed as an unsigned integer, but the jitter estimate is kept in a floating point. As each data packet arrives, the jitter estimate is updated:
       int transit = arrival - r->ts;
       int d = transit - s->transit;
       s->transit = transit;
       if (d < 0) d = -d;
       s->jitter += (1./16.) * ((double)d - s->jitter);
When a reception report block (to which rr points) is generated for this member, the current jitter estimate is returned:

       rr->jitter = (u_int32) s->jitter;
Alternatively, the jitter estimate can be kept as an integer, but scaled to reduce round-off error. The calculation is the same except for the last line:

       s->jitter += d - ((s->jitter + 8) >> 4);
In this case, the estimate is sampled for the reception report as:
       rr->jitter = s->jitter >> 4;

Dear thienpnguyen

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept


comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is:

thienpnguyenAuthor Commented:

Your commnet is good. I need to ask you to explain more. However, I am busy at this time . Please , accept 200 points at this time . If I don't have any more question about "jitter buffer" , I will give you remain points .

Thank again.
hai thienpnguyen,

thanks for points...

i worked on VOIP for 6 months . if u have any querry i will try my best to solve.
H245,q931 and RTP are some subjects i can help u.
but RAS in h.225 i dont have any idea.

that to more design oriented question i can help u.

but the answer what i have given here is from RFC 1899 .
All Courses

From novice to tech pro — start learning today.