Asterisk - The Open Source Telephony Project  21.4.1
Macros | Functions | Variables
app_exec.c File Reference

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_moduleAST_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 = "da6642af068ee5e6490c5b1d2cc1d238" , .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_infoast_module_info = &__mod_info
 

Detailed Description

Exec application.

Author
Tilghman Lesher app_e.nosp@m.xec_.nosp@m._v002.nosp@m.@the.nosp@m.-tilg.nosp@m.hman.nosp@m..com
Philipp Dunkel phili.nosp@m.pp.d.nosp@m.unkel.nosp@m.@ebo.nosp@m.x.at

Definition in file app_exec.c.

Variable Documentation

const char app_exec[] = "Exec"
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 129 of file app_exec.c.