diff options
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r-- | channels/chan_h323.c | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c index e98f4b029..e7b06456f 100644 --- a/channels/chan_h323.c +++ b/channels/chan_h323.c @@ -2735,12 +2735,34 @@ static char *handle_cli_h323_show_tokens(struct ast_cli_entry *e, int cmd, struc return CLI_SUCCESS; } +static char *handle_cli_h323_show_version(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) +{ + switch (cmd) { + case CLI_INIT: + e->command = "h323 show version"; + e->usage = + "Usage: h323 show version\n" + " Show the version of the H.323 library in use\n"; + return NULL; + case CLI_GENERATE: + return NULL; + } + + if (a->argc != 3) + return CLI_SHOWUSAGE; + + h323_show_version(); + + return CLI_SUCCESS; +} + static struct ast_cli_entry cli_h323[] = { - AST_CLI_DEFINE(handle_cli_h323_set_trace, "Enable/Disable H.323 Stack Tracing"), - AST_CLI_DEFINE(handle_cli_h323_set_debug, "Enable/Disable H.323 Debugging"), - AST_CLI_DEFINE(handle_cli_h323_cycle_gk, "Manually re-register with the Gatekeper"), - AST_CLI_DEFINE(handle_cli_h323_hangup, "Manually try to hang up a call"), - AST_CLI_DEFINE(handle_cli_h323_show_tokens, "Show all active call tokens"), + AST_CLI_DEFINE(handle_cli_h323_set_trace, "Enable/Disable H.323 Stack Tracing"), + AST_CLI_DEFINE(handle_cli_h323_set_debug, "Enable/Disable H.323 Debugging"), + AST_CLI_DEFINE(handle_cli_h323_cycle_gk, "Manually re-register with the Gatekeper"), + AST_CLI_DEFINE(handle_cli_h323_hangup, "Manually try to hang up a call"), + AST_CLI_DEFINE(handle_cli_h323_show_tokens, "Show all active call tokens"), + AST_CLI_DEFINE(handle_cli_h323_show_version, "Show the version of the H.323 library in use"), }; static void delete_users(void) |