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"
Go to the source code of this file.
Functions | |
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) |
AST_MODULE_INFO_STANDARD (ASTERISK_GPL_KEY,"Call Control Configuration Function") | |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_custom_function | cc_function |
Call Completion Supplementary Services implementation.
Definition in 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, and ast_channel_unlock.
00073 { 00074 struct ast_cc_config_params *cc_params; 00075 int res; 00076 00077 ast_channel_lock(chan); 00078 if (!(cc_params = ast_channel_get_cc_config_params(chan))) { 00079 ast_channel_unlock(chan); 00080 return -1; 00081 } 00082 00083 res = ast_cc_get_param(cc_params, data, buf, buf_len); 00084 ast_channel_unlock(chan); 00085 return res; 00086 }
static int acf_cc_write | ( | struct ast_channel * | chan, | |
const char * | cmd, | |||
char * | data, | |||
const char * | value | |||
) | [static] |
Definition at line 88 of file func_callcompletion.c.
References ast_cc_set_param(), ast_channel_get_cc_config_params(), ast_channel_lock, and ast_channel_unlock.
00090 { 00091 struct ast_cc_config_params *cc_params; 00092 int res; 00093 00094 ast_channel_lock(chan); 00095 if (!(cc_params = ast_channel_get_cc_config_params(chan))) { 00096 ast_channel_unlock(chan); 00097 return -1; 00098 } 00099 00100 res = ast_cc_set_param(cc_params, data, value); 00101 ast_channel_unlock(chan); 00102 return res; 00103 }
AST_MODULE_INFO_STANDARD | ( | ASTERISK_GPL_KEY | , | |
"Call Control Configuration Function" | ||||
) |
static int load_module | ( | void | ) | [static] |
Definition at line 116 of file func_callcompletion.c.
References ast_custom_function_register, AST_MODULE_LOAD_DECLINE, and AST_MODULE_LOAD_SUCCESS.
00117 { 00118 return ast_custom_function_register(&cc_function) == 0 ? AST_MODULE_LOAD_SUCCESS : AST_MODULE_LOAD_DECLINE; 00119 }
static int unload_module | ( | void | ) | [static] |
Definition at line 111 of file func_callcompletion.c.
References ast_custom_function_unregister().
00112 { 00113 return ast_custom_function_unregister(&cc_function); 00114 }
struct ast_custom_function cc_function [static] |
{ .name = "CALLCOMPLETION", .read = acf_cc_read, .write = acf_cc_write, }
Definition at line 105 of file func_callcompletion.c.