Index: doc/tex/phoneprov.tex =================================================================== --- doc/tex/phoneprov.tex (revision 273876) +++ doc/tex/phoneprov.tex (working copy) @@ -245,7 +245,7 @@ \end{astlisting} With \path{phoneprov.conf} and \path{users.conf} in place, start Astersik. From the CLI, -type "http show status". An example output: +type "http show settings". An example output: \begin{astlisting} \begin{verbatim} HTTP Server Status: Index: doc/tex/ajam.tex =================================================================== --- doc/tex/ajam.tex (revision 273876) +++ doc/tex/ajam.tex (working copy) @@ -37,7 +37,7 @@ Once those configurations are complete you can reload or restart Asterisk and you should be able to point your web browser to specific URI's which will allow you to access various web functions. A complete -list can be found by typing "http show status" at the Asterisk CLI. +list can be found by typing "http show settings" at the Asterisk CLI. examples: \begin{astlisting} Index: addons/cdr_mysql.c =================================================================== --- addons/cdr_mysql.c (revision 273876) +++ addons/cdr_mysql.c (working copy) @@ -100,14 +100,14 @@ static MYSQL mysql = { { NULL }, }; -static char *handle_cli_cdr_mysql_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +static char *handle_cli_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { switch (cmd) { case CLI_INIT: - e->command = "cdr mysql status"; + e->command = "cdr mysql show settings"; e->usage = - "Usage: cdr mysql status\n" - " Shows current connection status for cdr_mysql\n"; + "Usage: cdr mysql show settings\n" + " Display the MySQL CDR settings.\n"; return NULL; case CLI_GENERATE: return NULL; @@ -152,8 +152,8 @@ return CLI_SUCCESS; } -static struct ast_cli_entry cdr_mysql_status_cli[] = { - AST_CLI_DEFINE(handle_cli_cdr_mysql_status, "Show connection status of cdr_mysql"), +static struct ast_cli_entry cli_show_settings[] = { + AST_CLI_DEFINE(handle_cli_show_settings, "Show connection status of cdr_mysql"), }; static int mysql_log(struct ast_cdr *cdr) @@ -354,7 +354,7 @@ struct unload_string *us; struct column *entry; - ast_cli_unregister_multiple(cdr_mysql_status_cli, sizeof(cdr_mysql_status_cli) / sizeof(struct ast_cli_entry)); + ast_cli_unregister_multiple(cli_show_settings, sizeof(cli_show_settings) / sizeof(struct ast_cli_entry)); if (connected) { mysql_close(&mysql); @@ -650,7 +650,7 @@ if (res) { ast_log(LOG_ERROR, "Unable to register MySQL CDR handling\n"); } else { - res = ast_cli_register_multiple(cdr_mysql_status_cli, sizeof(cdr_mysql_status_cli) / sizeof(struct ast_cli_entry)); + res = ast_cli_register_multiple(cli_show_settings, sizeof(cli_show_settings) / sizeof(struct ast_cli_entry)); } return res; Index: main/cdr.c =================================================================== --- main/cdr.c (revision 273876) +++ main/cdr.c (working copy) @@ -1393,7 +1393,7 @@ return NULL; } -static char *handle_cli_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +static char *handle_cli_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { struct ast_cdr_beitem *beitem=NULL; int cnt=0; @@ -1401,10 +1401,10 @@ switch (cmd) { case CLI_INIT: - e->command = "cdr show status"; + e->command = "cdr show settings"; e->usage = - "Usage: cdr show status\n" - " Displays the Call Detail Record engine system status.\n"; + "Usage: cdr show settings\n" + " Displays the Call Detail Record engine system settings.\n"; return NULL; case CLI_GENERATE: return NULL; @@ -1473,7 +1473,7 @@ } static struct ast_cli_entry cli_submit = AST_CLI_DEFINE(handle_cli_submit, "Posts all pending batched CDR data"); -static struct ast_cli_entry cli_status = AST_CLI_DEFINE(handle_cli_status, "Display the CDR status"); +static struct ast_cli_entry cli_show_settings = AST_CLI_DEFINE(handle_cli_show_settings, "Display the CDR settings"); static int do_reload(int reload) { @@ -1611,7 +1611,7 @@ return -1; } - ast_cli_register(&cli_status); + ast_cli_register(&cli_show_settings); res = do_reload(0); if (res) { Index: main/features.c =================================================================== --- main/features.c (revision 273876) +++ main/features.c (working copy) @@ -4608,7 +4608,7 @@ * \retval CLI_SUCCESS on success. * \retval NULL when tab completion is used. */ -static char *handle_feature_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +static char *handle_feature_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { int i; struct ast_call_feature *feature; @@ -4619,10 +4619,10 @@ switch (cmd) { case CLI_INIT: - e->command = "features show"; + e->command = "features show settings"; e->usage = - "Usage: features show\n" - " Lists configured features\n"; + "Usage: features show settings\n" + " Display features settings.\n"; return NULL; case CLI_GENERATE: return NULL; @@ -4915,7 +4915,7 @@ } static struct ast_cli_entry cli_features[] = { - AST_CLI_DEFINE(handle_feature_show, "Lists configured features"), + AST_CLI_DEFINE(handle_feature_show_settings, "Display features settings"), AST_CLI_DEFINE(handle_features_reload, "Reloads configured features"), AST_CLI_DEFINE(handle_parkedcalls, "List currently parked calls"), }; Index: main/http.c =================================================================== --- main/http.c (revision 273876) +++ main/http.c (working copy) @@ -1087,10 +1087,10 @@ switch (cmd) { case CLI_INIT: - e->command = "http show status"; + e->command = "http show settings"; e->usage = - "Usage: http show status\n" - " Lists status of internal HTTP engine\n"; + "Usage: http show settings\n" + " Display the internal HTTP engine settings.\n"; return NULL; case CLI_GENERATE: return NULL; Index: main/dnsmgr.c =================================================================== --- main/dnsmgr.c (revision 273876) +++ main/dnsmgr.c (working copy) @@ -316,29 +316,31 @@ return CLI_SUCCESS; } -static char *handle_cli_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +static char *handle_cli_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { int count = 0; struct ast_dnsmgr_entry *entry; switch (cmd) { case CLI_INIT: - e->command = "dnsmgr status"; + e->command = "dnsmgr show settings"; e->usage = - "Usage: dnsmgr status\n" - " Displays the DNS manager status.\n"; + "Usage: dnsmgr show settings\n" + " Displays the DNS manager settings.\n"; return NULL; case CLI_GENERATE: return NULL; } - if (a->argc > 2) + if (a->argc > 3) { return CLI_SHOWUSAGE; + } ast_cli(a->fd, "DNS Manager: %s\n", enabled ? "enabled" : "disabled"); ast_cli(a->fd, "Refresh Interval: %d seconds\n", refresh_interval); AST_RWLIST_RDLOCK(&entry_list); - AST_RWLIST_TRAVERSE(&entry_list, entry, list) + AST_RWLIST_TRAVERSE(&entry_list, entry, list) { count++; + } AST_RWLIST_UNLOCK(&entry_list); ast_cli(a->fd, "Number of entries: %d\n", count); @@ -347,7 +349,7 @@ static struct ast_cli_entry cli_reload = AST_CLI_DEFINE(handle_cli_reload, "Reloads the DNS manager configuration"); static struct ast_cli_entry cli_refresh = AST_CLI_DEFINE(handle_cli_refresh, "Performs an immediate refresh"); -static struct ast_cli_entry cli_status = AST_CLI_DEFINE(handle_cli_status, "Display the DNS manager status"); +static struct ast_cli_entry cli_show_settings = AST_CLI_DEFINE(handle_cli_show_settings, "Display the DNS manager settings"); int dnsmgr_init(void) { @@ -356,7 +358,7 @@ return -1; } ast_cli_register(&cli_reload); - ast_cli_register(&cli_status); + ast_cli_register(&cli_show_settings); ast_cli_register(&cli_refresh); return do_reload(1); } Index: main/cel.c =================================================================== --- main/cel.c (revision 273876) +++ main/cel.c (working copy) @@ -149,17 +149,17 @@ ast_event_get_ie_str(event, AST_EVENT_IE_DESCRIPTION)); } -static char *handle_cli_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +static char *handle_cli_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { unsigned int i; struct ast_event_sub *sub; switch (cmd) { case CLI_INIT: - e->command = "cel show status"; + e->command = "cel show settings"; e->usage = - "Usage: cel show status\n" - " Displays the Channel Event Logging system status.\n"; + "Usage: cel show settings\n" + " Displays the Channel Event Logging system settings.\n"; return NULL; case CLI_GENERATE: return NULL; @@ -203,7 +203,7 @@ return CLI_SUCCESS; } -static struct ast_cli_entry cli_status = AST_CLI_DEFINE(handle_cli_status, "Display the CEL status"); +static struct ast_cli_entry cli_show_settings = AST_CLI_DEFINE(handle_cli_show_settings, "Display the CEL system settings"); enum ast_cel_event_type ast_cel_str_to_event_type(const char *name) { @@ -641,7 +641,7 @@ return -1; } - if (ast_cli_register(&cli_status)) { + if (ast_cli_register(&cli_show_settings)) { ao2_ref(appset, -1); appset = NULL; return -1; Index: configs/cli_aliases.conf.sample =================================================================== --- configs/cli_aliases.conf.sample (revision 273876) +++ configs/cli_aliases.conf.sample (working copy) @@ -12,6 +12,7 @@ template = friendly ; By default, include friendly aliases ;template = asterisk12 ; Asterisk 1.2 style syntax ;template = asterisk14 ; Asterisk 1.4 style syntax +;template = asterisk162 ; Asterisk 1.6.2 style syntax ;template = individual_custom ; see [individual_custom] example below which ; includes a list of aliases from an external ; file @@ -186,3 +187,14 @@ [asterisk14](asterisk14_tpl) ; add any additional custom commands you want below here. + +[asterisk162_tpl](!) +cdr mysql status=cdr mysql show settings +cdr show status=cdr show settings +http show status=http show settings +dnsmgr status=dnsmgr show settings +cel show status=cel show settings +sql show status=sql show settings + +[asterisk162](asterisk162_tpl) +; add any additional custom commands you want below here. Index: res/res_config_sqlite.c =================================================================== --- res/res_config_sqlite.c (revision 273876) +++ res/res_config_sqlite.c (working copy) @@ -56,10 +56,10 @@ * Asterisk documentation. The file tables.sql can be used to create the * needed tables. * - * \section status_sec Driver status + * \section status_sec Driver settings * - * The CLI command show sqlite status returns status information - * about the running driver. + * The CLI command sqlite show settings displays information + * about the running driver settings. * * \section credits_sec Credits * @@ -444,14 +444,14 @@ const char *keyfield, const char *entity, va_list ap); /*! - * \brief Asterisk callback function for the CLI status command. + * \brief Asterisk callback function for the CLI show settings command. * * \param e CLI command * \param cmd * \param a CLI argument list * \return RESULT_SUCCESS */ -static char *handle_cli_show_sqlite_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); +static char *handle_cli_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); static char *handle_cli_sqlite_show_tables(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a); static int realtime_require_handler(const char *database, const char *table, va_list ap); @@ -466,7 +466,7 @@ /*! Set to 1 if the CDR callback function was registered. */ static int cdr_registered; -/*! Set to 1 if the CLI status command callback function was registered. */ +/*! Set to 1 if the CLI show settings command callback function was registered. */ static int cli_status_registered; /*! The path of the database file. */ @@ -502,11 +502,11 @@ AST_MUTEX_DEFINE_STATIC(mutex); /*! - * Structure containing details and callback functions for the CLI status - * command. + * Structure containing details and callback functions for the CLI show + * settings command. */ -static struct ast_cli_entry cli_status[] = { - AST_CLI_DEFINE(handle_cli_show_sqlite_status, "Show status information about the SQLite 2 driver"), +static struct ast_cli_entry cli_show_settings[] = { + AST_CLI_DEFINE(handle_cli_show_settings, "Display information about the SQLite 2 driver settings"), AST_CLI_DEFINE(handle_cli_sqlite_show_tables, "Cached table information about the SQLite 2 driver"), }; @@ -1664,14 +1664,14 @@ return 0; } -static char *handle_cli_show_sqlite_status(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +static char *handle_cli_show_settings(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { switch (cmd) { case CLI_INIT: - e->command = "sqlite show status"; + e->command = "sqlite show settings"; e->usage = - "Usage: sqlite show status\n" - " Show status information about the SQLite 2 driver\n"; + "Usage: sqlite show settings\n" + " Display information about the SQLite 2 driver settings.\n"; return NULL; case CLI_GENERATE: return NULL; @@ -1739,7 +1739,7 @@ static int unload_module(void) { if (cli_status_registered) - ast_cli_unregister_multiple(cli_status, ARRAY_LEN(cli_status)); + ast_cli_unregister_multiple(cli_show_settings, ARRAY_LEN(cli_show_settings)); if (cdr_registered) ast_cdr_unregister(RES_CONFIG_SQLITE_NAME); @@ -1854,7 +1854,7 @@ cdr_registered = 1; } - error = ast_cli_register_multiple(cli_status, ARRAY_LEN(cli_status)); + error = ast_cli_register_multiple(cli_show_settings, ARRAY_LEN(cli_show_settings)); if (error) { unload_module();