From 0dd93063afbe9f40a1d7b1be0b09ce242ad29441 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Thu, 20 Jul 2023 19:40:35 +0700 Subject: [PATCH] correct pare callRecording headers from sip info --- 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 121a75e..366b8b3 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -691,7 +691,7 @@ Duration=${payload.duration} ` const to = this.req.getParsedHeader('To'); const aorFrom = from.uri; const aorTo = to.uri; - const headers = contentType === 'application/json' && req.body.headers ? req.body.headers : {}; + const headers = contentType === 'application/json' && req.body ? JSON.parse(req.body) : {}; this.logger.info({to, from}, 'startCallRecording request for a call'); const srsUrl = req.get('X-Srs-Url');