mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
fixed does not send final status call back if call canceled quickly (#1393)
* fixed callsession should cleanup resource if call was canceled while fetching app * wip * wip * wip * wip * wip
This commit is contained in:
@@ -112,6 +112,14 @@ module.exports = function(srf, logger) {
|
||||
req.locals.callingNumber = sipURIs[1];
|
||||
}
|
||||
}
|
||||
|
||||
// Feature server INVITE request pipelines taking time to finish,
|
||||
// while connecting and fetch application from db and invoking webhook.
|
||||
// call can be canceled without any handling, so we add a listener here
|
||||
req.once('cancel', (sipMsg) => {
|
||||
logger.info(`${callId} got CANCEL request`);
|
||||
req.locals.canceled = true;
|
||||
});
|
||||
next();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user