diff --git a/lib/tasks/config.js b/lib/tasks/config.js index 0addfcc8..7efc2c20 100644 --- a/lib/tasks/config.js +++ b/lib/tasks/config.js @@ -34,7 +34,8 @@ class TaskConfig extends Task { 'finishOnKey', 'input', 'numDigits', 'minDigits', 'maxDigits', 'interDigitTimeout', 'bargein', 'dtmfBargein', 'minBargeinWordCount', 'actionHook' ].forEach((k) => { - if (this.bargeIn[k]) this.gatherOpts[k] = this.bargeIn[k]; + const val = this.bargeIn[k]; + if (val !== undefined && val !== null) this.gatherOpts[k] = val; }); } if (this.transcribe?.enable) { @@ -295,7 +296,7 @@ class TaskConfig extends Task { voiceMs: this.vad.voiceMs || 250, silenceMs: this.vad.silenceMs || 150, strategy: this.vad.strategy || 'one-shot', - mode: this.vad.mod || 2 + mode: (this.vad.mode !== undefined && this.vad.mode !== null) ? this.vad.mode : 2 }; } }