static char *handle_cli_rtcp_set_stats(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) { switch (cmd) { case CLI_INIT: e->command = "rtcp stats {on|off}"; e->usage = "Usage: rtcp stats {on|off}\n" " Enable/Disable dumping of RTCP stats.\n"; return NULL; case CLI_GENERATE: return NULL; } if (a->argc != e->args) return CLI_SHOWUSAGE; if (strncasecmp(a->argv[e->args-1], "on", 2) && strncasecmp(a->argv[e->args-1], "off", 3)) return CLI_SHOWUSAGE; rtcpstats = (a->argc == 3) ? 0 : 1; ast_cli(a->fd, "RTCP Stats %s\n", rtcpstats ? "Enabled" : "Disabled"); return CLI_SUCCESS; }