]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_confbridge: Allow muting of users waiting to enter a ConfBridge 20/2120/1
authorMatthew Jordan <mjordan@digium.com>
Thu, 5 Jun 2014 14:32:38 +0000 (14:32 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 27 Jan 2016 23:22:12 +0000 (17:22 -0600)
Prior to this patch, users waiting to enter a ConfBridge were not considered
when muted via the CLI or via AMI. Instead, a confusing message would be
emitted stating that the channel did not exist.

This patch allows a user to be muted when waiting to enter a ConfBridge
conference. This is equivalent to start when muted, only toggled via the CLI
or AMI.

Review: https://reviewboard.asterisk.org/r/3582

ASTERISK-23824 #close
patches:
  rb3582.patch uploaded by tm1000 (License 6524)

Cherry-picked to support ASTERISK-20987

Change-Id: I61d5475a1cd53adfde3c2d0ab6ab45c5b100cae8

apps/app_confbridge.c

index f8b1325e668b52887ee3a438b101639151fc2f68..988f5fe6bfe35688cea6aafd08b08c02d11aede1 100644 (file)
@@ -2384,6 +2384,14 @@ static int generic_mute_unmute_helper(int mute, const char *conference, const ch
                        break;
                }
        }
+       if (!participant) {
+               /* user is not in the active list so check the waiting list as well */
+               AST_LIST_TRAVERSE(&bridge->waiting_list, participant, list) {
+                       if (!strncmp(user, ast_channel_name(participant->chan), strlen(user))) {
+                               break;
+                       }
+               }
+       }
        if (participant) {
                /* Set user level mute request. */
                participant->muted = mute ? 1 : 0;