]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_confbridge: Allow muting of users waiting to enter a ConfBridge
authorMatthew Jordan <mjordan@digium.com>
Thu, 5 Jun 2014 14:32:38 +0000 (14:32 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 5 Jun 2014 14:32:38 +0000 (14:32 +0000)
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)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@415206 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_confbridge.c

index 909cb00ac3383f72cbd56fb5d9239f3d2f41994c..70844d6a4b3862d004ee4156360e4dd6322bb0d5 100644 (file)
@@ -2392,6 +2392,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;