fix overlapping requests to freeswitch on outdial

This commit is contained in:
Dave Horton
2020-08-03 11:51:30 -04:00
parent 884e63e0ef
commit 2c8c161954
2 changed files with 14 additions and 9 deletions

View File

@@ -154,6 +154,10 @@ class TaskGather extends Task {
this.resolved = true;
this.logger.debug(`TaskGather:resolve with reason ${reason}`);
if (this.ep && this.ep.connected) {
this.ep.stopTranscription().catch((err) => this.logger.error({err}, 'Error stopping transcription'));
}
this._clearTimer();
if (reason.startsWith('dtmf')) {
await this.performAction({digits: this.digitBuffer});