App to flash a DAHDI trunk.
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 = "Flash channel 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 char * | app = "Flash" |
|
static struct ast_module_info * | ast_module_info = &__mod_info |
|
App to flash a DAHDI trunk.
- Author
- Mark Spencer marks.nosp@m.ter@.nosp@m.digiu.nosp@m.m.co.nosp@m.m
Definition in file app_flash.c.
static void __reg_module |
( |
void |
| ) |
|
|
static |
static void __unreg_module |
( |
void |
| ) |
|
|
static |
static int dahdi_wait_event |
( |
int |
fd | ) |
|
|
inlinestatic |
Definition at line 66 of file app_flash.c.
Referenced by flash_exec().
70 i = DAHDI_IOMUX_SIGEVENT;
71 if (ioctl(fd, DAHDI_IOMUX, &i) == -1)
return -1;
72 if (ioctl(fd, DAHDI_GETEVENT, &j) == -1)
return -1;
static int flash_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 76 of file app_flash.c.
References ast_log(), ast_safe_sleep(), ast_verb, dahdi_wait_event(), errno, ast_channel::fds, LOG_WARNING, ast_channel::name, ast_channel::tech, and ast_channel_tech::type.
Referenced by load_module().
80 struct dahdi_params dahdip;
82 if (strcasecmp(chan->
tech->
type,
"DAHDI")) {
87 memset(&dahdip, 0,
sizeof(dahdip));
88 res = ioctl(chan->
fds[0], DAHDI_GET_PARAMS, &dahdip);
90 if (dahdip.sigtype & __DAHDI_SIG_FXS) {
92 res = ioctl(chan->
fds[0], DAHDI_HOOK, &x);
93 if (!res || (
errno == EINPROGRESS)) {
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
#define ast_verb(level,...)
static int dahdi_wait_event(int fd)
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...
struct ast_channel_tech * tech
static int load_module |
( |
void |
| ) |
|
|
static |
static int unload_module |
( |
void |
| ) |
|
|
static |
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Flash channel 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 |