diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 9f23dd2c..f86bf3e7 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -667,7 +667,7 @@ class CallSession extends Emitter { } } - if (0 === this.tasks.length && this.hasStableDialog && this.requestor instanceof WsRequestor) { + if (0 === this.tasks.length && this.requestor instanceof WsRequestor && !this.callGone) { let span; try { const {span} = this.rootSpan.startChildSpan('waiting for commands'); @@ -678,7 +678,7 @@ class CallSession extends Emitter { 'async.request.command': command }); span.end(); - if (!this.hasStableDialog || this.callGone) break; + if (this.callGone) break; } catch (err) { span.end(); this.logger.info(err, 'CallSession:exec - error waiting for new commands');