diff --git a/lib/utils/background-task-manager.js b/lib/utils/background-task-manager.js index 60fde746..3a427c10 100644 --- a/lib/utils/background-task-manager.js +++ b/lib/utils/background-task-manager.js @@ -103,6 +103,7 @@ class BackgroundTaskManager extends Emitter { async _initBargeIn(opts) { let task; try { + const copy = JSON.parse(JSON.stringify(opts)); const t = normalizeJambones(this.logger, [opts]); task = makeTask(this.logger, t[0]); task @@ -121,7 +122,7 @@ class BackgroundTaskManager extends Emitter { if (task.sticky && !this.cs.callGone && !this.cs._stopping) { this.logger.info('BackgroundTaskManager:_initBargeIn: restarting background bargeIn'); this._bargeInHandled = false; - this.newTask('bargeIn', opts, true); + this.newTask('bargeIn', copy, true); } return; })