199 if (framedata->
values[i]) {
226 if (!(framedata =
ast_calloc(1,
sizeof(*framedata)))) {
230 interface.
data = framedata;
232 if (!strcasecmp(
data,
"RX")) {
239 snprintf(buffer,
sizeof(
value) + 2,
",%s,",
value);
258 id = datastore->
data;
287 .
name =
"FRAME_DROP",
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
#define ast_malloc(len)
A wrapper for malloc()
General Asterisk PBX channel definitions.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore *datastore)
Remove a datastore from a channel.
#define ast_channel_lock(chan)
#define ast_channel_unlock(chan)
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
#define ast_datastore_alloc(info, uid)
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
@ AST_FRAMEHOOK_EVENT_WRITE
@ AST_FRAMEHOOK_EVENT_READ
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
#define AST_FRAMEHOOK_INTERFACE_VERSION
static int frame_drop_helper(struct ast_channel *chan, const char *cmd, char *data, const char *value)
static struct @170 frametype2str[]
static struct ast_custom_function frame_drop_function
static const struct ast_datastore_info frame_drop_datastore
static struct @171 controlframetype2str[]
static struct ast_frame * hook_event_cb(struct ast_channel *chan, struct ast_frame *frame, enum ast_framehook_event event, void *data)
AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Function to drop frames on a channel.")
static void hook_destroy_cb(void *framedata)
static void datastore_destroy_cb(void *data)
static int load_module(void)
static int unload_module(void)
char * strcasestr(const char *, const char *)
ast_frame_type
Frame types.
@ AST_CONTROL_REDIRECTING
@ AST_CONTROL_TAKEOFFHOOK
@ AST_CONTROL_CONNECTED_LINE
struct ast_frame ast_null_frame
Asterisk module definitions.
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Core PBX routines and definitions.
#define ast_custom_function_register(acf)
Register a custom function.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
Main Channel structure associated with a channel.
Data structure associated with a custom dialplan function.
Structure for a data store type.
Structure for a data store object.
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
enum ast_frame_type frametype
int values[ARRAY_LEN(frametype2str)]
int controlvalues[ARRAY_LEN(controlframetype2str)]