Dial plan macro Implementation. More...
#include "asterisk.h"#include "asterisk/file.h"#include "asterisk/channel.h"#include "asterisk/pbx.h"#include "asterisk/module.h"#include "asterisk/config.h"#include "asterisk/utils.h"#include "asterisk/lock.h"#include "asterisk/app.h"
Go to the source code of this file.
Defines | |
| #define | MACRO_EXIT_RESULT 1024 |
| #define | MAX_ARGS 80 |
Functions | |
| static void | __reg_module (void) |
| static void | __unreg_module (void) |
| static int | _macro_exec (struct ast_channel *chan, const char *data, int exclusive) |
| static struct ast_exten * | find_matching_priority (struct ast_context *c, const char *exten, int priority, const char *callerid) |
| static int | load_module (void) |
| static int | macro_exec (struct ast_channel *chan, const char *data) |
| static int | macro_exit_exec (struct ast_channel *chan, const char *data) |
| static void | macro_fixup (void *data, struct ast_channel *old_chan, struct ast_channel *new_chan) |
| static int | macroexclusive_exec (struct ast_channel *chan, const char *data) |
| static int | macroif_exec (struct ast_channel *chan, const char *data) |
| static int | unload_module (void) |
Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Extension Macros" , .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, } |
| static char * | app = "Macro" |
| static struct ast_module_info * | ast_module_info = &__mod_info |
| static char * | exclusive_app = "MacroExclusive" |
| static char * | exit_app = "MacroExit" |
| static char * | if_app = "MacroIf" |
| static struct ast_datastore_info | macro_ds_info |
Dial plan macro Implementation.
Definition in file app_macro.c.
| #define MACRO_EXIT_RESULT 1024 |
Definition at line 158 of file app_macro.c.
Referenced by _macro_exec(), and macro_exit_exec().
| #define MAX_ARGS 80 |
Definition at line 155 of file app_macro.c.
Referenced by _macro_exec().
| static void __reg_module | ( | void | ) | [static] |
Definition at line 646 of file app_macro.c.
| static void __unreg_module | ( | void | ) | [static] |
Definition at line 646 of file app_macro.c.
| static int _macro_exec | ( | struct ast_channel * | chan, |
| const char * | data, | ||
| int | exclusive | ||
| ) | [static] |
Definition at line 225 of file app_macro.c.
References app2, ast_autoservice_start(), ast_autoservice_stop(), ast_channel_caller(), ast_channel_context(), ast_channel_context_set(), ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_exten(), ast_channel_exten_set(), ast_channel_flags(), ast_channel_lock, ast_channel_macrocontext(), ast_channel_macrocontext_set(), ast_channel_macroexten(), ast_channel_macroexten_set(), ast_channel_macropriority_set(), ast_channel_name(), ast_channel_priority(), ast_channel_priority_set(), ast_channel_unlock, ast_check_hangup(), ast_context_find(), ast_context_lockmacro(), ast_context_unlockmacro(), ast_copy_string(), ast_datastore_alloc(), ast_debug, ast_exists_extension(), AST_FLAG_IN_AUTOLOOP, ast_free, ast_get_context_name(), ast_get_extension_app(), ast_get_extension_app_data(), ast_log(), AST_MAX_CONTEXT, ast_rdlock_context(), ast_rdlock_contexts(), ast_set2_flag, ast_set_flag, ast_spawn_extension(), ast_str_buffer(), ast_str_create(), ast_str_substitute_variables(), ast_strdup, ast_strlen_zero(), ast_test_flag, ast_unlock_context(), ast_unlock_contexts(), ast_verb, ast_walk_contexts(), cond, DATASTORE_INHERIT_FOREVER, find_matching_priority(), ast_datastore::inheritance, LOG_ERROR, LOG_WARNING, MACRO_EXIT_RESULT, MAX_ARGS, pbx_builtin_getvar_helper(), pbx_builtin_setvar_helper(), pbx_checkcondition(), and S_COR.
Referenced by macro_exec(), and macroexclusive_exec().
{
const char *s;
char *tmp;
char *cur, *rest;
char *macro;
char fullmacro[80];
char varname[80];
char runningapp[80], runningdata[1024];
char *oldargs[MAX_ARGS + 1] = { NULL, };
int argc, x;
int res=0;
char oldexten[256]="";
int oldpriority, gosub_level = 0;
char pc[80], depthc[12];
char oldcontext[AST_MAX_CONTEXT] = "";
const char *inhangupc;
int offset, depth = 0, maxdepth = 7;
int setmacrocontext=0;
int autoloopflag, inhangup = 0;
struct ast_str *tmp_subst = NULL;
char *save_macro_exten;
char *save_macro_context;
char *save_macro_priority;
char *save_macro_offset;
struct ast_datastore *macro_store = ast_channel_datastore_find(chan, ¯o_ds_info, NULL);
if (ast_strlen_zero(data)) {
ast_log(LOG_WARNING, "Macro() requires arguments. See \"core show application macro\" for help.\n");
return -1;
}
do {
if (macro_store) {
break;
}
if (!(macro_store = ast_datastore_alloc(¯o_ds_info, NULL))) {
ast_log(LOG_WARNING, "Unable to allocate new datastore.\n");
break;
}
/* Just the existence of this datastore is enough. */
macro_store->inheritance = DATASTORE_INHERIT_FOREVER;
ast_channel_datastore_add(chan, macro_store);
} while (0);
/* does the user want a deeper rabbit hole? */
ast_channel_lock(chan);
if ((s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION"))) {
sscanf(s, "%30d", &maxdepth);
}
/* Count how many levels deep the rabbit hole goes */
if ((s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH"))) {
sscanf(s, "%30d", &depth);
}
/* Used for detecting whether to return when a Macro is called from another Macro after hangup */
if (strcmp(ast_channel_exten(chan), "h") == 0)
pbx_builtin_setvar_helper(chan, "MACRO_IN_HANGUP", "1");
if ((inhangupc = pbx_builtin_getvar_helper(chan, "MACRO_IN_HANGUP"))) {
sscanf(inhangupc, "%30d", &inhangup);
}
ast_channel_unlock(chan);
if (depth >= maxdepth) {
ast_log(LOG_ERROR, "Macro(): possible infinite loop detected. Returning early.\n");
return 0;
}
snprintf(depthc, sizeof(depthc), "%d", depth + 1);
tmp = ast_strdupa(data);
rest = tmp;
macro = strsep(&rest, ",");
if (ast_strlen_zero(macro)) {
ast_log(LOG_WARNING, "Invalid macro name specified\n");
return 0;
}
snprintf(fullmacro, sizeof(fullmacro), "macro-%s", macro);
if (!ast_exists_extension(chan, fullmacro, "s", 1,
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
if (!ast_context_find(fullmacro))
ast_log(LOG_WARNING, "No such context '%s' for macro '%s'. Was called by %s@%s\n", fullmacro, macro, ast_channel_exten(chan), ast_channel_context(chan));
else
ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
return 0;
}
/* If we are to run the macro exclusively, take the mutex */
if (exclusive) {
ast_debug(1, "Locking macrolock for '%s'\n", fullmacro);
ast_autoservice_start(chan);
if (ast_context_lockmacro(fullmacro)) {
ast_log(LOG_WARNING, "Failed to lock macro '%s' as in-use\n", fullmacro);
ast_autoservice_stop(chan);
return 0;
}
ast_autoservice_stop(chan);
}
if (!(tmp_subst = ast_str_create(16))) {
return -1;
}
/* Save old info */
oldpriority = ast_channel_priority(chan);
ast_copy_string(oldexten, ast_channel_exten(chan), sizeof(oldexten));
ast_copy_string(oldcontext, ast_channel_context(chan), sizeof(oldcontext));
if (ast_strlen_zero(ast_channel_macrocontext(chan))) {
ast_channel_macrocontext_set(chan, ast_channel_context(chan));
ast_channel_macroexten_set(chan, ast_channel_exten(chan));
ast_channel_macropriority_set(chan, ast_channel_priority(chan));
setmacrocontext=1;
}
argc = 1;
/* Save old macro variables */
save_macro_exten = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_EXTEN"));
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", oldexten);
save_macro_context = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_CONTEXT"));
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", oldcontext);
save_macro_priority = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_PRIORITY"));
snprintf(pc, sizeof(pc), "%d", oldpriority);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", pc);
save_macro_offset = ast_strdup(pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"));
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", NULL);
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
/* Setup environment for new run */
ast_channel_exten_set(chan, "s");
ast_channel_context_set(chan, fullmacro);
ast_channel_priority_set(chan, 1);
ast_channel_lock(chan);
while((cur = strsep(&rest, ",")) && (argc < MAX_ARGS)) {
const char *argp;
/* Save copy of old arguments if we're overwriting some, otherwise
let them pass through to the other macro */
snprintf(varname, sizeof(varname), "ARG%d", argc);
if ((argp = pbx_builtin_getvar_helper(chan, varname))) {
oldargs[argc] = ast_strdup(argp);
}
pbx_builtin_setvar_helper(chan, varname, cur);
argc++;
}
ast_channel_unlock(chan);
autoloopflag = ast_test_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP);
ast_set_flag(ast_channel_flags(chan), AST_FLAG_IN_AUTOLOOP);
while (ast_exists_extension(chan, ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan),
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
struct ast_context *c;
struct ast_exten *e;
int foundx;
runningapp[0] = '\0';
runningdata[0] = '\0';
/* What application will execute? */
if (ast_rdlock_contexts()) {
ast_log(LOG_WARNING, "Failed to lock contexts list\n");
} else {
for (c = ast_walk_contexts(NULL), e = NULL; c; c = ast_walk_contexts(c)) {
if (!strcmp(ast_get_context_name(c), ast_channel_context(chan))) {
if (ast_rdlock_context(c)) {
ast_log(LOG_WARNING, "Unable to lock context?\n");
} else {
e = find_matching_priority(c, ast_channel_exten(chan), ast_channel_priority(chan),
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL));
if (e) { /* This will only be undefined for pbx_realtime, which is majorly broken. */
ast_copy_string(runningapp, ast_get_extension_app(e), sizeof(runningapp));
ast_copy_string(runningdata, ast_get_extension_app_data(e), sizeof(runningdata));
}
ast_unlock_context(c);
}
break;
}
}
}
ast_unlock_contexts();
/* Reset the macro depth, if it was changed in the last iteration */
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
res = ast_spawn_extension(chan, ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan),
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL),
&foundx, 1);
if (res) {
/* Something bad happened, or a hangup has been requested. */
if (((res >= '0') && (res <= '9')) || ((res >= 'A') && (res <= 'F')) ||
(res == '*') || (res == '#')) {
/* Just return result as to the previous application as if it had been dialed */
ast_debug(1, "Oooh, got something to jump out with ('%c')!\n", res);
break;
}
switch(res) {
case MACRO_EXIT_RESULT:
res = 0;
goto out;
default:
ast_debug(2, "Spawn extension (%s,%s,%d) exited non-zero on '%s' in macro '%s'\n", ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan), ast_channel_name(chan), macro);
ast_verb(2, "Spawn extension (%s, %s, %d) exited non-zero on '%s' in macro '%s'\n", ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan), ast_channel_name(chan), macro);
goto out;
}
}
ast_debug(1, "Executed application: %s\n", runningapp);
if (!strcasecmp(runningapp, "GOSUB")) {
gosub_level++;
ast_debug(1, "Incrementing gosub_level\n");
} else if (!strcasecmp(runningapp, "GOSUBIF")) {
char *cond, *app_arg;
char *app2;
ast_str_substitute_variables(&tmp_subst, 0, chan, runningdata);
app2 = ast_str_buffer(tmp_subst);
cond = strsep(&app2, "?");
app_arg = strsep(&app2, ":");
if (pbx_checkcondition(cond)) {
if (!ast_strlen_zero(app_arg)) {
gosub_level++;
ast_debug(1, "Incrementing gosub_level\n");
}
} else {
if (!ast_strlen_zero(app2)) {
gosub_level++;
ast_debug(1, "Incrementing gosub_level\n");
}
}
} else if (!strcasecmp(runningapp, "RETURN")) {
gosub_level--;
ast_debug(1, "Decrementing gosub_level\n");
} else if (!strcasecmp(runningapp, "STACKPOP")) {
gosub_level--;
ast_debug(1, "Decrementing gosub_level\n");
} else if (!strncasecmp(runningapp, "EXEC", 4)) {
/* Must evaluate args to find actual app */
char *tmp2, *tmp3 = NULL;
ast_str_substitute_variables(&tmp_subst, 0, chan, runningdata);
tmp2 = ast_str_buffer(tmp_subst);
if (!strcasecmp(runningapp, "EXECIF")) {
if ((tmp3 = strchr(tmp2, '|'))) {
*tmp3++ = '\0';
}
if (!pbx_checkcondition(tmp2)) {
tmp3 = NULL;
}
} else {
tmp3 = tmp2;
}
if (tmp3) {
ast_debug(1, "Last app: %s\n", tmp3);
}
if (tmp3 && !strncasecmp(tmp3, "GOSUB", 5)) {
gosub_level++;
ast_debug(1, "Incrementing gosub_level\n");
} else if (tmp3 && !strncasecmp(tmp3, "RETURN", 6)) {
gosub_level--;
ast_debug(1, "Decrementing gosub_level\n");
} else if (tmp3 && !strncasecmp(tmp3, "STACKPOP", 8)) {
gosub_level--;
ast_debug(1, "Decrementing gosub_level\n");
}
}
if (gosub_level == 0 && strcasecmp(ast_channel_context(chan), fullmacro)) {
ast_verb(2, "Channel '%s' jumping out of macro '%s'\n", ast_channel_name(chan), macro);
break;
}
/* don't stop executing extensions when we're in "h" */
if (ast_check_hangup(chan) && !inhangup) {
ast_debug(1, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n", ast_channel_exten(chan), ast_channel_macroexten(chan), ast_channel_priority(chan));
goto out;
}
ast_channel_priority_set(chan, ast_channel_priority(chan) + 1);
}
out:
/* Don't let the channel change now. */
ast_channel_lock(chan);
/* Reset the depth back to what it was when the routine was entered (like if we called Macro recursively) */
snprintf(depthc, sizeof(depthc), "%d", depth);
pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
ast_set2_flag(ast_channel_flags(chan), autoloopflag, AST_FLAG_IN_AUTOLOOP);
for (x = 1; x < argc; x++) {
/* Restore old arguments and delete ours */
snprintf(varname, sizeof(varname), "ARG%d", x);
if (oldargs[x]) {
pbx_builtin_setvar_helper(chan, varname, oldargs[x]);
ast_free(oldargs[x]);
} else {
pbx_builtin_setvar_helper(chan, varname, NULL);
}
}
/* Restore macro variables */
pbx_builtin_setvar_helper(chan, "MACRO_EXTEN", save_macro_exten);
pbx_builtin_setvar_helper(chan, "MACRO_CONTEXT", save_macro_context);
pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority);
if (save_macro_exten)
ast_free(save_macro_exten);
if (save_macro_context)
ast_free(save_macro_context);
if (save_macro_priority)
ast_free(save_macro_priority);
if (setmacrocontext) {
ast_channel_macrocontext_set(chan, "");
ast_channel_macroexten_set(chan, "");
ast_channel_macropriority_set(chan, 0);
}
if (!strcasecmp(ast_channel_context(chan), fullmacro)) {
const char *offsets;
/* If we're leaving the macro normally, restore original information */
ast_channel_priority_set(chan, oldpriority);
ast_channel_context_set(chan, oldcontext);
ast_channel_exten_set(chan, oldexten);
if ((offsets = pbx_builtin_getvar_helper(chan, "MACRO_OFFSET"))) {
/* Handle macro offset if it's set by checking the availability of step n + offset + 1, otherwise continue
normally if there is any problem */
if (sscanf(offsets, "%30d", &offset) == 1) {
if (ast_exists_extension(chan, ast_channel_context(chan), ast_channel_exten(chan),
ast_channel_priority(chan) + offset + 1,
S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
ast_channel_priority_set(chan, ast_channel_priority(chan) + offset);
}
}
}
}
pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
if (save_macro_offset)
ast_free(save_macro_offset);
/* Unlock the macro */
if (exclusive) {
ast_debug(1, "Unlocking macrolock for '%s'\n", fullmacro);
if (ast_context_unlockmacro(fullmacro)) {
ast_log(LOG_ERROR, "Failed to unlock macro '%s' - that isn't good\n", fullmacro);
res = 0;
}
}
ast_channel_unlock(chan);
ast_free(tmp_subst);
return res;
}
| static struct ast_exten* find_matching_priority | ( | struct ast_context * | c, |
| const char * | exten, | ||
| int | priority, | ||
| const char * | callerid | ||
| ) | [static, read] |
Definition at line 190 of file app_macro.c.
References ast_extension_match(), ast_get_context_name(), ast_get_extension_cidmatch(), ast_get_extension_matchcid(), ast_get_extension_name(), ast_get_extension_priority(), ast_get_include_name(), ast_walk_context_extensions(), ast_walk_context_includes(), ast_walk_contexts(), and ast_walk_extension_priorities().
Referenced by _macro_exec().
{
struct ast_exten *e;
struct ast_include *i;
struct ast_context *c2;
for (e=ast_walk_context_extensions(c, NULL); e; e=ast_walk_context_extensions(c, e)) {
if (ast_extension_match(ast_get_extension_name(e), exten)) {
int needmatch = ast_get_extension_matchcid(e);
if ((needmatch && ast_extension_match(ast_get_extension_cidmatch(e), callerid)) ||
(!needmatch)) {
/* This is the matching extension we want */
struct ast_exten *p;
for (p=ast_walk_extension_priorities(e, NULL); p; p=ast_walk_extension_priorities(e, p)) {
if (priority != ast_get_extension_priority(p))
continue;
return p;
}
}
}
}
/* No match; run through includes */
for (i=ast_walk_context_includes(c, NULL); i; i=ast_walk_context_includes(c, i)) {
for (c2=ast_walk_contexts(NULL); c2; c2=ast_walk_contexts(c2)) {
if (!strcmp(ast_get_context_name(c2), ast_get_include_name(i))) {
e = find_matching_priority(c2, exten, priority, callerid);
if (e)
return e;
}
}
}
return NULL;
}
| static int load_module | ( | void | ) | [static] |
Definition at line 634 of file app_macro.c.
References ast_register_application_xml, macro_exec(), macro_exit_exec(), macroexclusive_exec(), and macroif_exec().
{
int res;
res = ast_register_application_xml(exit_app, macro_exit_exec);
res |= ast_register_application_xml(if_app, macroif_exec);
res |= ast_register_application_xml(exclusive_app, macroexclusive_exec);
res |= ast_register_application_xml(app, macro_exec);
return res;
}
| static int macro_exec | ( | struct ast_channel * | chan, |
| const char * | data | ||
| ) | [static] |
Definition at line 583 of file app_macro.c.
References _macro_exec().
Referenced by load_module(), and macroif_exec().
{
return _macro_exec(chan, data, 0);
}
| static int macro_exit_exec | ( | struct ast_channel * | chan, |
| const char * | data | ||
| ) | [static] |
Definition at line 617 of file app_macro.c.
References MACRO_EXIT_RESULT.
Referenced by load_module().
{
return MACRO_EXIT_RESULT;
}
| static void macro_fixup | ( | void * | data, |
| struct ast_channel * | old_chan, | ||
| struct ast_channel * | new_chan | ||
| ) | [static] |
Definition at line 172 of file app_macro.c.
References pbx_builtin_getvar_helper(), and pbx_builtin_setvar_helper().
{
int i;
char varname[10];
pbx_builtin_setvar_helper(new_chan, "MACRO_DEPTH", "0");
pbx_builtin_setvar_helper(new_chan, "MACRO_CONTEXT", NULL);
pbx_builtin_setvar_helper(new_chan, "MACRO_EXTEN", NULL);
pbx_builtin_setvar_helper(new_chan, "MACRO_PRIORITY", NULL);
pbx_builtin_setvar_helper(new_chan, "MACRO_OFFSET", NULL);
for (i = 1; i < 100; i++) {
snprintf(varname, sizeof(varname), "ARG%d", i);
while (pbx_builtin_getvar_helper(new_chan, varname)) {
/* Kill all levels of arguments */
pbx_builtin_setvar_helper(new_chan, varname, NULL);
}
}
}
| static int macroexclusive_exec | ( | struct ast_channel * | chan, |
| const char * | data | ||
| ) | [static] |
Definition at line 588 of file app_macro.c.
References _macro_exec().
Referenced by load_module().
{
return _macro_exec(chan, data, 1);
}
| static int macroif_exec | ( | struct ast_channel * | chan, |
| const char * | data | ||
| ) | [static] |
Definition at line 593 of file app_macro.c.
References ast_log(), LOG_WARNING, macro_exec(), and pbx_checkcondition().
Referenced by load_module().
{
char *expr = NULL, *label_a = NULL, *label_b = NULL;
int res = 0;
expr = ast_strdupa(data);
if ((label_a = strchr(expr, '?'))) {
*label_a = '\0';
label_a++;
if ((label_b = strchr(label_a, ':'))) {
*label_b = '\0';
label_b++;
}
if (pbx_checkcondition(expr))
res = macro_exec(chan, label_a);
else if (label_b)
res = macro_exec(chan, label_b);
} else
ast_log(LOG_WARNING, "Invalid Syntax.\n");
return res;
}
| static int unload_module | ( | void | ) | [static] |
Definition at line 622 of file app_macro.c.
References ast_unregister_application().
{
int res;
res = ast_unregister_application(if_app);
res |= ast_unregister_application(exit_app);
res |= ast_unregister_application(app);
res |= ast_unregister_application(exclusive_app);
return res;
}
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Extension Macros" , .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, } [static] |
Definition at line 646 of file app_macro.c.
char* app = "Macro" [static] |
Definition at line 160 of file app_macro.c.
struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 646 of file app_macro.c.
char* exclusive_app = "MacroExclusive" [static] |
Definition at line 162 of file app_macro.c.
char* exit_app = "MacroExit" [static] |
Definition at line 163 of file app_macro.c.
char* if_app = "MacroIf" [static] |
Definition at line 161 of file app_macro.c.
struct ast_datastore_info macro_ds_info [static] |
{
.type = "MACRO",
.chan_fixup = macro_fixup,
}
Definition at line 167 of file app_macro.c.