| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
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) | 
| Enumerations | |
| enum | { WAITEXTEN_MOH = (1 << 0) , WAITEXTEN_DIALTONE = (1 << 1) } | 
| enum | read_option_flags { WAITEXTEN_ARG_MOH , WAITEXTEN_ARG_DIALTONE , WAITEXTEN_ARRAY_SIZE } | 
| 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. | |
| static void | unload_pbx_builtins (void) | 
| Variables | |
| static const struct ast_app_option | background_opts [128] = { [ 's' ] = { .flag = BACKGROUND_SKIP }, [ 'n' ] = { .flag = BACKGROUND_NOANSWER }, [ 'm' ] = { .flag = BACKGROUND_MATCHEXTEN }, [ 'p' ] = { .flag = BACKGROUND_PLAYBACK }, } | 
| struct pbx_builtin | builtins [] | 
| static const struct ast_app_option | waitexten_opts [128] = { [ 'm' ] = { .flag = WAITEXTEN_MOH , .arg_index = WAITEXTEN_ARG_MOH + 1 }, [ 'd' ] = { .flag = WAITEXTEN_DIALTONE , .arg_index = WAITEXTEN_ARG_DIALTONE + 1 }, } | 
Core PBX builtin routines.
Definition in file pbx_builtins.c.
| #define BACKGROUND_MATCHEXTEN (1 << 2) | 
Definition at line 783 of file pbx_builtins.c.
| #define BACKGROUND_NOANSWER (1 << 1) | 
Definition at line 782 of file pbx_builtins.c.
| #define BACKGROUND_PLAYBACK (1 << 3) | 
Definition at line 784 of file pbx_builtins.c.
| #define BACKGROUND_SKIP (1 << 0) | 
Definition at line 781 of file pbx_builtins.c.
| anonymous enum | 
| Enumerator | |
|---|---|
| WAITEXTEN_MOH | |
| WAITEXTEN_DIALTONE | |
Definition at line 793 of file pbx_builtins.c.
| enum read_option_flags | 
| Enumerator | |
|---|---|
| WAITEXTEN_ARG_MOH | |
| WAITEXTEN_ARG_DIALTONE | |
| WAITEXTEN_ARRAY_SIZE | |
Definition at line 798 of file pbx_builtins.c.
| int load_pbx_builtins | ( | void | ) | 
Provided by pbx_builtins.c
Definition at line 1597 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 1336 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 913 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 1331 of file pbx_builtins.c.
| int pbx_builtin_raise_exception | ( | struct ast_channel * | chan, | 
| const char * | reason | ||
| ) | 
Definition at line 810 of file pbx_builtins.c.
References raise_exception().
| 
 | static | 
Definition at line 1529 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 1482 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 1460 of file pbx_builtins.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_say_digit_str(), and permit_dtmf_interrupt().
| 
 | static | 
Definition at line 1471 of file pbx_builtins.c.
References ast_channel_language(), AST_DIGIT_ANY, ast_say_money_str(), and permit_dtmf_interrupt().
| 
 | static | 
Definition at line 1382 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(), and strsep().
| 
 | static | 
Definition at line 1421 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(), and strsep().
| 
 | static | 
Definition at line 1540 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 1371 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 1587 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 791 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 808 of file pbx_builtins.c.
Referenced by pbx_builtin_waitexten().