From fca9962766400b766e16f4fabbc6ef24ae1e6e1f Mon Sep 17 00:00:00 2001 From: Gregory Nietsky Date: Mon, 3 Oct 2011 14:24:45 +0000 Subject: Merged revisions 338995 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/10 ........ r338995 | irroot | 2011-10-03 16:21:40 +0200 (Mon, 03 Oct 2011) | 6 lines Remove the channel function OOH323() and place its options into CHANNEL() channel drivers should not have there own dialplan functions. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@338996 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- addons/chan_ooh323.c | 54 ++++------------------------------------------------ 1 file changed, 4 insertions(+), 50 deletions(-) (limited to 'addons/chan_ooh323.c') diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 9f3f33dd0..621459a91 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -25,42 +25,6 @@ #include "chan_ooh323.h" #include -/*** DOCUMENTATION - - - Allow Setting / Reading OOH323 Settings - - - - - - Fax Detect [R/W] - Returns 0 or 1 - Write yes or no - - - - - t38support [R/W] - Returns 0 or 1 - Write yes or no - - - - - Returns h323id [R] - - - - - - Read and set channel parameters in the dialplan. - name is one of the above only those with a [W] can be writen to. - - - -***/ - #define FORMAT_STRING_SIZE 512 /* Defaults */ @@ -118,6 +82,8 @@ static int ooh323_write(struct ast_channel *ast, struct ast_frame *f); static int ooh323_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen); static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, int *datalen); static int ooh323_fixup(struct ast_channel *oldchan, struct ast_channel *newchan); +static int function_ooh323_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len); +static int function_ooh323_write(struct ast_channel *chan, const char *cmd, char *data, const char *value); static enum ast_rtp_glue_result ooh323_get_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp); static enum ast_rtp_glue_result ooh323_get_vrtp_peer(struct ast_channel *chan, struct ast_rtp_instance **rtp); @@ -151,7 +117,8 @@ static struct ast_channel_tech ooh323_tech = { .queryoption = ooh323_queryoption, .bridge = ast_rtp_instance_bridge, /* XXX chan unlocked ? */ .early_bridge = ast_rtp_instance_early_bridge, - + .func_channel_read = function_ooh323_read, + .func_channel_write = function_ooh323_write, }; static struct ast_rtp_glue ooh323_rtp = { @@ -3518,13 +3485,6 @@ static int function_ooh323_write(struct ast_channel *chan, const char *cmd, char return res; } -/*! \brief Structure to declare a dialplan function: OOH323 */ -static struct ast_custom_function ooh323_function = { - .name = "OOH323", - .read = function_ooh323_read, - .write = function_ooh323_write, -}; - static int load_module(void) { int res; @@ -3693,9 +3653,6 @@ static int load_module(void) restart_monitor(); } - /* Register dialplan functions */ - ast_custom_function_register(&ooh323_function); - return 0; } @@ -4086,9 +4043,6 @@ static int unload_module(void) } ooH323EpDestroy(); - /* Unregister dial plan functions */ - ast_custom_function_unregister(&ooh323_function); - if (gH323Debug) { ast_verbose("+++ ooh323 unload_module \n"); } -- cgit v1.2.3