A regression was accidentally introduced when allowing an optional ID to be used
when calling StopMixMonitor. When we are unable to stop MixMonitor on a
channel, -1 is being returned which triggers the hangup of the channel.
This patch restores the prior behavior by returning 0 whether we were successful
or not. It also allows the call from the manager to use the return code when
the action fails.
(closes issue ASTERISK-21294)
Reported by: daroz
Tested by: daroz
Patches:
asterisk-21294-stop_mixmonitor_hangingup.diff Michael L. Young (license 5026)
Review: https://reviewboard.asterisk.org/r/2404/
........
Merged revisions 383631 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383632
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
return 0;
}
-static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
+static int stop_mixmonitor_full(struct ast_channel *chan, const char *data)
{
struct ast_datastore *datastore = NULL;
char *parse = "";
return 0;
}
+static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
+{
+ stop_mixmonitor_full(chan, data);
+ return 0;
+}
+
static char *handle_cli_mixmonitor(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
struct ast_channel *chan;
return AMI_SUCCESS;
}
- res = stop_mixmonitor_exec(c, mixmonitor_id);
+ res = stop_mixmonitor_full(c, mixmonitor_id);
if (res) {
astman_send_error(s, m, "Could not stop monitoring channel");