Asterisk - The Open Source Telephony Project GIT-master-754dea3
|
Exec application. More...
#include "asterisk.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
Go to the source code of this file.
Macros | |
#define | MAXRESULT 1024 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | exec_exec (struct ast_channel *chan, const char *data) |
static int | execif_exec (struct ast_channel *chan, const char *data) |
static int | load_module (void) |
static int | tryexec_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 = "Executes dialplan applications" , .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 char | app_exec [] = "Exec" |
static const char | app_execif [] = "ExecIf" |
static const char | app_tryexec [] = "TryExec" |
static const struct ast_module_info * | ast_module_info = &__mod_info |
Exec application.
Definition in file app_exec.c.
#define MAXRESULT 1024 |
Definition at line 124 of file app_exec.c.
|
static |
Definition at line 309 of file app_exec.c.
|
static |
Definition at line 309 of file app_exec.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 309 of file app_exec.c.
|
static |
Definition at line 142 of file app_exec.c.
References app, args, ast_free, ast_log, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), ast_strdupa, ast_strlen_zero(), LOG_WARNING, NULL, pbx_exec(), pbx_findapp(), and strsep().
Referenced by load_module().
|
static |
Definition at line 211 of file app_exec.c.
References app, AST_APP_ARG, AST_DECLARE_APP_ARGS, ast_log, AST_NONSTANDARD_RAW_ARGS, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), end, LOG_ERROR, LOG_WARNING, NULL, pbx_checkcondition(), pbx_exec(), pbx_findapp(), and S_OR.
Referenced by load_module().
|
static |
Definition at line 301 of file app_exec.c.
References app_exec, app_execif, app_tryexec, ast_register_application_xml, exec_exec(), execif_exec(), and tryexec_exec().
|
static |
Definition at line 176 of file app_exec.c.
References app, args, ast_free, ast_log, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), ast_strdupa, ast_strlen_zero(), LOG_WARNING, NULL, pbx_builtin_setvar_helper(), pbx_exec(), pbx_findapp(), and strsep().
Referenced by load_module().
|
static |
Definition at line 290 of file app_exec.c.
References app_exec, app_execif, app_tryexec, and ast_unregister_application().
|
static |
Definition at line 309 of file app_exec.c.
|
static |
Note
The key difference between these two apps is exit status. In a nutshell, Exec tries to be transparent as possible, behaving in exactly the same way as if the application it calls was directly invoked from the dialplan.
TryExec, on the other hand, provides a way to execute applications and catch any possible fatal error without actually fatally affecting the dialplan.
Definition at line 138 of file app_exec.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 140 of file app_exec.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 139 of file app_exec.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 309 of file app_exec.c.