72 unsigned short int tx;
73 unsigned short int rx;
103 for (i = 0; i < samples; i += 2)
143 data = datastore->
data;
194 ni = datastore->
data;
197 if (!strcasecmp(
args.direction,
"tx")) {
200 }
else if (!strcasecmp(
args.direction,
"rx")) {
203 }
else if (!strcasecmp(
args.direction,
"both")) {
206 }
else if (!strcasecmp(
args.direction,
"remove")) {
214 datastore->
data = ni;
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
static const struct ast_datastore_info scramble_datastore
Static structure for datastore information.
Asterisk main include file. File version handling, generic pbx functions.
static void destroy_callback(void *data)
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
static int scramble_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
int ast_audiohook_remove(struct ast_channel *chan, struct ast_audiohook *audiohook)
Remove an audiohook from a specified channel.
Structure for a data store type.
int ast_audiohook_attach(struct ast_channel *chan, struct ast_audiohook *audiohook)
Attach audiohook to channel.
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_audiohook_destroy(struct ast_audiohook *audiohook)
Destroys an audiohook structure.
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.
ast_audiohook_manipulate_callback manipulate_callback
int ast_audiohook_init(struct ast_audiohook *audiohook, enum ast_audiohook_type type, const char *source, enum ast_audiohook_init_flags flags)
Initialize an audiohook structure.
#define ast_audiohook_unlock(ah)
Unlock an audiohook.
#define SCOPED_CHANNELLOCK(varname, chan)
scoped lock specialization for channels.
General Asterisk PBX channel definitions.
Data structure associated with a custom dialplan function.
#define ast_strdupa(s)
duplicate a string in memory from the stack
static int remove_scrambler(struct ast_channel *chan)
Core PBX routines and definitions.
static struct ast_custom_function scramble_function
int ast_audiohook_detach(struct ast_audiohook *audiohook)
Detach audiohook from channel.
#define ast_channel_unlock(chan)
static void parse(struct mgcp_request *req)
static void freq_invert(short *amp, int samples)
#define ast_calloc(num, len)
A wrapper for calloc()
static int scramble_callback(struct ast_audiohook *audiohook, struct ast_channel *chan, struct ast_frame *frame, enum ast_audiohook_direction direction)
const char * ast_channel_name(const struct ast_channel *chan)
Data structure associated with a single frame of data.
enum ast_audiohook_status status
#define ast_datastore_alloc(info, uid)
union ast_frame::@263 data
enum ast_frame_type frametype
static int unload_module(void)
#define ASTERISK_GPL_KEY
The text the key() function should return.
#define ast_audiohook_lock(ah)
Lock an audiohook.
Asterisk module definitions.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
static int load_module(void)
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
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.
#define AST_APP_ARG(name)
Define an application argument.