Asterisk - The Open Source Telephony Project GIT-master-a63eec2
|
Function that intercepts HOLD frames from channels and raises events. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/app.h"
#include "asterisk/frame.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_channels.h"
Go to the source code of this file.
Data Structures | |
struct | hold_intercept_data |
Private data structure used with the function's datastore. More... | |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | hold_intercept_fn_write (struct ast_channel *chan, const char *function, char *data, const char *value) |
static struct ast_frame * | hold_intercept_framehook (struct ast_channel *chan, struct ast_frame *f, enum ast_framehook_event event, void *data) |
Frame hook that is called to intercept hold/unhold. | |
static int | hold_intercept_framehook_consume (void *data, enum ast_frame_type type) |
Callback function which informs upstream if we are consuming a frame of a specific type. | |
static int | load_module (void) |
static int | remove_hold_intercept (struct ast_channel *chan) |
static int | set_hold_intercept (struct ast_channel *chan) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Hold interception dialplan function" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const struct ast_datastore_info | hold_intercept_datastore |
The channel datastore the function uses to store state. | |
static struct ast_custom_function | hold_intercept_function |
Definition of the HOLD_INTERCEPT function. | |
Function that intercepts HOLD frames from channels and raises events.
Definition in file func_holdintercept.c.
|
static |
Definition at line 237 of file func_holdintercept.c.
|
static |
Definition at line 237 of file func_holdintercept.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 237 of file func_holdintercept.c.
|
static |
Definition at line 193 of file func_holdintercept.c.
References ast_log, AST_LOG_WARNING, ast_strlen_zero(), ast_framehook_interface::data, remove_hold_intercept(), and set_hold_intercept().
|
static |
Frame hook that is called to intercept hold/unhold.
Definition at line 111 of file func_holdintercept.c.
References ast_channel_hold_type(), ast_channel_publish_cached_blob(), ast_channel_unhold_type(), AST_CONTROL_HOLD, AST_CONTROL_UNHOLD, AST_FRAME_CONTROL, AST_FRAMEHOOK_EVENT_WRITE, ast_frfree, ast_null_frame, ast_frame::frametype, ast_frame_subclass::integer, NULL, and ast_frame::subclass.
Referenced by set_hold_intercept().
|
static |
Callback function which informs upstream if we are consuming a frame of a specific type.
Definition at line 141 of file func_holdintercept.c.
References AST_FRAME_CONTROL, and type.
Referenced by set_hold_intercept().
|
static |
Definition at line 232 of file func_holdintercept.c.
References ast_custom_function_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and hold_intercept_function.
|
static |
Definition at line 80 of file func_holdintercept.c.
References ast_channel_datastore_find(), ast_channel_datastore_remove(), ast_channel_name(), ast_datastore_free(), ast_framehook_detach(), ast_log, AST_LOG_WARNING, ast_datastore::data, hold_intercept_data::framehook_id, hold_intercept_datastore, NULL, and SCOPED_CHANNELLOCK.
Referenced by hold_intercept_fn_write().
|
static |
Definition at line 147 of file func_holdintercept.c.
References ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_name(), ast_datastore_alloc, ast_datastore_free(), ast_framehook_attach(), AST_FRAMEHOOK_INTERFACE_VERSION, ast_free, ast_log, AST_LOG_WARNING, ast_datastore::data, ast_framehook_interface::data, hold_intercept_datastore, hold_intercept_framehook(), hold_intercept_framehook_consume(), NULL, SCOPED_CHANNELLOCK, and ast_framehook_interface::version.
Referenced by hold_intercept_fn_write().
|
static |
Definition at line 226 of file func_holdintercept.c.
References ast_custom_function_unregister(), and hold_intercept_function.
|
static |
Definition at line 237 of file func_holdintercept.c.
|
static |
Definition at line 237 of file func_holdintercept.c.
|
static |
The channel datastore the function uses to store state.
Definition at line 75 of file func_holdintercept.c.
Referenced by remove_hold_intercept(), and set_hold_intercept().
|
static |
Definition of the HOLD_INTERCEPT function.
Definition at line 220 of file func_holdintercept.c.
Referenced by load_module(), and unload_module().