Skip to content

Commit

Permalink
Update esl-client.js
Browse files Browse the repository at this point in the history
I added a variable called msjitter that takes the RTP jitter unit and the RTP_Rate, and converts to seconds, then to MS.

This will need to be added into homer separately, 
sipcapture/homer#516
  • Loading branch information
garryavx committed Jan 14, 2022
1 parent f25d463 commit 68334d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion esl-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ var getRTCPMessage = function (e, xcid, hep_id, hep_pass) {
var lsr = parseInt(e.getHeader('Source0-LSR'));
var iaJitter = parseFloat(e.getHeader('Source0-Jitter'));
var dlsr = parseInt(e.getHeader('Source0-DLSR'));
var msjitter = parseFloat(e.getHeader('Source0-Jitter')) / parseInt(e.getHeader('RTP-Rate')); // convert rtp jitter units into seconds
msjitter = msjitter * 1000; // convert seconds to milliseconds
}

if (e.getHeader('Event-Name') == 'SEND_RTCP_MESSAGE') {
Expand Down Expand Up @@ -319,7 +321,8 @@ var getRTCPMessage = function (e, xcid, hep_id, hep_pass) {
"highest_seq_no": highestSeqNo,
"lsr": lsr,
"ia_jitter": iaJitter,
"dlsr": dlsr
"dlsr": dlsr,
"ms_jitter": msjitter
}],
"sender_information": {
"packets": packets,
Expand Down

0 comments on commit 68334d7

Please sign in to comment.