mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
feat: play verb url support single or array list url (#158)
* feat: update time-series 0.11.12 * feat: support play verb url in plain text or array * fix: review comment Co-authored-by: Dave Horton <daveh@beachdognet.com>
This commit is contained in:
@@ -541,6 +541,9 @@ class Conference extends Task {
|
||||
}
|
||||
this.logger.debug(`Conference:_playHook: executing ${tasks.length} tasks`);
|
||||
|
||||
/* we might have been killed while off fetching waitHook */
|
||||
if (this.killed) return [];
|
||||
|
||||
if (tasks.length > 0) {
|
||||
this._playSession = new ConfirmCallSession({
|
||||
logger: this.logger,
|
||||
|
||||
@@ -24,7 +24,13 @@ class TaskPlay extends Task {
|
||||
while (!this.killed && (this.loop === 'forever' || this.loop--) && this.ep.connected) {
|
||||
if (cs.isInConference) {
|
||||
const {memberId, confName, confUuid} = cs;
|
||||
await this.playToConfMember(this.ep, memberId, confName, confUuid, this.url);
|
||||
if (Array.isArray(this.url)) {
|
||||
for (const playUrl of this.url) {
|
||||
await this.playToConfMember(this.ep, memberId, confName, confUuid, playUrl);
|
||||
}
|
||||
} else {
|
||||
await this.playToConfMember(this.ep, memberId, confName, confUuid, this.url);
|
||||
}
|
||||
}
|
||||
else await ep.play(this.url);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
},
|
||||
"leave": {
|
||||
"properties": {
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
"hangup": {
|
||||
@@ -96,7 +96,7 @@
|
||||
},
|
||||
"play": {
|
||||
"properties": {
|
||||
"url": "string",
|
||||
"url": "string|array",
|
||||
"loop": "number|string",
|
||||
"earlyMedia": "boolean"
|
||||
},
|
||||
@@ -514,7 +514,7 @@
|
||||
"properties": {
|
||||
"enable": "boolean",
|
||||
"voiceMs": "number",
|
||||
"mode": "number"
|
||||
"mode": "number"
|
||||
},
|
||||
"required": [
|
||||
"enable"
|
||||
@@ -536,7 +536,7 @@
|
||||
"noSpeechTimeoutMs": "number",
|
||||
"decisionTimeoutMs": "number",
|
||||
"toneTimeoutMs": "number",
|
||||
"greetingCompletionTimeoutMs": "number"
|
||||
"greetingCompletionTimeoutMs": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user