diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 788b55a7..468d0181 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -684,7 +684,8 @@ class CallSession extends Emitter { } task = await this.backgroundTaskManager.newTask('bargeIn', gather); task.sticky = autoEnable; - task.once('bargeIn-done', () => { + // listen to the bargein-done from background manager + this.backgroundTaskManager.once('bargeIn-done', () => { if (this.requestor instanceof WsRequestor) { try { this.kill(true);