correct pare callRecording headers from sip info (#110)

This commit is contained in:
Hoan Luu Huu
2023-07-20 20:02:04 +07:00
committed by GitHub
parent 17df3a4ca8
commit b1296c8e89

View File

@@ -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');