From 3360ddb3e62260521b135f0f177a9674fefdd929 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 1 Dec 2022 12:36:49 -0500 Subject: [PATCH] bugfix: proper removal of X-Refer-To-Leave-Untouched on outgoing REFER --- lib/call-session.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/call-session.js b/lib/call-session.js index ce1552e..2872b17 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -779,7 +779,7 @@ Duration=${payload.duration} ` const u = parseUri(referredBy.uri); const leaveReferToAlone = req.has('X-Refer-To-Leave-Untouched'); if (leaveReferToAlone) { - this.logger.debug(`passing Refer-To header through untouched: ${referTo}`); + this.logger.debug({referTo}, 'passing Refer-To header through untouched'); } else { const isDotDecimal = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/.test(uri.host); @@ -808,7 +808,7 @@ Duration=${payload.duration} ` // eslint-disable-next-line no-unused-vars 'content-length':contentlength, 'refer-to':_referto, 'referred-by':_referredby, // eslint-disable-next-line no-unused-vars - 'x-refer-to-leave-untouched': _leave, + 'X-Refer-To-Leave-Untouched': _leave, ...customHeaders } = req.headers;