From bb9c3a8df0dfba59497c28a13154c7688e6d2267 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 12 Jul 2022 09:56:13 +0200 Subject: [PATCH] createCall: return callId along with sid --- lib/http-routes/api/create-call.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/http-routes/api/create-call.js b/lib/http-routes/api/create-call.js index 05aafe4a..8fdb3089 100644 --- a/lib/http-routes/api/create-call.js +++ b/lib/http-routes/api/create-call.js @@ -197,9 +197,10 @@ router.post('/', async(req, res) => { }); cs.exec(req); - res.status(201).json({sid: cs.callSid}); + res.status(201).json({sid: cs.callSid, callId: inviteReq.get('Call-ID')}); - sipLogger.info(`outbound REST call attempt to ${JSON.stringify(target)} has been sent`); + sipLogger.info({sid: cs.callSid, callId: inviteReq.get('Call-ID')}, + `outbound REST call attempt to ${JSON.stringify(target)} has been sent`); }, cbProvisional: (prov) => { const callStatus = prov.body ? CallStatus.EarlyMedia : CallStatus.Ringing;