aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-12 06:46:04 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-12 06:46:04 +0000
commite005e919bd11efc270b218eb4d43117290bfe7ed (patch)
tree95cbe393b660ef9b967378388db5bd09c7a890f4 /channels
parentd6ee75c629ce205626eb7cd813dc74f709939f42 (diff)
This commit does two things:
- Add CLI aliases module to asterisk. - Remove all deprecated CLI commands from the code Initial work done by file. Junk-Y and lmadsen did a lot of work and testing to get the list of deprecated commands into the configuration file. Deprecated CLI commands are now handled by this new module, see cli_aliases.conf for more info about that. ok russellb@ via reviewboard (closes issue #13735) Reported by: mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156120 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_mgcp.c28
-rw-r--r--channels/chan_sip.c34
-rw-r--r--channels/chan_skinny.c32
3 files changed, 3 insertions, 91 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 083c0e3e2..de502dac8 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -1139,31 +1139,6 @@ static char *handle_mgcp_audit_endpoint(struct ast_cli_entry *e, int cmd, struct
return CLI_SUCCESS;
}
-static char *handle_mgcp_set_debug_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- switch (cmd) {
- case CLI_INIT:
- e->command = "mgcp set debug [off]";
- e->usage =
- "Usage: mgcp set debug [off]\n"
- " Enables/Disables dumping of MGCP packets for debugging purposes\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc < 3 || a->argc > 4)
- return CLI_SHOWUSAGE;
- if (a->argc == 3) {
- mgcpdebug = 1;
- ast_cli(a->fd, "MGCP Debugging Enabled\n");
- } else if (!strncasecmp(a->argv[3], "off", 3)) {
- mgcpdebug = 0;
- ast_cli(a->fd, "MGCP Debugging Disabled\n");
- }
- return CLI_SUCCESS;
-}
-
static char *handle_mgcp_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
switch (cmd) {
@@ -1192,11 +1167,10 @@ static char *handle_mgcp_set_debug(struct ast_cli_entry *e, int cmd, struct ast_
return CLI_SUCCESS;
}
-static struct ast_cli_entry cli_mgcp_set_debug_deprecated = AST_CLI_DEFINE(handle_mgcp_set_debug_deprecated, "Enable/Disable MGCP debugging");
static struct ast_cli_entry cli_mgcp[] = {
AST_CLI_DEFINE(handle_mgcp_audit_endpoint, "Audit specified MGCP endpoint"),
AST_CLI_DEFINE(handle_mgcp_show_endpoints, "List defined MGCP endpoints"),
- AST_CLI_DEFINE(handle_mgcp_set_debug, "Enable/Disable MGCP debugging", .deprecate_cmd = &cli_mgcp_set_debug_deprecated),
+ AST_CLI_DEFINE(handle_mgcp_set_debug, "Enable/Disable MGCP debugging"),
AST_CLI_DEFINE(mgcp_reload, "Reload MGCP configuration"),
};
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3a0908fb0..d1c77c406 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2341,7 +2341,6 @@ static char *sip_do_debug_ip(int fd, char *arg);
static char *sip_do_debug_peer(int fd, char *arg);
static char *sip_do_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static char *sip_cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
-static char *sip_do_history_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static char *sip_set_history(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
static int sip_dtmfmode(struct ast_channel *chan, void *data);
static int sip_addheader(struct ast_channel *chan, void *data);
@@ -15368,36 +15367,6 @@ static char *sip_cli_notify(struct ast_cli_entry *e, int cmd, struct ast_cli_arg
return CLI_SUCCESS;
}
-/*! \brief Enable/Disable SIP History logging (CLI) - deprecated. use sip_set_history instead */
-static char *sip_do_history_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- switch (cmd) {
- case CLI_INIT:
- e->command = "sip history [off]";
- e->usage =
- "Usage: sip history [off]\n"
- " Enables/Disables recording of SIP dialog history for debugging purposes.\n"
- " Use 'sip show history' to view the history of a call number.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc < 2 || a->argc > 3) {
- return CLI_SHOWUSAGE;
- }
- if (a->argc == 2) {
- recordhistory = TRUE;
- ast_cli(a->fd, "SIP History Recording Enabled (use 'sip show history')\n");
- } else {
- if (strncasecmp(a->argv[2], "off", 3))
- return CLI_SHOWUSAGE;
- recordhistory = FALSE;
- ast_cli(a->fd, "SIP History Recording Disabled\n");
- }
- return CLI_SUCCESS;
-}
-
/*! \brief Enable/Disable SIP History logging (CLI) */
static char *sip_set_history(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
@@ -23728,7 +23697,6 @@ static int reload(void)
return 1;
}
-static struct ast_cli_entry cli_sip_do_history_deprecated = AST_CLI_DEFINE(sip_do_history_deprecated, "Enable/Disable SIP history");
/*! \brief SIP Cli commands definition */
static struct ast_cli_entry cli_sip[] = {
AST_CLI_DEFINE(sip_show_channels, "List active SIP channels or subscriptions"),
@@ -23749,7 +23717,7 @@ static struct ast_cli_entry cli_sip[] = {
AST_CLI_DEFINE(sip_show_sched, "Present a report on the status of the sched queue"),
AST_CLI_DEFINE(sip_prune_realtime, "Prune cached Realtime users/peers"),
AST_CLI_DEFINE(sip_do_debug, "Enable/Disable SIP debugging"),
- AST_CLI_DEFINE(sip_set_history, "Enable/Disable SIP history", .deprecate_cmd = &cli_sip_do_history_deprecated),
+ AST_CLI_DEFINE(sip_set_history, "Enable/Disable SIP history"),
AST_CLI_DEFINE(sip_reload, "Reload SIP configuration"),
AST_CLI_DEFINE(sip_show_tcp, "List TCP Connections")
};
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 8b06980c1..a72345cfe 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2540,35 +2540,6 @@ static struct ast_rtp_protocol skinny_rtp = {
.set_rtp_peer = skinny_set_rtp_peer,
};
-static char *handle_skinny_set_debug_deprecated(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- switch (cmd) {
- case CLI_INIT:
- e->command = "skinny set debug [off]";
- e->usage =
- "Usage: skinny set debug [off]\n"
- " Enables/Disables dumping of Skinny packets for debugging purposes\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc < 3 || a->argc > 4)
- return CLI_SHOWUSAGE;
-
- if (a->argc == 3) {
- skinnydebug = 1;
- ast_cli(a->fd, "Skinny Debugging Enabled\n");
- return CLI_SUCCESS;
- } else if (!strncasecmp(a->argv[3], "off", 3)) {
- skinnydebug = 0;
- ast_cli(a->fd, "Skinny Debugging Disabled\n");
- return CLI_SUCCESS;
- } else {
- return CLI_SHOWUSAGE;
- }
-}
-
static char *handle_skinny_set_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
switch (cmd) {
@@ -3067,14 +3038,13 @@ static char *handle_skinny_show_settings(struct ast_cli_entry *e, int cmd, struc
return CLI_SUCCESS;
}
-static struct ast_cli_entry cli_skinny_set_debug_deprecated = AST_CLI_DEFINE(handle_skinny_set_debug_deprecated, "Enable/Disable Skinny debugging");
static struct ast_cli_entry cli_skinny[] = {
AST_CLI_DEFINE(handle_skinny_show_devices, "List defined Skinny devices"),
AST_CLI_DEFINE(handle_skinny_show_device, "List Skinny device information"),
AST_CLI_DEFINE(handle_skinny_show_lines, "List defined Skinny lines per device"),
AST_CLI_DEFINE(handle_skinny_show_line, "List Skinny line information"),
AST_CLI_DEFINE(handle_skinny_show_settings, "List global Skinny settings"),
- AST_CLI_DEFINE(handle_skinny_set_debug, "Enable/Disable Skinny debugging", .deprecate_cmd = &cli_skinny_set_debug_deprecated),
+ AST_CLI_DEFINE(handle_skinny_set_debug, "Enable/Disable Skinny debugging"),
AST_CLI_DEFINE(handle_skinny_reset, "Reset Skinny device(s)"),
};