Index: main/rtp.c =================================================================== --- main/rtp.c (revision 214596) +++ main/rtp.c (working copy) @@ -3989,14 +3989,18 @@ return res; } -static char *rtp_do_debug_ip(struct ast_cli_args *a) +static char *rtp_do_debug_ip(struct ast_cli_args *a, int deprecated) { struct hostent *hp; struct ast_hostent ahp; int port = 0; char *p, *arg; - arg = a->argv[3]; + if (deprecated == 1) { + arg = a->argv[3]; + } else { + arg = a->argv[4]; + } p = strstr(arg, ":"); if (p) { *p = '\0'; @@ -4078,7 +4082,7 @@ } else { if (strncasecmp(a->argv[2], "ip", 2)) return CLI_SHOWUSAGE; - return rtp_do_debug_ip(a); + return rtp_do_debug_ip(a, 1); } return CLI_SUCCESS; @@ -4111,7 +4115,7 @@ return CLI_SUCCESS; } } else if (a->argc == e->args +1) { /* ip */ - return rtp_do_debug_ip(a); + return rtp_do_debug_ip(a, 0); } return CLI_SHOWUSAGE; /* default, failure */