diff --git a/apps/app_queue.c b/apps/app_queue.c
index 35054130a4..288c0ff066 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -185,10 +185,6 @@
Allow caller to hang up by pressing * .
-
- No retries on the timeout; will exit this application and
- go to the next step.
-
Ignore call forward requests from queue members and do nothing
when they are requested.
@@ -197,6 +193,23 @@
Asterisk will ignore any connected line update requests or any redirecting party
update requests it may receive on this dial attempt.
+
+ Allow the called party to enable parking of the call by sending
+ the DTMF sequence defined for call parking in features.conf .
+
+
+ Allow the calling party to enable parking of the call by sending
+ the DTMF sequence defined for call parking in features.conf .
+
+
+ Custom music on hold class to use, which will override the music on hold class configured
+ in queues.conf , if specified.
+ Note that CHANNEL(musicclass), if set, will still override this option.
+
+
+ No retries on the timeout; will exit this application and
+ go to the next step.
+
Ring instead of playing MOH. Periodic Announcements are still made, if applicable.
@@ -217,14 +230,6 @@
Allow the calling user to write the conversation to
disk via Monitor.
-
- Allow the called party to enable parking of the call by sending
- the DTMF sequence defined for call parking in features.conf .
-
-
- Allow the calling party to enable parking of the call by sending
- the DTMF sequence defined for call parking in features.conf .
-
Allow the called user to write the conversation
to disk via MixMonitor.
@@ -1468,12 +1473,14 @@ enum {
OPT_CALLER_AUTOMON = (1 << 18),
OPT_PREDIAL_CALLEE = (1 << 19),
OPT_PREDIAL_CALLER = (1 << 20),
+ OPT_MUSICONHOLD_CLASS = (1 << 21),
};
enum {
OPT_ARG_CALLEE_GO_ON = 0,
OPT_ARG_PREDIAL_CALLEE,
OPT_ARG_PREDIAL_CALLER,
+ OPT_ARG_MUSICONHOLD_CLASS,
/* note: this entry _MUST_ be the last one in the enum */
OPT_ARG_ARRAY_SIZE
};
@@ -1491,6 +1498,7 @@ AST_APP_OPTIONS(queue_exec_options, BEGIN_OPTIONS
AST_APP_OPTION('I', OPT_IGNORE_CONNECTEDLINE),
AST_APP_OPTION('k', OPT_CALLEE_PARK),
AST_APP_OPTION('K', OPT_CALLER_PARK),
+ AST_APP_OPTION_ARG('m', OPT_MUSICONHOLD_CLASS, OPT_ARG_MUSICONHOLD_CLASS),
AST_APP_OPTION('n', OPT_NO_RETRY),
AST_APP_OPTION('r', OPT_RINGING),
AST_APP_OPTION('R', OPT_RING_WHEN_RINGING),
@@ -8625,6 +8633,12 @@ static int queue_exec(struct ast_channel *chan, const char *data)
ast_app_exec_sub(NULL, chan, opt_args[OPT_ARG_PREDIAL_CALLER], 0);
}
+ /* Music on hold class override */
+ if (ast_test_flag(&opts, OPT_MUSICONHOLD_CLASS)
+ && !ast_strlen_zero(opt_args[OPT_ARG_MUSICONHOLD_CLASS])) {
+ ast_copy_string(qe.moh, opt_args[OPT_ARG_MUSICONHOLD_CLASS], sizeof(qe.moh));
+ }
+
copy_rules(&qe, args.rule);
qe.pr = AST_LIST_FIRST(&qe.qe_rules);
check_turns:
diff --git a/configs/samples/queues.conf.sample b/configs/samples/queues.conf.sample
index aa7e03d34b..cdaf92342f 100644
--- a/configs/samples/queues.conf.sample
+++ b/configs/samples/queues.conf.sample
@@ -64,8 +64,9 @@ monitor-type = MixMonitor
;
; Musicclass sets which music applies for this particular call queue.
; The only class which can override this one is if the MOH class is set
+; using the m option when calling the Queue application or if set
; directly on the channel using Set(CHANNEL(musicclass)=whatever) in the
-; dialplan.
+; dialplan (the latter of which overrides everything).
;
;musicclass = default
;
diff --git a/doc/CHANGES-staging/app_queue_music.txt b/doc/CHANGES-staging/app_queue_music.txt
new file mode 100644
index 0000000000..254a45db45
--- /dev/null
+++ b/doc/CHANGES-staging/app_queue_music.txt
@@ -0,0 +1,5 @@
+Subject: app_queue
+
+The m option now allows an override music on hold
+class to be specified for the Queue application
+within the dialplan.