From: Chad Phillips Date: Thu, 23 Jul 2015 04:58:32 +0000 (-0700) Subject: Allow JSON API commands to send third arg for muting X-Git-Tag: v1.6.2~236^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d7a496889dcf1dbb4cb9bb40a3b4b449cdfd60a;p=thirdparty%2Ffreeswitch.git Allow JSON API commands to send third arg for muting The mod_conference API supports passing an optional third arg for all mute commands (mute, unmute, tmute, vmute, unvmute, tvmute). This patch adds support for the optional third arg to the JSON API. FS-7882 #resolve --- diff --git a/src/mod/applications/mod_conference/conference_event.c b/src/mod/applications/mod_conference/conference_event.c index 5494f9531a..7ac938543a 100644 --- a/src/mod/applications/mod_conference/conference_event.c +++ b/src/mod/applications/mod_conference/conference_event.c @@ -99,15 +99,19 @@ void conference_event_mod_channel_handler(const char *event_channel, cJSON *json SWITCH_STANDARD_STREAM(stream); - if (!strcasecmp(action, "kick") || - !strcasecmp(action, "mute") || + if (!strcasecmp(action, "kick")) { + exec = switch_mprintf("%s %s %s", conference_name, action, cid); + } else if (!strcasecmp(action, "mute") || !strcasecmp(action, "unmute") || !strcasecmp(action, "tmute") || !strcasecmp(action, "vmute") || !strcasecmp(action, "unvmute") || - !strcasecmp(action, "tvmute") - ) { - exec = switch_mprintf("%s %s %s", conference_name, action, cid); + !strcasecmp(action, "tvmute")) { + if (argv[0]) { + exec = switch_mprintf("%s %s %s %s", conference_name, action, cid, argv[0]); + } else { + exec = switch_mprintf("%s %s %s", conference_name, action, cid); + } } else if (!strcasecmp(action, "volume_in") || !strcasecmp(action, "volume_out") || !strcasecmp(action, "vid-res-id") ||