mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-22 01:27:55 +00:00
gather: dont send webhook if call is gone
This commit is contained in:
@@ -226,6 +226,7 @@ class TaskGather extends Task {
|
|||||||
if (this.vad?.enable) {
|
if (this.vad?.enable) {
|
||||||
opts.START_RECOGNIZING_ON_VAD = 1;
|
opts.START_RECOGNIZING_ON_VAD = 1;
|
||||||
if (this.vad.voiceMs) opts.RECOGNIZER_VAD_VOICE_MS = this.vad.voiceMs;
|
if (this.vad.voiceMs) opts.RECOGNIZER_VAD_VOICE_MS = this.vad.voiceMs;
|
||||||
|
else opts.RECOGNIZER_VAD_VOICE_MS = 125;
|
||||||
if (this.vad.mode >= 0 && this.vad.mode <= 3) opts.RECOGNIZER_VAD_MODE = this.vad.mode;
|
if (this.vad.mode >= 0 && this.vad.mode <= 3) opts.RECOGNIZER_VAD_MODE = this.vad.mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,6 +438,8 @@ class TaskGather extends Task {
|
|||||||
|
|
||||||
async _resolve(reason, evt) {
|
async _resolve(reason, evt) {
|
||||||
if (this.resolved) return;
|
if (this.resolved) return;
|
||||||
|
if (this.callSession && this.callSession.callGone) return;
|
||||||
|
|
||||||
this.resolved = true;
|
this.resolved = true;
|
||||||
this.logger.info(`TaskGather:resolve with reason ${reason}`);
|
this.logger.info(`TaskGather:resolve with reason ${reason}`);
|
||||||
clearTimeout(this.interDigitTimer);
|
clearTimeout(this.interDigitTimer);
|
||||||
|
|||||||
Reference in New Issue
Block a user