Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Core PBX builtin routines. More...
#include "asterisk.h"
#include "asterisk/_private.h"
#include "asterisk/pbx.h"
#include "asterisk/causes.h"
#include "asterisk/indications.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/say.h"
#include "asterisk/app.h"
#include "asterisk/module.h"
#include "asterisk/conversions.h"
#include "pbx_private.h"
Go to the source code of this file.
Data Structures | |
struct | pbx_builtin |
Declaration of builtin applications. More... | |
Macros | |
#define | BACKGROUND_MATCHEXTEN (1 << 2) |
#define | BACKGROUND_NOANSWER (1 << 1) |
#define | BACKGROUND_PLAYBACK (1 << 3) |
#define | BACKGROUND_SKIP (1 << 0) |
#define | WAITEXTEN_DIALTONE (1 << 1) |
#define | WAITEXTEN_MOH (1 << 0) |
Functions | |
int | indicate_busy (struct ast_channel *chan, const char *data) |
int | indicate_congestion (struct ast_channel *chan, const char *data) |
int | load_pbx_builtins (void) |
static int | pbx_builtin_answer (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_background (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_execiftime (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_goto (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_gotoif (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_gotoiftime (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_hangup (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_incomplete (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_noop (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_proceeding (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_progress (struct ast_channel *chan, const char *data) |
int | pbx_builtin_raise_exception (struct ast_channel *chan, const char *reason) |
static int | pbx_builtin_ringing (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_saycharacters (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_saycharacters_case (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_saydigits (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_saymoney (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_saynumber (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_sayordinal (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_sayphonetic (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_wait (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_waitdigit (struct ast_channel *chan, const char *data) |
static int | pbx_builtin_waitexten (struct ast_channel *chan, const char *data) |
static int | permit_dtmf_interrupt (struct ast_channel *chan) |
Determine if DTMF interruption was requested. More... | |
static void | unload_pbx_builtins (void) |
Variables | |
static const struct ast_app_option | background_opts [128] = { [ 's' ] = { .flag = (1 << 0) }, [ 'n' ] = { .flag = (1 << 1) }, [ 'm' ] = { .flag = (1 << 2) }, [ 'p' ] = { .flag = (1 << 3) }, } |
struct pbx_builtin | builtins [] |
static const struct ast_app_option | waitexten_opts [128] = { [ 'm' ] = { .flag = (1 << 0) , .arg_index = 0 + 1 }, [ 'd' ] = { .flag = (1 << 1) , .arg_index = 0 + 1 }, } |
Core PBX builtin routines.
Definition in file pbx_builtins.c.
#define BACKGROUND_MATCHEXTEN (1 << 2) |
Definition at line 703 of file pbx_builtins.c.
#define BACKGROUND_NOANSWER (1 << 1) |
Definition at line 702 of file pbx_builtins.c.
#define BACKGROUND_PLAYBACK (1 << 3) |
Definition at line 704 of file pbx_builtins.c.
#define BACKGROUND_SKIP (1 << 0) |
Definition at line 701 of file pbx_builtins.c.
#define WAITEXTEN_DIALTONE (1 << 1) |
Definition at line 714 of file pbx_builtins.c.
#define WAITEXTEN_MOH (1 << 0) |
Definition at line 713 of file pbx_builtins.c.
int load_pbx_builtins | ( | void | ) |
Provided by pbx_builtins.c
Definition at line 1506 of file pbx_builtins.c.
References ARRAY_LEN, ast_log, ast_register_application2(), ast_register_cleanup(), builtins, execute(), LOG_ERROR, name, NULL, unload_pbx_builtins(), and ast_channel::x.
Referenced by asterisk_daemon().
|
static |
Definition at line 1245 of file pbx_builtins.c.
References ast_debug, ast_log, ast_strdupa, ast_strlen_zero(), LOG_WARNING, pbx_builtin_goto(), pbx_checkcondition(), and strsep().
|
static |
Definition at line 824 of file pbx_builtins.c.
References __ast_answer(), answer(), ast_check_hangup(), AST_CONTROL_INCOMPLETE, ast_indicate(), AST_PBX_INCOMPLETE, AST_STATE_UP, ast_strlen_zero(), and options.
|
static |
Definition at line 1240 of file pbx_builtins.c.
int pbx_builtin_raise_exception | ( | struct ast_channel * | chan, |
const char * | reason | ||
) |
Definition at line 721 of file pbx_builtins.c.
References raise_exception().
|
static |
Definition at line 1438 of file pbx_builtins.c.
References ast_channel_language(), AST_DIGIT_ANY, AST_SAY_CASE_NONE, ast_say_character_str(), and permit_dtmf_interrupt().
|
static |
Definition at line 1391 of file pbx_builtins.c.
References args, AST_APP_ARG, ast_channel_language(), AST_DECLARE_APP_ARGS, AST_DIGIT_ANY, ast_log, AST_SAY_CASE_ALL, AST_SAY_CASE_LOWER, AST_SAY_CASE_NONE, AST_SAY_CASE_UPPER, ast_say_character_str(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), LOG_WARNING, options, and permit_dtmf_interrupt().
|
static |
Definition at line 1369 of file pbx_builtins.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_say_digit_str(), and permit_dtmf_interrupt().
|
static |
Definition at line 1380 of file pbx_builtins.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_say_money_str(), and permit_dtmf_interrupt().
|
static |
Definition at line 1291 of file pbx_builtins.c.
References ast_channel_language(), ast_check_hangup_locked(), ast_copy_string(), AST_DIGIT_ANY, ast_log, ast_say_number(), ast_str_to_int(), ast_strlen_zero(), LOG_WARNING, options, permit_dtmf_interrupt(), strsep(), and tmp().
|
static |
Definition at line 1330 of file pbx_builtins.c.
References ast_channel_language(), ast_check_hangup_locked(), ast_copy_string(), AST_DIGIT_ANY, ast_log, ast_say_ordinal(), ast_str_to_int(), ast_strlen_zero(), LOG_WARNING, options, permit_dtmf_interrupt(), strsep(), and tmp().
|
static |
Definition at line 1449 of file pbx_builtins.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_say_phonetic_str(), and permit_dtmf_interrupt().
|
static |
Determine if DTMF interruption was requested.
If the SAY_DTMF_INTERRUPT channel variable is truthy, the caller has requested DTMF interruption be enabled.
chan | the channel to examine |
-1 | if DTMF interruption was requested |
0 | if DTMF interruption was not requested |
Definition at line 1280 of file pbx_builtins.c.
References ast_channel_lock, ast_channel_unlock, ast_true(), and pbx_builtin_getvar_helper().
Referenced by pbx_builtin_saycharacters(), pbx_builtin_saycharacters_case(), pbx_builtin_saydigits(), pbx_builtin_saymoney(), pbx_builtin_saynumber(), pbx_builtin_sayordinal(), and pbx_builtin_sayphonetic().
|
static |
Definition at line 1496 of file pbx_builtins.c.
References ARRAY_LEN, ast_unregister_application(), builtins, name, and ast_channel::x.
Referenced by load_pbx_builtins().
|
static |
Definition at line 711 of file pbx_builtins.c.
Referenced by pbx_builtin_background().
struct pbx_builtin builtins[] |
Referenced by load_pbx_builtins(), and unload_pbx_builtins().
|
static |
Definition at line 719 of file pbx_builtins.c.
Referenced by pbx_builtin_waitexten().