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 = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static char * | app = "Flash" |
|
static const 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.
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ dahdi_wait_event()
static int dahdi_wait_event |
( |
int |
fd | ) |
|
|
inlinestatic |
Definition at line 64 of file app_flash.c.
65{
66
67 int i,j=0;
68 i = DAHDI_IOMUX_SIGEVENT;
69 if (ioctl(fd, DAHDI_IOMUX, &i) == -1) return -1;
70 if (ioctl(fd, DAHDI_GETEVENT, &j) == -1) return -1;
71 return j;
72}
Referenced by flash_exec().
◆ flash_exec()
static int flash_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 74 of file app_flash.c.
75{
76 int res = -1;
77 int x;
78 struct dahdi_params dahdip;
79
82 return -1;
83 }
84
85 memset(&dahdip, 0, sizeof(dahdip));
87 if (!res) {
88 if (dahdip.sigtype & __DAHDI_SIG_FXS) {
89 x = DAHDI_FLASH;
91 if (!res || (
errno == EINPROGRESS)) {
92 if (res) {
93
95 }
98 } else
100 } else
102 } else
104
105 return res;
106}
static int dahdi_wait_event(int fd)
const char * ast_channel_name(const struct ast_channel *chan)
int ast_channel_fd(const struct ast_channel *chan, int which)
const struct ast_channel_tech * ast_channel_tech(const struct ast_channel *chan)
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
#define ast_verb(level,...)
References ast_channel_fd(), ast_channel_name(), ast_channel_tech(), ast_log, ast_safe_sleep(), ast_verb, dahdi_wait_event(), errno, LOG_WARNING, and type.
Referenced by load_module().
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
◆ unload_module()
static int unload_module |
( |
void |
| ) |
|
|
static |
◆ __mod_info
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 = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
|
static |
◆ app
◆ ast_module_info