Loopback PBX Module.
More...
Go to the source code of this file.
|
static void | __reg_module (void) |
|
static void | __unreg_module (void) |
|
struct ast_module * | AST_MODULE_SELF_SYM (void) |
|
static int | load_module (void) |
|
static int | loopback_canmatch (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
|
static int | loopback_exec (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
|
static int | loopback_exists (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
|
static int | loopback_matchmore (struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data) |
|
static void | loopback_parse (char **newexten, char **newcontext, int *priority, char **newpattern, char *buf) |
|
static char * | loopback_subst (char *buf, int buflen, const char *exten, const char *context, int priority, const char *data) |
|
static int | unload_module (void) |
|
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Loopback Switch" , .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 const struct ast_module_info * | ast_module_info = &__mod_info |
|
static struct ast_switch | loopback_switch |
|
Loopback PBX Module.
Definition in file pbx_loopback.c.
◆ LOOPBACK_COMMON
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
◆ loopback_canmatch()
static int loopback_canmatch |
( |
struct ast_channel * |
chan, |
|
|
const char * |
context, |
|
|
const char * |
exten, |
|
|
int |
priority, |
|
|
const char * |
callerid, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 140 of file pbx_loopback.c.
141{
144 res = 0;
145 else
147 return res;
148}
int ast_canmatch_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Looks for a valid matching extension.
int ast_extension_match(const char *pattern, const char *extension)
Determine if a given extension matches a given pattern (in NXX format)
References ast_canmatch_extension(), ast_extension_match(), and LOOPBACK_COMMON.
◆ loopback_exec()
static int loopback_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
context, |
|
|
const char * |
exten, |
|
|
int |
priority, |
|
|
const char * |
callerid, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 150 of file pbx_loopback.c.
151{
152 int found;
155 return res;
156}
int ast_spawn_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid, int *found, int combined_find_spawn)
Launch a new extension (i.e. new stack)
References ast_spawn_extension(), and LOOPBACK_COMMON.
◆ loopback_exists()
static int loopback_exists |
( |
struct ast_channel * |
chan, |
|
|
const char * |
context, |
|
|
const char * |
exten, |
|
|
int |
priority, |
|
|
const char * |
callerid, |
|
|
const char * |
data |
|
) |
| |
|
static |
◆ loopback_matchmore()
static int loopback_matchmore |
( |
struct ast_channel * |
chan, |
|
|
const char * |
context, |
|
|
const char * |
exten, |
|
|
int |
priority, |
|
|
const char * |
callerid, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 158 of file pbx_loopback.c.
159{
162 res = 0;
163 else
165 return res;
166}
int ast_matchmore_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Looks to see if adding anything to this extension might match something. (exists ^ canmatch)
References ast_extension_match(), ast_matchmore_extension(), and LOOPBACK_COMMON.
◆ loopback_parse()
static void loopback_parse |
( |
char ** |
newexten, |
|
|
char ** |
newcontext, |
|
|
int * |
priority, |
|
|
char ** |
newpattern, |
|
|
char * |
buf |
|
) |
| |
|
static |
Definition at line 109 of file pbx_loopback.c.
110{
111 char *con;
112 char *pri;
113 *newpattern = strchr(
buf,
'/');
114 if (*newpattern)
115 *(*newpattern)++ = '\0';
116 con = strchr(
buf,
'@');
117 if (con) {
118 *con++ = '\0';
119 pri = strchr(con, ':');
120 } else
121 pri = strchr(
buf,
':');
125 *newcontext = con;
128}
static force_inline int attribute_pure ast_strlen_zero(const char *s)
References ast_strlen_zero(), buf, and priority.
◆ loopback_subst()
static char * loopback_subst |
( |
char * |
buf, |
|
|
int |
buflen, |
|
|
const char * |
exten, |
|
|
const char * |
context, |
|
|
int |
priority, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 84 of file pbx_loopback.c.
85{
89
94 }
97 }
100 }
101
103
107}
#define ast_var_assign(name, value)
void ast_var_delete(struct ast_var_t *var)
#define AST_LIST_HEAD_INIT_NOLOCK(head)
Initializes a list head structure.
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
void pbx_substitute_variables_varshead(struct varshead *headp, const char *cp1, char *cp2, int count)
References AST_LIST_HEAD_INIT_NOLOCK, AST_LIST_INSERT_HEAD, AST_LIST_REMOVE_HEAD, ast_var_assign, ast_var_delete(), buf, voicemailpwcheck::context, pbx_substitute_variables_varshead(), priority, and tmp().
◆ 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 = "Loopback Switch" , .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 |
◆ ast_module_info
◆ loopback_switch