62 static const char app[] =
"Milliwatt";
81 int i, *indexp = (
int *) data, res;
96 if (samples > maxsamples) {
101 len = samples *
sizeof (buf[0]);
106 for (i = 0; i <
len; i++) {
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
static int unload_module(void)
void *(* alloc)(struct ast_channel *chan, void *params)
int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen, void *params)
ast_channel_state
ast_channel states
int ast_unregister_application(const char *app)
Unregister an application.
struct ast_frame_subclass subclass
#define ast_strlen_zero(foo)
General Asterisk PBX channel definitions.
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
static int load_module(void)
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
static void * milliwatt_alloc(struct ast_channel *chan, void *params)
Core PBX routines and definitions.
static void milliwatt_release(struct ast_channel *chan, void *data)
static const char digital_milliwatt[]
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define ast_calloc(num, len)
A wrapper for calloc()
int ast_write(struct ast_channel *chan, struct ast_frame *frame)
Write a frame to a channel This function writes the given frame to the indicated channel.
static struct ast_generator milliwattgen
static int milliwatt_exec(struct ast_channel *chan, const char *data)
void ast_deactivate_generator(struct ast_channel *chan)
const char * ast_channel_name(const struct ast_channel *chan)
int ast_answer(struct ast_channel *chan)
Answer a channel.
Data structure associated with a single frame of data.
int ast_playtones_start(struct ast_channel *chan, int vol, const char *tonelist, int interruptible)
Start playing a list of tones on a channel.
union ast_frame::@263 data
enum ast_frame_type frametype
struct ast_format * format
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
static int old_milliwatt_exec(struct ast_channel *chan)
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.