]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Features: BRIDGE_FEATURES variable automixmonitor support and use proper party
authorJonathan Rose <jrose@digium.com>
Fri, 14 Dec 2012 22:34:18 +0000 (22:34 +0000)
committerJonathan Rose <jrose@digium.com>
Fri, 14 Dec 2012 22:34:18 +0000 (22:34 +0000)
BRIDGE_FEATURES did not previously support the automixmonitor feature. Now it
does. In addition, the BRIDGE_FEATURES variable would not apply features to
the proper party based on whether the feature option letter was in caps or
in lowercase (both ways would apply it to the caller). Now uppercase applies
to the caller while lowercase applies to the callee (like with the dial option)

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

CHANGES
UPGRADE.txt
main/features.c

diff --git a/CHANGES b/CHANGES
index 4da4fd9b1386f1697a61c9d8ee6bdf64db27d282..6a8322afe6ed82d7c0ed6f75f738c15d87d2e336 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -31,6 +31,16 @@ AMI (Asterisk Manager Interface)
    'Manager Show Command' now displays the privileges needed for using a given
    manager command instead.
 
+Features
+-------------------
+ * The BRIDGE_FEATURES channel variable would previously only set features for
+   the calling party and would set this feature regardless of whether the
+   feature was in caps or in lowercase. Use of a caps feature for a letter
+   will now apply the feature to the calling party while use of a lowercase
+   letter will apply that feature to the called party.
+
+ * Add support for automixmonitor to the BRIDGE_FEATURES channel variable.
+
 Logging
 -------------------
  * When performing queue pause/unpause on an interface without specifying an
index 66eb5aaeac1474661f1ab311e4d7e35579fb0843..2c1a155e0bfad4e13ca678f1c34f2b1c1b8ea95e 100644 (file)
@@ -64,6 +64,9 @@ Dialplan:
  - Asterisk has always had code to ignore dash '-' characters that are not
    part of a character set in the dialplan extensions.  The code now
    consistently ignores these characters when matching dialplan extensions.
+ - BRIDGE_FEATURES channel variable is now casesensitive for feature letter codes.
+   Uppercase variants apply them to the calling party while lowercase variants
+   apply them to the called party.
 
 From 10 to 11:
 
index a4977f2586feb86954bdc416aa434a23ebd81f36..5e544cc26c495b4044a49b58330a164c3f36ab53 100644 (file)
@@ -4227,22 +4227,32 @@ static void set_bridge_features_on_config(struct ast_bridge_config *config, cons
        }
 
        for (feature = features; *feature; feature++) {
-               switch (*feature) {
-               case 'T' :
+               struct ast_flags *party;
+               char this_feature;
+
+               if (isupper(*feature)) {
+                       party = &(config->features_caller);
+               } else {
+                       party = &(config->features_callee);
+               }
+
+               this_feature = tolower(*feature);
+
+               switch (this_feature) {
                case 't' :
-                       ast_set_flag(&(config->features_caller), AST_FEATURE_REDIRECT);
+                       ast_set_flag(party, AST_FEATURE_REDIRECT);
                        break;
-               case 'K' :
                case 'k' :
-                       ast_set_flag(&(config->features_caller), AST_FEATURE_PARKCALL);
+                       ast_set_flag(party, AST_FEATURE_PARKCALL);
                        break;
-               case 'H' :
                case 'h' :
-                       ast_set_flag(&(config->features_caller), AST_FEATURE_DISCONNECT);
+                       ast_set_flag(party, AST_FEATURE_DISCONNECT);
                        break;
-               case 'W' :
                case 'w' :
-                       ast_set_flag(&(config->features_caller), AST_FEATURE_AUTOMON);
+                       ast_set_flag(party, AST_FEATURE_AUTOMON);
+                       break;
+               case 'x' :
+                       ast_set_flag(party, AST_FEATURE_AUTOMIXMON);
                        break;
                default :
                        ast_log(LOG_WARNING, "Skipping unknown feature code '%c'\n", *feature);