From 9ad7dc76c76e213856ef9fe7253a843c7528e098 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Fri, 17 May 2024 07:21:19 -0400 Subject: [PATCH] fix for #133 (#134) --- lib/call-session.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/call-session.js b/lib/call-session.js index 6eb7df1..e0d8bb0 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -188,6 +188,7 @@ class CallSession extends Emitter { this.rtpEngineResource = {destroy: this.del.bind(null, this.rtpEngineOpts.common)}; let proxy, uris = []; const mapGateways = new Map(); + let encryptedMedia = false; try { // determine where to send the call @@ -325,6 +326,7 @@ class CallSession extends Emitter { */ this.logger.info({u}, `using SRTP for outbound call, pad crypto: ${o.pad_crypto ? 'yes' : 'no'}`); this.rtpEngineOpts = makeRtpEngineOpts(this.req, false, true, o.pad_crypto, true); + encryptedMedia = true; } }); // Check private network for each gw @@ -530,6 +532,7 @@ class CallSession extends Emitter { // these are all final failure scenarios if (uris.length === 0 || // exhausted all targets earlyMedia || // failure after early media + encryptedMedia || // cant crank back when using encrypted media as keys have been exchanged !(err instanceof SipError) || // unexpected error err.status === 487) { // caller hung up