mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
app_queue: Add music on hold option to Queue.
Adds the m option to the Queue application, which allows a music on hold class to be specified at runtime which will override the class configured in queues.conf. This option functions like the m option to Dial. ASTERISK-29876 #close Change-Id: Ie25a48569cf8755c305c9438b1ed292c3adcf8d7
This commit is contained in:
committed by
Kevin Harwell
parent
da44b848f5
commit
ede4e2099f
@@ -185,10 +185,6 @@
|
||||
<option name="H">
|
||||
<para>Allow <emphasis>caller</emphasis> to hang up by pressing <literal>*</literal>.</para>
|
||||
</option>
|
||||
<option name="n">
|
||||
<para>No retries on the timeout; will exit this application and
|
||||
go to the next step.</para>
|
||||
</option>
|
||||
<option name="i">
|
||||
<para>Ignore call forward requests from queue members and do nothing
|
||||
when they are requested.</para>
|
||||
@@ -197,6 +193,23 @@
|
||||
<para>Asterisk will ignore any connected line update requests or any redirecting party
|
||||
update requests it may receive on this dial attempt.</para>
|
||||
</option>
|
||||
<option name="k">
|
||||
<para>Allow the <emphasis>called</emphasis> party to enable parking of the call by sending
|
||||
the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
|
||||
</option>
|
||||
<option name="K">
|
||||
<para>Allow the <emphasis>calling</emphasis> party to enable parking of the call by sending
|
||||
the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
|
||||
</option>
|
||||
<option name="m">
|
||||
<para>Custom music on hold class to use, which will override the music on hold class configured
|
||||
in <filename>queues.conf</filename>, if specified.</para>
|
||||
<para>Note that CHANNEL(musicclass), if set, will still override this option.</para>
|
||||
</option>
|
||||
<option name="n">
|
||||
<para>No retries on the timeout; will exit this application and
|
||||
go to the next step.</para>
|
||||
</option>
|
||||
<option name="r">
|
||||
<para>Ring instead of playing MOH. Periodic Announcements are still made, if applicable.</para>
|
||||
</option>
|
||||
@@ -217,14 +230,6 @@
|
||||
<para>Allow the <emphasis>calling</emphasis> user to write the conversation to
|
||||
disk via Monitor.</para>
|
||||
</option>
|
||||
<option name="k">
|
||||
<para>Allow the <emphasis>called</emphasis> party to enable parking of the call by sending
|
||||
the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
|
||||
</option>
|
||||
<option name="K">
|
||||
<para>Allow the <emphasis>calling</emphasis> party to enable parking of the call by sending
|
||||
the DTMF sequence defined for call parking in <filename>features.conf</filename>.</para>
|
||||
</option>
|
||||
<option name="x">
|
||||
<para>Allow the <emphasis>called</emphasis> user to write the conversation
|
||||
to disk via MixMonitor.</para>
|
||||
@@ -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:
|
||||
|
Reference in New Issue
Block a user