]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
REVERT: Add option to suppress the Message channel AMI and ARI events
authorJoshua Colp <jcolp@sangoma.com>
Tue, 4 Feb 2020 13:31:29 +0000 (07:31 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 4 Feb 2020 14:18:11 +0000 (08:18 -0600)
This reverts commit bdcf8e71655cd2fd79264e212cb50494c70c1e05.

Reason for revert: Per discussion on IRC we're sticking to policy.

Change-Id: I13e14edd2e410d26e8d1b8a1fe8e8dbc63536542

configs/samples/asterisk.conf.sample
doc/CHANGES-staging/hide_messaging_ami_events [deleted file]
include/asterisk/options.h
main/asterisk.c
main/message.c
main/options.c

index bf0bdba092ff5991ccaffe442a0b74c9a42cfe5e..5f33abbfe278bb053c9f56759c351252fc2d2e06 100644 (file)
@@ -118,11 +118,6 @@ documentation_language = en_US     ; Set the language you want documentation
                                ; calls are not accepted by a remote
                                ; implementation, please report this and go
                                ; back to value 96.
-;hide_messaging_ami_events = no;  This option, if enabled, will
-                ; suppress all of the Message/ast_msg_queue channel's
-                ; housekeeping AMI and ARI channel events.  This can
-                ; reduce the load on the manager and ARI applications
-                ; when the Digium Phone Module for Asterisk is in use.
 
 ; Changing the following lines may compromise your security.
 ;[files]
diff --git a/doc/CHANGES-staging/hide_messaging_ami_events b/doc/CHANGES-staging/hide_messaging_ami_events
deleted file mode 100644 (file)
index 0afbeec..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Subject: Messaging
-
-In order to reduce the amount of AMI and ARI events generated,
-the global "Message/ast_msg_queue" channel can be set to suppress
-it's normal channel housekeeping events such as "Newexten",
-"VarSet", etc. This can greatly reduce load on the manager
-and ARI applications when the Digium Phone Module for Asterisk
-is in use.  To enable, set "hide_messaging_ami_events" in
-asterisk.conf to "yes"  In Asterisk versions <18, the default
-is "no" preserving existing behavior.  Beginning with
-Asterisk 18, the option will default to "yes".
index f8c813f19ab2b05a199b59077e3e2c80f081772a..6c4e5529583e9759de37a2ac5b2e4f36ab48160e 100644 (file)
@@ -84,8 +84,6 @@ enum ast_option_flags {
        AST_OPT_FLAG_DEBUG_MODULE = (1 << 23),
        /*! Terminal colors should be adjusted for a light-colored background */
        AST_OPT_FLAG_LIGHT_BACKGROUND = (1 << 25),
-       /*! Make the global Message channel an internal channel to suppress AMI events */
-       AST_OPT_FLAG_HIDE_MESSAGING_AMI_EVENTS = (1 << 26),
        /*! Force black background */
        AST_OPT_FLAG_FORCE_BLACK_BACKGROUND = (1 << 27),
        /*! Hide remote console connect messages on console */
@@ -131,7 +129,6 @@ enum ast_option_flags {
 #define ast_opt_generic_plc         ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC)
 #define ast_opt_ref_debug           ast_test_flag(&ast_options, AST_OPT_FLAG_REF_DEBUG)
 #define ast_opt_generic_plc_on_equal_codecs  ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS)
-#define ast_opt_hide_messaging_ami_events  ast_test_flag(&ast_options, AST_OPT_FLAG_HIDE_MESSAGING_AMI_EVENTS)
 
 /*! Maximum log level defined by PJPROJECT. */
 #define MAX_PJ_LOG_MAX_LEVEL           6
index 6ae921941df7f458bb2085efab0dcc1683db825b..dd2ae6f2614385fd4684fd1860cf5e05c3590443 100644 (file)
@@ -509,7 +509,6 @@ static char *handle_show_settings(struct ast_cli_entry *e, int cmd, struct ast_c
        ast_cli(a->fd, "  Transmit silence during rec: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_TRANSMIT_SILENCE) ? "Enabled" : "Disabled");
        ast_cli(a->fd, "  Generic PLC:                 %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC) ? "Enabled" : "Disabled");
        ast_cli(a->fd, "  Generic PLC on equal codecs: %s\n", ast_test_flag(&ast_options, AST_OPT_FLAG_GENERIC_PLC_ON_EQUAL_CODECS) ? "Enabled" : "Disabled");
-       ast_cli(a->fd, "  Hide Msg Chan AMI events:    %s\n", ast_opt_hide_messaging_ami_events ? "Enabled" : "Disabled");
        ast_cli(a->fd, "  Min DTMF duration::          %u\n", option_dtmfminduration);
 #if !defined(LOW_MEMORY)
        ast_cli(a->fd, "  Cache media frames:          %s\n", ast_opt_cache_media_frames ? "Enabled" : "Disabled");
index 39b8d873e02ac0ffee9666077754567a790f6a6f..487416277781fd286152f09d6f36b27e259bb37e 100644 (file)
@@ -283,7 +283,7 @@ static int chan_msg_send_digit_end(struct ast_channel *chan, char digit,
  * This will not be registered as we never want anything to try
  * to create Message channels other than internally in this file.
  */
-static struct ast_channel_tech msg_chan_tech_hack = {
+static const struct ast_channel_tech msg_chan_tech_hack = {
        .type             = "Message",
        .description      = "Internal Text Message Processing",
        .read             = chan_msg_read,
@@ -685,10 +685,6 @@ static struct ast_channel *create_msg_q_chan(void)
                return NULL;
        }
 
-       if (ast_opt_hide_messaging_ami_events) {
-               msg_chan_tech_hack.properties |= AST_CHAN_TP_INTERNAL;
-       }
-
        ast_channel_tech_set(chan, &msg_chan_tech_hack);
        ast_channel_unlock(chan);
        ast_channel_unlink(chan);
index 38a646e1781927607cbdf5cfa3577901f572e9ee..ea97a6a0ac4b32ddd31511dd75af14e279d4fef0 100644 (file)
@@ -457,8 +457,6 @@ void load_asterisk_conf(void)
                        }
                } else if (!strcasecmp(v->name, "live_dangerously")) {
                        live_dangerously = ast_true(v->value);
-               } else if (!strcasecmp(v->name, "hide_messaging_ami_events")) {
-                       ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_HIDE_MESSAGING_AMI_EVENTS);
                }
        }
        if (!ast_opt_remote) {