func_callcompletion.c File Reference

Call Completion Supplementary Services implementation. More...

#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/ccss.h"
#include "asterisk/pbx.h"

Include dependency graph for func_callcompletion.c:

Go to the source code of this file.

Functions

static void __reg_module (void)
static void __unreg_module (void)
static int acf_cc_read (struct ast_channel *chan, const char *name, char *data, char *buf, size_t buf_len)
static int acf_cc_write (struct ast_channel *chan, const char *cmd, char *data, const char *value)
static int load_module (void)
static int unload_module (void)

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Call Control Configuration Function" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, }
static struct ast_module_infoast_module_info = &__mod_info
static struct ast_custom_function cc_function


Detailed Description

Call Completion Supplementary Services implementation.

Author:
Mark Michelson <mmichelson@digium.com>

Definition in file func_callcompletion.c.


Function Documentation

static void __reg_module ( void   )  [static]

Definition at line 131 of file func_callcompletion.c.

static void __unreg_module ( void   )  [static]

Definition at line 131 of file func_callcompletion.c.

static int acf_cc_read ( struct ast_channel chan,
const char *  name,
char *  data,
char *  buf,
size_t  buf_len 
) [static]

Definition at line 71 of file func_callcompletion.c.

References ast_cc_get_param(), ast_channel_get_cc_config_params(), ast_channel_lock, ast_channel_unlock, ast_log, and LOG_WARNING.

00073 {
00074    struct ast_cc_config_params *cc_params;
00075    int res;
00076 
00077    if (!chan) {
00078       ast_log(LOG_WARNING, "No channel was provided to %s function.\n", name);
00079       return -1;
00080    }
00081 
00082    ast_channel_lock(chan);
00083    if (!(cc_params = ast_channel_get_cc_config_params(chan))) {
00084       ast_channel_unlock(chan);
00085       return -1;
00086    }
00087 
00088    res = ast_cc_get_param(cc_params, data, buf, buf_len);
00089    ast_channel_unlock(chan);
00090    return res;
00091 }

static int acf_cc_write ( struct ast_channel chan,
const char *  cmd,
char *  data,
const char *  value 
) [static]

Definition at line 93 of file func_callcompletion.c.

References ast_cc_set_param(), ast_channel_get_cc_config_params(), ast_channel_lock, ast_channel_unlock, ast_log, and LOG_WARNING.

00095 {
00096    struct ast_cc_config_params *cc_params;
00097    int res;
00098 
00099    if (!chan) {
00100       ast_log(LOG_WARNING, "No channel was provided to %s function.\n", cmd);
00101       return -1;
00102    }
00103 
00104    ast_channel_lock(chan);
00105    if (!(cc_params = ast_channel_get_cc_config_params(chan))) {
00106       ast_channel_unlock(chan);
00107       return -1;
00108    }
00109 
00110    res = ast_cc_set_param(cc_params, data, value);
00111    ast_channel_unlock(chan);
00112    return res;
00113 }

static int load_module ( void   )  [static]

static int unload_module ( void   )  [static]

Definition at line 121 of file func_callcompletion.c.

References ast_custom_function_unregister().

00122 {
00123    return ast_custom_function_unregister(&cc_function);
00124 }


Variable Documentation

struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Call Control Configuration Function" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } [static]

Definition at line 131 of file func_callcompletion.c.

Definition at line 131 of file func_callcompletion.c.

Initial value:

 {
   .name = "CALLCOMPLETION",
   .read = acf_cc_read,
   .write = acf_cc_write,
}

Definition at line 115 of file func_callcompletion.c.


Generated on Thu Apr 16 06:31:12 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6