fixed updateCall cannot response 202 Accepted (#451)

This commit is contained in:
Hoan Luu Huu
2025-05-21 19:13:04 +07:00
committed by GitHub
parent cd6772c10f
commit 0c2f5becdc

View File

@@ -1065,8 +1065,15 @@ const updateCall = async(req, res) => {
logger.error(`Error sending updateCall POST to ${url}`);
return res.sendStatus(500);
}
const body = await response.json();
return res.status(200).json(body);
if (response.status === 200) {
// feature server return json for sip_request command
// with 200 OK
const body = await response.json();
return res.status(200).json(body);
} else {
// rest commander returns 202 Accepted for all other commands
return res.sendStatus(response.status);
}
}
else {
logger.debug(`updateCall: call not found for call sid ${callSid}`);