when clearing stack on background gather (bargein), search to see if … (#221)

* when clearing stack on background gather (bargein), search to see if there is a config further down the stack that turns bargein off, and if so clear only down to there (#220)

* avoid clearing the stack twice when a background gather bargein occurs

* fix bug from prev commit
This commit is contained in:
Dave Horton
2023-01-19 09:29:17 -05:00
committed by GitHub
parent 33b8bd701d
commit 6149eff373
3 changed files with 33 additions and 11 deletions

View File

@@ -245,7 +245,9 @@ module.exports = function(srf, logger) {
// eslint-disable-next-line no-unused-vars
const {call_hook, call_status_hook, ...appInfo} = app; // mask sensitive data like user/pass on webhook
logger.info({app: appInfo}, `retrieved application for incoming call to ${req.locals.calledNumber}`);
// eslint-disable-next-line no-unused-vars
const {requestor, notifier, ...loggable} = appInfo;
logger.info({app: loggable}, `retrieved application for incoming call to ${req.locals.calledNumber}`);
req.locals.callInfo = new CallInfo({
req,
app: app2,