This commit is contained in:
Quan HL
2023-08-09 12:56:52 +07:00
parent ad722a55ee
commit b5d1d1161a

View File

@@ -137,6 +137,7 @@ class TaskDial extends Task {
get canReleaseMedia() {
const keepAnchor = this.data.anchorMedia ||
this.data.onHoldMusic ||
this.cs.isBackGroundListen ||
ANCHOR_MEDIA_ALWAYS ||
this.listenTask ||
@@ -611,6 +612,16 @@ class TaskDial extends Task {
this.bridged = true;
}
// We have all endpoint available, let set custom on hold Music
if (this.data.onHoldMusic) {
if (this.epOther) {
this.epOther.set({hold_music: `shout://${this.data.onHoldMusic.replace(/^https?:\/\//, '')}`});
}
if (sd.ep) {
sd.ep.set({hold_music: `shout://${this.data.onHoldMusic.replace(/^https?:\/\//, '')}`});
}
}
// ding! ding! ding! we have a winner
await this._selectSingleDial(cs, sd);
this._killOutdials(); // NB: order is important