add support for anchoring media on dial verb

This commit is contained in:
Dave Horton
2023-04-07 14:21:23 -04:00
parent 04003a709e
commit c87dd50313
3 changed files with 15 additions and 12 deletions

View File

@@ -134,10 +134,13 @@ class TaskDial extends Task {
get name() { return TaskName.Dial; }
get canReleaseMedia() {
return !process.env.ANCHOR_MEDIA_ALWAYS &&
!this.listenTask &&
!this.transcribeTask &&
!this.startAmd;
const keepAnchor = this.data.anchorMedia ||
process.env.ANCHOR_MEDIA_ALWAYS ||
this.listenTask ||
this.transcribeTask ||
this.startAmd;
return !keepAnchor;
}
get summary() {