@ -2016,50 +2016,27 @@ static char *handle_help(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
static struct ast_cli_entry cli_cli [ ] = {
AST_CLI_DEFINE ( handle_commandmatchesarray , " Returns command matches array " ) ,
AST_CLI_DEFINE ( handle_nodebugchan_deprecated , " Disable debugging on channel(s) " ) ,
AST_CLI_DEFINE ( handle_chanlist , " Display information on channels " ) ,
AST_CLI_DEFINE ( handle_showcalls , " Display information on calls " ) ,
AST_CLI_DEFINE ( handle_showchan , " Display information on a specific channel " ) ,
AST_CLI_DEFINE ( handle_core_set_debug_channel , " Enable/disable debugging on a channel " ) ,
AST_CLI_DEFINE ( handle_debug_category , " Enable/disable debugging categories " ) ,
AST_CLI_DEFINE ( handle_debug , " Set level of debug chattiness " ) ,
AST_CLI_DEFINE ( handle_trace , " Set level of trace chattiness " ) ,
AST_CLI_DEFINE ( handle_verbose , " Set level of verbose chattiness " ) ,
AST_CLI_DEFINE ( group_show_channels , " Display active channels with group(s) " ) ,
AST_CLI_DEFINE ( handle_help , " Display help list, or specific help on a command " ) ,
AST_CLI_DEFINE ( handle_logger_mute , " Toggle logging output to a console " ) ,
AST_CLI_DEFINE ( handle_modlist , " List modules and info " ) ,
AST_CLI_DEFINE ( handle_load , " Load a module by name " ) ,
AST_CLI_DEFINE ( handle_reload , " Reload configuration for a module " ) ,
AST_CLI_DEFINE ( handle_core_reload , " Global reload " ) ,
AST_CLI_DEFINE ( handle_unload , " Unload a module by name " ) ,
AST_CLI_DEFINE ( handle_refresh , " Completely unloads and loads a module by name " ) ,
AST_CLI_DEFINE ( handle_showuptime , " Show uptime information " ) ,
AST_CLI_DEFINE ( handle_softhangup , " Request a hangup on a given channel " ) ,
AST_CLI_DEFINE ( handle_cli_reload_permissions , " Reload CLI permissions config " ) ,
AST_CLI_DEFINE ( handle_cli_show_permissions , " Show CLI permissions " ) ,
AST_CLI_DEFINE ( handle_cli_check_permissions , " Try a permissions config for a user " ) ,
AST_CLI_DEFINE ( handle_cli_wait_fullybooted , " Wait for Asterisk to be fully booted " ) ,
# ifdef HAVE_MALLOC_TRIM
@ -2068,6 +2045,16 @@ static struct ast_cli_entry cli_cli[] = {
} ;
static struct ast_cli_entry cli_channels_cli [ ] = {
AST_CLI_DEFINE ( handle_nodebugchan_deprecated , " Disable debugging on channel(s) " ) ,
AST_CLI_DEFINE ( handle_chanlist , " Display information on channels " ) ,
AST_CLI_DEFINE ( handle_showcalls , " Display information on calls " ) ,
AST_CLI_DEFINE ( handle_showchan , " Display information on a specific channel " ) ,
AST_CLI_DEFINE ( handle_core_set_debug_channel , " Enable/disable debugging on a channel " ) ,
AST_CLI_DEFINE ( group_show_channels , " Display active channels with group(s) " ) ,
AST_CLI_DEFINE ( handle_softhangup , " Request a hangup on a given channel " ) ,
} ;
/*!
* Some regexp characters in cli arguments are reserved and used as separators .
*/
@ -2239,6 +2226,11 @@ static void cli_shutdown(void)
ast_cli_unregister_multiple ( cli_cli , ARRAY_LEN ( cli_cli ) ) ;
}
static void cli_channels_shutdown ( void )
{
ast_cli_unregister_multiple ( cli_channels_cli , ARRAY_LEN ( cli_channels_cli ) ) ;
}
/*! \brief initialize the _full_cmd string in * each of the builtins. */
void ast_builtins_init ( void )
{
@ -2247,6 +2239,12 @@ void ast_builtins_init(void)
ast_register_cleanup ( cli_shutdown ) ;
}
void ast_cli_channels_init ( void )
{
ast_cli_register_multiple ( cli_channels_cli , ARRAY_LEN ( cli_channels_cli ) ) ;
ast_register_cleanup ( cli_channels_shutdown ) ;
}
/*!
* match a word in the CLI entry .
* returns - 1 on mismatch , 0 on match of an optional word ,