diff options
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r-- | channels/chan_mgcp.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index e1eb21e5e..02a7600df 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -1045,11 +1045,11 @@ static int mgcp_show_endpoints(int fd, int argc, char *argv[]) } static char show_endpoints_usage[] = -"Usage: mgcp endpoint list\n" +"Usage: mgcp show endpoints\n" " Lists all endpoints known to the MGCP (Media Gateway Control Protocol) subsystem.\n"; static char audit_endpoint_usage[] = -"Usage: mgcp endpoint audit <endpointid>\n" +"Usage: mgcp audit endpoint <endpointid>\n" " Lists the capabilities of an endpoint in the MGCP (Media Gateway Control Protocol) subsystem.\n" " mgcp debug MUST be on to see the results of this command.\n"; @@ -1058,12 +1058,13 @@ static char debug_usage[] = " Enables dumping of MGCP packets for debugging purposes\n"; static char no_debug_usage[] = -"Usage: mgcp nodebug\n" +"Usage: mgcp debug off\n" " Disables dumping of MGCP packets for debugging purposes\n"; static char mgcp_reload_usage[] = "Usage: mgcp reload\n" -" Reloads MGCP configuration from mgcp.conf\n"; +" Reloads MGCP configuration from mgcp.conf\n" +" Deprecated: please use 'reload chan_mgcp.so' instead.\n"; static int mgcp_audit_endpoint(int fd, int argc, char *argv[]) { @@ -1129,7 +1130,7 @@ static int mgcp_do_debug(int fd, int argc, char *argv[]) static int mgcp_no_debug(int fd, int argc, char *argv[]) { - if (argc != 2) + if (argc != 3) return RESULT_SHOWUSAGE; mgcpdebug = 0; ast_cli(fd, "MGCP Debugging Disabled\n"); @@ -1137,11 +1138,11 @@ static int mgcp_no_debug(int fd, int argc, char *argv[]) } static struct ast_cli_entry cli_mgcp[] = { - { { "mgcp", "endpoint", "audit", NULL }, + { { "mgcp", "audit", "endpoint", NULL }, mgcp_audit_endpoint, "Audit specified MGCP endpoint", audit_endpoint_usage }, - { { "mgcp", "endpoint", "list", NULL }, + { { "mgcp", "show", "endpoints", NULL }, mgcp_show_endpoints, "List defined MGCP endpoints", show_endpoints_usage }, @@ -1149,7 +1150,7 @@ static struct ast_cli_entry cli_mgcp[] = { mgcp_do_debug, "Enable MGCP debugging", debug_usage }, - { { "mgcp", "nodebug", NULL }, + { { "mgcp", "debug", "off", NULL }, mgcp_no_debug, "Disable MGCP debugging", no_debug_usage }, @@ -4296,6 +4297,12 @@ static int mgcp_do_reload(void) static int mgcp_reload(int fd, int argc, char *argv[]) { + static int deprecated = 0; + if (!deprecated && argc > 0) { + ast_log(LOG_WARNING, "'mgcp reload' is deprecated. Please use 'reload chan_mgcp.so' instead.\n"); + deprecated = 1; + } + ast_mutex_lock(&mgcp_reload_lock); if (mgcp_reloading) { ast_verbose("Previous mgcp reload not yet done\n"); |