mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 09:08:02 +00:00
feat moh
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user