diff --git a/CHANGES b/CHANGES
index a9ba0c90c1..9e56088582 100644
--- a/CHANGES
+++ b/CHANGES
@@ -45,6 +45,9 @@ AMI
used to set the UniqueId on creation. The other id is assigned to the
second channel when dialing LOCAL, or defaults to appending ;2 if only
the single Id is given.
+
+ * The Mixmonitor action now has a "Command" header that can be used to
+ indicate a post-process command to run once recording finishes.
RealTime
------------------
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 9f57cf4b53..098a632e38 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -208,6 +208,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
would apply if invoked from the MixMonitor application. For a list of
available options, see the documentation for the mixmonitor application.
+
+ Will be executed when the recording is over.
+ Any strings matching ^{X} will be unescaped to X.
+ All variables will be evaluated at the time MixMonitor is called.
+
This action records the audio on the current channel to the specified file.
@@ -1272,6 +1277,7 @@ static int manager_mixmonitor(struct mansession *s, const struct message *m)
const char *id = astman_get_header(m, "ActionID");
const char *file = astman_get_header(m, "File");
const char *options = astman_get_header(m, "Options");
+ const char *command = astman_get_header(m, "Command");
char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, };
struct ast_flags flags = { 0 };
char *uid_channel_var = NULL;
@@ -1294,7 +1300,7 @@ static int manager_mixmonitor(struct mansession *s, const struct message *m)
ast_app_parse_options(mixmonitor_opts, &flags, opts, ast_strdupa(options));
}
- snprintf(args, sizeof(args), "%s,%s", file, options);
+ snprintf(args, sizeof(args), "%s,%s,%s", file, options, command);
res = mixmonitor_exec(c, args);