Digital Milliwatt Test.
More...
Go to the source code of this file.
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Digital Milliwatt (mu-law) Test Application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
|
static const char | app [] = "Milliwatt" |
|
static struct ast_module_info * | ast_module_info = &__mod_info |
|
static const char | digital_milliwatt [] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} |
|
static struct ast_generator | milliwattgen |
|
static void __reg_module |
( |
void |
| ) |
|
|
static |
static void __unreg_module |
( |
void |
| ) |
|
|
static |
static int load_module |
( |
void |
| ) |
|
|
static |
static void* milliwatt_alloc |
( |
struct ast_channel * |
chan, |
|
|
void * |
params |
|
) |
| |
|
static |
static int milliwatt_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 147 of file app_milliwatt.c.
References ast_playtones_start(), ast_safe_sleep(), ast_strlen_zero(), and old_milliwatt_exec().
Referenced by load_module().
149 const char *options = data;
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
int ast_playtones_start(struct ast_channel *chan, int vol, const char *tonelist, int interruptible)
Start playing a list of tones on a channel.
static int old_milliwatt_exec(struct ast_channel *chan)
static int milliwatt_generate |
( |
struct ast_channel * |
chan, |
|
|
void * |
data, |
|
|
int |
len, |
|
|
int |
samples |
|
) |
| |
|
static |
Definition at line 78 of file app_milliwatt.c.
References ARRAY_LEN, AST_FORMAT_ULAW, AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_log(), ast_write(), ast_frame::data, ast_frame::datalen, errno, ast_frame::frametype, len(), LOG_WARNING, ast_channel::name, ast_frame::ptr, and ast_frame::samples.
82 int i, *indexp = (
int *) data;
106 for (i = 0; i <
len; i++) {
#define AST_FRIENDLY_OFFSET
Offset into a frame's data buffer.
static const char digital_milliwatt[]
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
const ast_string_field name
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
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.
Data structure associated with a single frame of data.
enum ast_frame_type frametype
union ast_frame::@172 data
static void milliwatt_release |
( |
struct ast_channel * |
chan, |
|
|
void * |
data |
|
) |
| |
|
static |
static int old_milliwatt_exec |
( |
struct ast_channel * |
chan | ) |
|
|
static |
Definition at line 125 of file app_milliwatt.c.
References ast_channel::_state, ast_activate_generator(), ast_answer(), ast_deactivate_generator(), AST_FORMAT_ULAW, ast_log(), ast_safe_sleep(), ast_set_read_format(), ast_set_write_format(), AST_STATE_UP, LOG_WARNING, and ast_channel::name.
Referenced by milliwatt_exec().
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen, void *params)
int ast_set_write_format(struct ast_channel *chan, format_t format)
Sets write format on channel chan Set write format for channel to whichever component of "format" is ...
int ast_set_read_format(struct ast_channel *chan, format_t format)
Sets read format on channel chan Set read format for channel to whichever component of "format" is be...
enum ast_channel_state _state
const ast_string_field name
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
static struct ast_generator milliwattgen
void ast_deactivate_generator(struct ast_channel *chan)
int ast_answer(struct ast_channel *chan)
Answer a channel.
static int unload_module |
( |
void |
| ) |
|
|
static |
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Digital Milliwatt (mu-law) Test Application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
|
static |
const char app[] = "Milliwatt" |
|
static |
const char digital_milliwatt[] = {0x1e,0x0b,0x0b,0x1e,0x9e,0x8b,0x8b,0x9e} |
|
static |
Initial value:= {
}
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
static void * milliwatt_alloc(struct ast_channel *chan, void *params)
static void milliwatt_release(struct ast_channel *chan, void *data)
Definition at line 119 of file app_milliwatt.c.