From 6147ec3f6ae40ab3a6bf1c0fb46406fe8e435cd7 Mon Sep 17 00:00:00 2001 From: rhondahollis <82672372+rhondahollis@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:00:05 -0700 Subject: [PATCH] ensure sbcCallId is added to callInfo (#1529) Co-authored-by: rhonda hollis --- lib/http-routes/api/create-call.js | 6 ++++++ lib/utils/place-outdial.js | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/lib/http-routes/api/create-call.js b/lib/http-routes/api/create-call.js index e61c8643..c744b2a0 100644 --- a/lib/http-routes/api/create-call.js +++ b/lib/http-routes/api/create-call.js @@ -340,6 +340,12 @@ router.post('/', } }); connectStream(dlg.remote.sdp); + + /* ensure sbcCallid is set even if no provisional response was received */ + if (!cs.callInfo.sbcCallid && dlg.res.has('X-CID')) { + cs.callInfo.sbcCallid = dlg.res.get('X-CID'); + } + cs.emit('callStatusChange', { callStatus: CallStatus.InProgress, sipStatus: 200, diff --git a/lib/utils/place-outdial.js b/lib/utils/place-outdial.js index b6fcab18..4d6aa4d6 100644 --- a/lib/utils/place-outdial.js +++ b/lib/utils/place-outdial.js @@ -234,6 +234,11 @@ class SingleDialer extends Emitter { await connectStream(this.dlg.remote.sdp, opts.isVideoCall); this.dlg.callSid = this.callSid; this.inviteInProgress = null; + + /* ensure sbcCallid is set even if no provisional response was received */ + if (!this.callInfo.sbcCallid && this.dlg.res.has('X-CID')) { + this.callInfo.sbcCallid = this.dlg.res.get('X-CID'); + } this.emit('callStatusChange', { sipStatus: 200, sipReason: 'OK',