Open garryavx opened 2 years ago
I am. so confused.
I asked a friend to help and he suggested commenting out part of line 209 to set it to null.
var call = "";
instead of
var call = db.get(e.getHeader('Unique-ID'));
and now it works.
also my output in the console still has Unique-IDs and homer seems to ingest all the data fine and show everything...?
The bug is related to calls not existing in DB and receiving a RTCP event related to it, the uuid of the call in event is not in db so no call is found and the call variable is undefined, this will happen for calls created before starting the script. The issue can be fixed like this:
var getRTCPMessage = function (e, xcid, hep_id, hep_pass) {
var call = db.get(e.getHeader('Unique-ID'));
if(!call){
console.log('call not found in db!',e.getHeader('Unique-ID'));
return;
}
and
if (report_rtcp_events) {
if (e.getHeader('Event-Name') == 'RECV_RTCP_MESSAGE' || e.getHeader('Event-Name') == 'SEND_RTCP_MESSAGE') {
if (e.getHeader('Source0-SSRC') || e.getHeader('Source-SSRC')) {
if (debug) console.log('Processing RTCP Report...', e);
var message = getRTCPMessage(e, xcid, hep_id, hep_pass);
if(message){
callback_preHep(message);
}
}
}
}
@babakyakhchali this fix issue. Does it possible to create a PR with that fix?
I was having issues with my hepipe.js, so I deleted and recloned the repo. installed with npm, setup my config I'm just capturing rtcp events from the ESL
my config is:
when I run with nodejs hepipe.js it runs for a bit then I get this: