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