From 3909ca18a8ea69437ade6c7058dc68a702be66dc Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Wed, 15 Apr 2020 08:18:16 -0400 Subject: [PATCH] bugfix for #15: dialMusic not played on A leg when direction is outbound --- lib/tasks/dial.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tasks/dial.js b/lib/tasks/dial.js index b05c7c73..1b036a2d 100644 --- a/lib/tasks/dial.js +++ b/lib/tasks/dial.js @@ -123,6 +123,9 @@ class TaskDial extends Task { } else { this.epOther = cs.ep; + if (this.dialMusic && this.epOther && this.epOther.connected) { + this.epOther.play(this.dialMusic).catch((err) => {}); + } } this._installDtmfDetection(cs, this.epOther, this.parentDtmfCollector); await this._attemptCalls(cs);