mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
app_mixmonitor: Turn on synchronization by default
The optional synchronization behavior created in
64906c4c9b
is now the default for
MixMonitor.
* Add a new flag 'n' that allows for this behavior to be turned off
* Add a notice when the 'S' option is used indicating that it is no
longer necessary
Change-Id: I158987c475cda4e1ff1256dd0daccdd99df568b4
This commit is contained in:
@@ -115,10 +115,10 @@
|
|||||||
Like with the basic filename argument, if an absolute path isn't given, it will create
|
Like with the basic filename argument, if an absolute path isn't given, it will create
|
||||||
the file in the configured monitoring directory.</para>
|
the file in the configured monitoring directory.</para>
|
||||||
</option>
|
</option>
|
||||||
<option name="S">
|
<option name="n">
|
||||||
<para>When combined with the <replaceable>r</replaceable> or <replaceable>t</replaceable>
|
<para>When the <replaceable>r</replaceable> or <replaceable>t</replaceable> option is
|
||||||
option, inserts silence when necessary to maintain synchronization between the receive
|
used, MixMonitor will insert silence into the specified files to maintain
|
||||||
and transmit audio streams.</para>
|
synchronization between them. Use this option to disable that behavior.</para>
|
||||||
</option>
|
</option>
|
||||||
<option name="i">
|
<option name="i">
|
||||||
<argument name="chanvar" required="true" />
|
<argument name="chanvar" required="true" />
|
||||||
@@ -353,7 +353,8 @@ enum mixmonitor_flags {
|
|||||||
MUXFLAG_BEEP = (1 << 11),
|
MUXFLAG_BEEP = (1 << 11),
|
||||||
MUXFLAG_BEEP_START = (1 << 12),
|
MUXFLAG_BEEP_START = (1 << 12),
|
||||||
MUXFLAG_BEEP_STOP = (1 << 13),
|
MUXFLAG_BEEP_STOP = (1 << 13),
|
||||||
MUXFLAG_RWSYNC = (1 << 14),
|
MUXFLAG_DEPRECATED_RWSYNC = (1 << 14),
|
||||||
|
MUXFLAG_NO_RWSYNC = (1 << 15),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum mixmonitor_args {
|
enum mixmonitor_args {
|
||||||
@@ -365,7 +366,8 @@ enum mixmonitor_args {
|
|||||||
OPT_ARG_UID,
|
OPT_ARG_UID,
|
||||||
OPT_ARG_VMRECIPIENTS,
|
OPT_ARG_VMRECIPIENTS,
|
||||||
OPT_ARG_BEEP_INTERVAL,
|
OPT_ARG_BEEP_INTERVAL,
|
||||||
OPT_ARG_RWSYNC,
|
OPT_ARG_DEPRECATED_RWSYNC,
|
||||||
|
OPT_ARG_NO_RWSYNC,
|
||||||
OPT_ARG_ARRAY_SIZE, /* Always last element of the enum */
|
OPT_ARG_ARRAY_SIZE, /* Always last element of the enum */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -382,7 +384,8 @@ AST_APP_OPTIONS(mixmonitor_opts, {
|
|||||||
AST_APP_OPTION_ARG('t', MUXFLAG_WRITE, OPT_ARG_WRITENAME),
|
AST_APP_OPTION_ARG('t', MUXFLAG_WRITE, OPT_ARG_WRITENAME),
|
||||||
AST_APP_OPTION_ARG('i', MUXFLAG_UID, OPT_ARG_UID),
|
AST_APP_OPTION_ARG('i', MUXFLAG_UID, OPT_ARG_UID),
|
||||||
AST_APP_OPTION_ARG('m', MUXFLAG_VMRECIPIENTS, OPT_ARG_VMRECIPIENTS),
|
AST_APP_OPTION_ARG('m', MUXFLAG_VMRECIPIENTS, OPT_ARG_VMRECIPIENTS),
|
||||||
AST_APP_OPTION_ARG('S', MUXFLAG_RWSYNC, OPT_ARG_RWSYNC),
|
AST_APP_OPTION_ARG('S', MUXFLAG_DEPRECATED_RWSYNC, OPT_ARG_DEPRECATED_RWSYNC),
|
||||||
|
AST_APP_OPTION_ARG('n', MUXFLAG_NO_RWSYNC, OPT_ARG_NO_RWSYNC),
|
||||||
});
|
});
|
||||||
|
|
||||||
struct mixmonitor_ds {
|
struct mixmonitor_ds {
|
||||||
@@ -970,7 +973,7 @@ static int launch_monitor_thread(struct ast_channel *chan, const char *filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_TRIGGER_SYNC);
|
ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_TRIGGER_SYNC);
|
||||||
if ((ast_test_flag(mixmonitor, MUXFLAG_RWSYNC))) {
|
if (!ast_test_flag(mixmonitor, MUXFLAG_NO_RWSYNC)) {
|
||||||
ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_SUBSTITUTE_SILENCE);
|
ast_set_flag(&mixmonitor->audiohook, AST_AUDIOHOOK_SUBSTITUTE_SILENCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1049,6 +1052,11 @@ static int mixmonitor_exec(struct ast_channel *chan, const char *data)
|
|||||||
|
|
||||||
ast_app_parse_options(mixmonitor_opts, &flags, opts, args.options);
|
ast_app_parse_options(mixmonitor_opts, &flags, opts, args.options);
|
||||||
|
|
||||||
|
if (ast_test_flag(&flags, MUXFLAG_DEPRECATED_RWSYNC)) {
|
||||||
|
ast_log(LOG_NOTICE, "The synchronization behavior enabled by the 'S' option is now the default"
|
||||||
|
" and does not need to be specified.\n");
|
||||||
|
}
|
||||||
|
|
||||||
if (ast_test_flag(&flags, MUXFLAG_READVOLUME)) {
|
if (ast_test_flag(&flags, MUXFLAG_READVOLUME)) {
|
||||||
if (ast_strlen_zero(opts[OPT_ARG_READVOLUME])) {
|
if (ast_strlen_zero(opts[OPT_ARG_READVOLUME])) {
|
||||||
ast_log(LOG_WARNING, "No volume level was provided for the heard volume ('v') option.\n");
|
ast_log(LOG_WARNING, "No volume level was provided for the heard volume ('v') option.\n");
|
||||||
|
10
doc/UPGRADE-staging/app_mixmonitor_sync_default.txt
Normal file
10
doc/UPGRADE-staging/app_mixmonitor_sync_default.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Subject: app_mixmonitor
|
||||||
|
Master-Only: true
|
||||||
|
|
||||||
|
In Asterisk 13.29, a new option flag was added to MixMonitor (the 'S'
|
||||||
|
option) that when combined with the r() or t() options would inject
|
||||||
|
silence into these files if audio was going to be written to one and
|
||||||
|
not that other. This allowed the files specified by r() and t() to
|
||||||
|
subsequently be mixed outside of Asterisk and be appropriately
|
||||||
|
synchronized. This behavior is now the default, and a new option has
|
||||||
|
been added to disable this behavior if desired (the 'n' option).
|
Reference in New Issue
Block a user