summaryrefslogtreecommitdiff
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authorJeff Peeler <jpeeler@digium.com>2009-03-17 20:47:31 +0000
committerJeff Peeler <jpeeler@digium.com>2009-03-17 20:47:31 +0000
commit9dc40485f212e6adc3ff87f9bdbe1c68cddfde64 (patch)
tree261d15df0038c3fe050d85bc494340eaed4fe551 /channels/chan_h323.c
parent77b2123a99625dd3c944ebdcf169962c27a16c50 (diff)
Allow H.323 Plus library to be used in addition to the OpenH323 library
Chan_h323 can now be compiled against both the previously supported versions of OpenH323 as well as the current H.323 Plus (version 1.20.2). The configure script has been modified to look in the default install location of h323 to hopefully help avoid using the environment variables OPENH323DIR and PWLIBDIR. Also, the CLI command "h323 show version" has been added which indicates which version of h323 is in use. (closes issue #11261) Reported by: vhatz Patches: asterisk-1.6.0.6-h323plus.patch uploaded by jthurman (license 614) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r--channels/chan_h323.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 051166d4b..2342ecfbb 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -2729,12 +2729,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)