Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore events from calls not in db #1

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions esl-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,13 @@ var eslConnect = function (host, port, pass, callback_preHep) {
var getRTCPMessage = function (e, xcid, hep_id, hep_pass) {
var call = db.get(e.getHeader("Unique-ID"));

// Ignore RTCP events for calls that aren't in the database. This can happen
// if hepipe is just starting up but the telephony service already has calls
// in progress.
if (!call) {
return;
}

Comment on lines +285 to +291
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main change

if (e.getHeader("Event-Name") == "RECV_RTCP_MESSAGE") {
if (!call.recvSSRC) {
call.recvSSRC = e.getHeader("Source0-SSRC");
Expand Down
4 changes: 4 additions & 0 deletions hep-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ module.exports = {
socket = getSocket("udp4");
},
preHep: function (message) {
if (!message) {
return;
}

Comment on lines +36 to +39
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other change.

var rcinfo = message.rcinfo;
var msg = message.payload;
if (
Expand Down