mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-01-25 02:08:24 +00:00
fixed updateCall cannot response 202 Accepted (#451)
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user