@@ -2016,50 +2016,27 @@ static char *handle_help(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
2016
2016
static struct ast_cli_entry cli_cli [] = {
2017
2017
AST_CLI_DEFINE (handle_commandmatchesarray , "Returns command matches array" ),
2018
2018
2019
- AST_CLI_DEFINE (handle_nodebugchan_deprecated , "Disable debugging on channel(s)" ),
2020
-
2021
- AST_CLI_DEFINE (handle_chanlist , "Display information on channels" ),
2022
-
2023
- AST_CLI_DEFINE (handle_showcalls , "Display information on calls" ),
2024
-
2025
- AST_CLI_DEFINE (handle_showchan , "Display information on a specific channel" ),
2026
-
2027
- AST_CLI_DEFINE (handle_core_set_debug_channel , "Enable/disable debugging on a channel" ),
2028
-
2029
2019
AST_CLI_DEFINE (handle_debug_category , "Enable/disable debugging categories" ),
2030
2020
2031
2021
AST_CLI_DEFINE (handle_debug , "Set level of debug chattiness" ),
2032
2022
AST_CLI_DEFINE (handle_trace , "Set level of trace chattiness" ),
2033
2023
AST_CLI_DEFINE (handle_verbose , "Set level of verbose chattiness" ),
2034
2024
2035
- AST_CLI_DEFINE (group_show_channels , "Display active channels with group(s)" ),
2036
-
2037
2025
AST_CLI_DEFINE (handle_help , "Display help list, or specific help on a command" ),
2038
-
2039
2026
AST_CLI_DEFINE (handle_logger_mute , "Toggle logging output to a console" ),
2040
2027
2041
2028
AST_CLI_DEFINE (handle_modlist , "List modules and info" ),
2042
-
2043
2029
AST_CLI_DEFINE (handle_load , "Load a module by name" ),
2044
-
2045
2030
AST_CLI_DEFINE (handle_reload , "Reload configuration for a module" ),
2046
-
2047
2031
AST_CLI_DEFINE (handle_core_reload , "Global reload" ),
2048
-
2049
2032
AST_CLI_DEFINE (handle_unload , "Unload a module by name" ),
2050
-
2051
2033
AST_CLI_DEFINE (handle_refresh , "Completely unloads and loads a module by name" ),
2052
2034
2053
2035
AST_CLI_DEFINE (handle_showuptime , "Show uptime information" ),
2054
2036
2055
- AST_CLI_DEFINE (handle_softhangup , "Request a hangup on a given channel" ),
2056
-
2057
2037
AST_CLI_DEFINE (handle_cli_reload_permissions , "Reload CLI permissions config" ),
2058
-
2059
2038
AST_CLI_DEFINE (handle_cli_show_permissions , "Show CLI permissions" ),
2060
-
2061
2039
AST_CLI_DEFINE (handle_cli_check_permissions , "Try a permissions config for a user" ),
2062
-
2063
2040
AST_CLI_DEFINE (handle_cli_wait_fullybooted , "Wait for Asterisk to be fully booted" ),
2064
2041
2065
2042
#ifdef HAVE_MALLOC_TRIM
@@ -2068,6 +2045,16 @@ static struct ast_cli_entry cli_cli[] = {
2068
2045
2069
2046
};
2070
2047
2048
+ static struct ast_cli_entry cli_channels_cli [] = {
2049
+ AST_CLI_DEFINE (handle_nodebugchan_deprecated , "Disable debugging on channel(s)" ),
2050
+ AST_CLI_DEFINE (handle_chanlist , "Display information on channels" ),
2051
+ AST_CLI_DEFINE (handle_showcalls , "Display information on calls" ),
2052
+ AST_CLI_DEFINE (handle_showchan , "Display information on a specific channel" ),
2053
+ AST_CLI_DEFINE (handle_core_set_debug_channel , "Enable/disable debugging on a channel" ),
2054
+ AST_CLI_DEFINE (group_show_channels , "Display active channels with group(s)" ),
2055
+ AST_CLI_DEFINE (handle_softhangup , "Request a hangup on a given channel" ),
2056
+ };
2057
+
2071
2058
/*!
2072
2059
* Some regexp characters in cli arguments are reserved and used as separators.
2073
2060
*/
@@ -2239,6 +2226,11 @@ static void cli_shutdown(void)
2239
2226
ast_cli_unregister_multiple (cli_cli , ARRAY_LEN (cli_cli ));
2240
2227
}
2241
2228
2229
+ static void cli_channels_shutdown (void )
2230
+ {
2231
+ ast_cli_unregister_multiple (cli_channels_cli , ARRAY_LEN (cli_channels_cli ));
2232
+ }
2233
+
2242
2234
/*! \brief initialize the _full_cmd string in * each of the builtins. */
2243
2235
void ast_builtins_init (void )
2244
2236
{
@@ -2247,6 +2239,12 @@ void ast_builtins_init(void)
2247
2239
ast_register_cleanup (cli_shutdown );
2248
2240
}
2249
2241
2242
+ void ast_cli_channels_init (void )
2243
+ {
2244
+ ast_cli_register_multiple (cli_channels_cli , ARRAY_LEN (cli_channels_cli ));
2245
+ ast_register_cleanup (cli_channels_shutdown );
2246
+ }
2247
+
2250
2248
/*!
2251
2249
* match a word in the CLI entry.
2252
2250
* returns -1 on mismatch, 0 on match of an optional word,
0 commit comments