From 0862416eba98f19e19bb48c0cc6633d85c84e56a Mon Sep 17 00:00:00 2001 From: Hoan HL Date: Thu, 20 Nov 2025 13:13:26 +0700 Subject: [PATCH] fix cannot get register username/password --- 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 97c5a6f..23e49fb 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -273,7 +273,6 @@ class CallSession extends Emitter { } if (this.req.canceled) throw new Error('call canceled'); - const {gateway} = this.req.locals; // now send the INVITE in towards the feature servers debug(`sending INVITE to ${proxy} with ${uri}`); @@ -334,6 +333,7 @@ class CallSession extends Emitter { }); // passing gateway outbound auth that sbc-inbound can send RE-INVITE with authentication process on UAS side + const {gateway} = this.req.locals; if (gateway.register_username && gateway.register_password) { this.logger.info('passing outbound gateway auth to CallSession for reinvite processing'); uas.auth = {