From 4cb34ad7849c592bbe3cedd944ec62ddf2ffc925 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 14 Feb 2022 12:11:32 -0500 Subject: [PATCH] regression handling 302 redirect --- lib/call-session.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/call-session.js b/lib/call-session.js index 45851f5..35d76b5 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -125,6 +125,7 @@ class CallSession extends Emitter { if (this.req.locals.registration) { debug(`sending call to registered user ${JSON.stringify(this.req.locals.registration)}`); + const contact = this.req.locals.registration.contact; let destUri = this.req.uri; if (this.req.has('X-Override-To')) { const dest = this.req.get('X-Override-To'); @@ -133,7 +134,6 @@ class CallSession extends Emitter { destUri = stringifyUri(uri); this.logger.info(`overriding destination user with ${dest}, so final uri is ${destUri}`); } - const contact = this.req.locals.registration.contact; if (contact.includes('transport=ws')) { uris = [contact]; }