[Asterisk-code-review] app_queue: Allow streaming multiple announcement files (asterisk[master])
N A
asteriskteam at digium.com
Sun Jul 25 16:56:02 CDT 2021
N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16221 )
Change subject: app_queue: Allow streaming multiple announcement files
......................................................................
app_queue: Allow streaming multiple announcement files
Allows multiple files comprising an agent announcement
to be played by separating on the ampersand, similar
to the multi-file support in other Asterisk applications.
ASTERISK-29528
Change-Id: Iec600d8cd5ba14aa1e4e37f906accb356cd7891a
---
M apps/app_queue.c
A doc/CHANGES-staging/app_queue.c
2 files changed, 16 insertions(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/21/16221/1
diff --git a/apps/app_queue.c b/apps/app_queue.c
index d3e0471..26b85c0 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -238,7 +238,13 @@
<parameter name="URL">
<para><replaceable>URL</replaceable> will be sent to the called party if the channel supports it.</para>
</parameter>
- <parameter name="announceoverride" />
+ <parameter name="announceoverride" argsep="&">
+ <argument name="filename" required="true">
+ <para>Announcement file(s) to play to agent before bridging call, overriding the announcement(s)
+ configured in <filename>queues.conf</filename>, if any.</para>
+ </argument>
+ <argument name="filename2" multiple="true" />
+ </parameter>
<parameter name="timeout">
<para>Will cause the queue to fail out after a specified number of
seconds, checked between each <filename>queues.conf</filename> <replaceable>timeout</replaceable> and
@@ -6953,8 +6959,11 @@
res2 = ast_safe_sleep(peer, qe->parent->memberdelay * 1000);
}
if (!res2 && announce) {
- if (play_file(peer, announce) < 0) {
- ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", announce, ast_channel_name(peer));
+ char *front;
+ while ((front = strsep(&announce, "&"))) {
+ if (play_file(peer, front) < 0) {
+ ast_log(LOG_ERROR, "play_file failed for '%s' on %s\n", front, ast_channel_name(peer));
+ }
}
}
if (!res2 && qe->parent->reportholdtime) {
diff --git a/doc/CHANGES-staging/app_queue.c b/doc/CHANGES-staging/app_queue.c
new file mode 100644
index 0000000..5d677b5
--- /dev/null
+++ b/doc/CHANGES-staging/app_queue.c
@@ -0,0 +1,4 @@
+Subject: app_queue.c
+
+Allow multiple files to be streamed for agent announcement.
+
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16221
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iec600d8cd5ba14aa1e4e37f906accb356cd7891a
Gerrit-Change-Number: 16221
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210725/0c3bf0a7/attachment.html>
More information about the asterisk-code-review
mailing list