Asterisk - The Open Source Telephony Project  GIT-master-a24979a
Data Structures | Macros | Functions | Variables
pbx_builtins.c File Reference

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"
Include dependency graph for pbx_builtins.c:

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_importvar (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_setamaflags (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 }, }
 

Detailed Description

Core PBX builtin routines.

Author
George Joseph georg.nosp@m.e.jo.nosp@m.seph@.nosp@m.fair.nosp@m.view5.nosp@m..com

Definition in file pbx_builtins.c.

Macro Definition Documentation

◆ BACKGROUND_MATCHEXTEN

#define BACKGROUND_MATCHEXTEN   (1 << 2)

Definition at line 725 of file pbx_builtins.c.

◆ BACKGROUND_NOANSWER

#define BACKGROUND_NOANSWER   (1 << 1)

Definition at line 724 of file pbx_builtins.c.

◆ BACKGROUND_PLAYBACK

#define BACKGROUND_PLAYBACK   (1 << 3)

Definition at line 726 of file pbx_builtins.c.

◆ BACKGROUND_SKIP

#define BACKGROUND_SKIP   (1 << 0)

Definition at line 723 of file pbx_builtins.c.

◆ WAITEXTEN_DIALTONE

#define WAITEXTEN_DIALTONE   (1 << 1)

Definition at line 736 of file pbx_builtins.c.

◆ WAITEXTEN_MOH

#define WAITEXTEN_MOH   (1 << 0)

Definition at line 735 of file pbx_builtins.c.

Function Documentation

◆ load_pbx_builtins()

int load_pbx_builtins ( void  )

Provided by pbx_builtins.c

Definition at line 1607 of file pbx_builtins.c.

1608 {
1609  int x;
1610 
1611  /* Register builtin applications */
1612  for (x = 0; x < ARRAY_LEN(builtins); x++) {
1614  ast_log(LOG_ERROR, "Unable to register builtin application '%s'\n", builtins[x].name);
1615  return -1;
1616  }
1617  }
1618 
1620 
1621  return 0;
1622 }
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
Definition: clicompat.c:19
#define ast_log
Definition: astobj2.c:42
static const char name[]
Definition: format_mp3.c:68
static SQLHSTMT execute(struct odbc_obj *obj, void *data, int silent)
Common execution function for SQL queries.
Definition: func_odbc.c:467
#define LOG_ERROR
int ast_register_application2(const char *app, int(*execute)(struct ast_channel *, const char *), const char *synopsis, const char *description, void *mod)
Register an application.
Definition: pbx_app.c:103
struct pbx_builtin builtins[]
static void unload_pbx_builtins(void)
#define NULL
Definition: resample.c:96
#define ARRAY_LEN(a)
Definition: utils.h:661

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().

◆ pbx_builtin_gotoif()

static int pbx_builtin_gotoif ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1309 of file pbx_builtins.c.

1310 {
1311  char *condition, *branch1, *branch2, *branch;
1312  char *stringp;
1313 
1314  if (ast_strlen_zero(data)) {
1315  ast_log(LOG_WARNING, "Ignoring, since there is no variable to check\n");
1316  return 0;
1317  }
1318 
1319  stringp = ast_strdupa(data);
1320  condition = strsep(&stringp,"?");
1321  branch1 = strsep(&stringp,":");
1322  branch2 = strsep(&stringp,"");
1323  branch = pbx_checkcondition(condition) ? branch1 : branch2;
1324 
1325  if (ast_strlen_zero(branch)) {
1326  ast_debug(1, "Not taking any branch\n");
1327  return 0;
1328  }
1329 
1330  return pbx_builtin_goto(chan, branch);
1331 }
#define ast_strdupa(s)
duplicate a string in memory from the stack
Definition: astmm.h:298
static int pbx_builtin_goto(struct ast_channel *chan, const char *data)
Definition: pbx_builtins.c:934
char * strsep(char **str, const char *delims)
#define ast_debug(level,...)
Log a DEBUG message.
#define LOG_WARNING
int pbx_checkcondition(const char *condition)
Evaluate a condition.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Definition: strings.h:65

References ast_debug, ast_log, ast_strdupa, ast_strlen_zero(), LOG_WARNING, pbx_builtin_goto(), pbx_checkcondition(), and strsep().

◆ pbx_builtin_importvar()

static int pbx_builtin_importvar ( struct ast_channel chan,
const char *  data 
)
static
Todo:
XXX should do !ast_strlen_zero(..) of the args ?

Definition at line 1524 of file pbx_builtins.c.

1525 {
1526  char *name;
1527  char *value;
1528  char *channel;
1529  char tmp[VAR_BUF_SIZE];
1530  static int deprecation_warning = 0;
1531 
1532  if (ast_strlen_zero(data)) {
1533  ast_log(LOG_WARNING, "Ignoring, since there is no variable to set\n");
1534  return 0;
1535  }
1536  tmp[0] = 0;
1537  if (!deprecation_warning) {
1538  ast_log(LOG_WARNING, "ImportVar is deprecated. Please use Set(varname=${IMPORT(channel,variable)}) instead.\n");
1539  deprecation_warning = 1;
1540  }
1541 
1542  value = ast_strdupa(data);
1543  name = strsep(&value,"=");
1544  channel = strsep(&value,",");
1545  if (channel && value && name) { /*! \todo XXX should do !ast_strlen_zero(..) of the args ? */
1546  struct ast_channel *chan2 = ast_channel_get_by_name(channel);
1547  if (chan2) {
1548  char *s = ast_alloca(strlen(value) + 4);
1549  sprintf(s, "${%s}", value);
1550  pbx_substitute_variables_helper(chan2, s, tmp, sizeof(tmp) - 1);
1551  chan2 = ast_channel_unref(chan2);
1552  }
1554  }
1555 
1556  return(0);
1557 }
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
Definition: astmm.h:288
static int tmp()
Definition: bt_open.c:389
#define ast_channel_unref(c)
Decrease channel reference count.
Definition: channel.h:2958
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
Definition: channel.c:1448
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name.
void pbx_substitute_variables_helper(struct ast_channel *c, const char *cp1, char *cp2, int count)
Definition: ael_main.c:211
#define VAR_BUF_SIZE
Definition: pbx_private.h:68
Main Channel structure associated with a channel.
int value
Definition: syslog.c:37

References ast_alloca, ast_channel_get_by_name(), ast_channel_unref, ast_log, ast_strdupa, ast_strlen_zero(), LOG_WARNING, name, pbx_builtin_setvar_helper(), pbx_substitute_variables_helper(), strsep(), tmp(), value, and VAR_BUF_SIZE.

◆ pbx_builtin_incomplete()

static int pbx_builtin_incomplete ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 846 of file pbx_builtins.c.

847 {
848  const char *options = data;
849  int answer = 1;
850 
851  /* Some channels can receive DTMF in unanswered state; some cannot */
852  if (!ast_strlen_zero(options) && strchr(options, 'n')) {
853  answer = 0;
854  }
855 
856  /* If the channel is hungup, stop waiting */
857  if (ast_check_hangup(chan)) {
858  return -1;
859  } else if (ast_channel_state(chan) != AST_STATE_UP && answer) {
860  __ast_answer(chan, 0);
861  }
862 
864 
865  return AST_PBX_INCOMPLETE;
866 }
static int answer(void *data)
Definition: chan_pjsip.c:675
int __ast_answer(struct ast_channel *chan, unsigned int delay)
Answer a channel, with a selectable delay before returning.
Definition: channel.c:2696
int ast_check_hangup(struct ast_channel *chan)
Check to see if a channel is needing hang up.
Definition: channel.c:445
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
Definition: channel.c:4312
ast_channel_state
ast_channel states
Definition: channelstate.h:35
@ AST_STATE_UP
Definition: channelstate.h:42
@ AST_CONTROL_INCOMPLETE
#define AST_PBX_INCOMPLETE
Definition: pbx.h:51
static struct test_options options

References __ast_answer(), answer(), ast_check_hangup(), AST_CONTROL_INCOMPLETE, ast_indicate(), AST_PBX_INCOMPLETE, AST_STATE_UP, ast_strlen_zero(), and options.

◆ pbx_builtin_noop()

static int pbx_builtin_noop ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1304 of file pbx_builtins.c.

1305 {
1306  return 0;
1307 }

◆ pbx_builtin_raise_exception()

int pbx_builtin_raise_exception ( struct ast_channel chan,
const char *  reason 
)

Definition at line 743 of file pbx_builtins.c.

744 {
745  /* Priority will become 1, next time through the AUTOLOOP */
746  return raise_exception(chan, reason, 0);
747 }
int raise_exception(struct ast_channel *chan, const char *reason, int priority)
Definition: pbx.c:2813

References raise_exception().

◆ pbx_builtin_saycharacters()

static int pbx_builtin_saycharacters ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1502 of file pbx_builtins.c.

1503 {
1504  int res = 0;
1505 
1506  if (data) {
1508  }
1509 
1510  return res;
1511 }
const char * ast_channel_language(const struct ast_channel *chan)
#define AST_DIGIT_ANY
Definition: file.h:48
static int permit_dtmf_interrupt(struct ast_channel *chan)
Determine if DTMF interruption was requested.
int ast_say_character_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang, enum ast_say_case_sensitivity sensitivity)
function to pronounce character and phonetic strings
Definition: channel.c:8354
@ AST_SAY_CASE_NONE
Definition: say.h:182

References ast_channel_language(), AST_DIGIT_ANY, AST_SAY_CASE_NONE, ast_say_character_str(), and permit_dtmf_interrupt().

◆ pbx_builtin_saycharacters_case()

static int pbx_builtin_saycharacters_case ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1455 of file pbx_builtins.c.

1456 {
1457  int res = 0;
1458  int sensitivity = 0;
1459  char *parse;
1460 
1463  AST_APP_ARG(characters);
1464  );
1465 
1466  if (ast_strlen_zero(data)) {
1467  ast_log(LOG_WARNING, "SayAlphaCase requires two arguments (options, characters)\n");
1468  return 0;
1469  }
1470 
1471  parse = ast_strdupa(data);
1473 
1474  if (!args.options || strlen(args.options) != 1) {
1475  ast_log(LOG_WARNING, "SayAlphaCase options are mutually exclusive and required\n");
1476  return 0;
1477  }
1478 
1479  switch (args.options[0]) {
1480  case 'a':
1481  sensitivity = AST_SAY_CASE_ALL;
1482  break;
1483  case 'l':
1484  sensitivity = AST_SAY_CASE_LOWER;
1485  break;
1486  case 'n':
1487  sensitivity = AST_SAY_CASE_NONE;
1488  break;
1489  case 'u':
1490  sensitivity = AST_SAY_CASE_UPPER;
1491  break;
1492  default:
1493  ast_log(LOG_WARNING, "Invalid option: '%s'\n", args.options);
1494  return 0;
1495  }
1496 
1497  res = ast_say_character_str(chan, args.characters, permit_dtmf_interrupt(chan) ? AST_DIGIT_ANY : "", ast_channel_language(chan), sensitivity);
1498 
1499  return res;
1500 }
static void parse(struct mgcp_request *req)
Definition: chan_mgcp.c:1844
#define AST_APP_ARG(name)
Define an application argument.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
@ AST_SAY_CASE_LOWER
Definition: say.h:183
@ AST_SAY_CASE_ALL
Definition: say.h:185
@ AST_SAY_CASE_UPPER
Definition: say.h:184
const char * args

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, parse(), and permit_dtmf_interrupt().

◆ pbx_builtin_saydigits()

static int pbx_builtin_saydigits ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1433 of file pbx_builtins.c.

1434 {
1435  int res = 0;
1436 
1437  if (data) {
1438  res = ast_say_digit_str(chan, data, permit_dtmf_interrupt(chan) ? AST_DIGIT_ANY : "", ast_channel_language(chan));
1439  }
1440 
1441  return res;
1442 }
int ast_say_digit_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang)
says digits of a string
Definition: channel.c:8342

References ast_channel_language(), AST_DIGIT_ANY, ast_say_digit_str(), and permit_dtmf_interrupt().

◆ pbx_builtin_saymoney()

static int pbx_builtin_saymoney ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1444 of file pbx_builtins.c.

1445 {
1446  int res = 0;
1447 
1448  if (data) {
1449  res = ast_say_money_str(chan, data, permit_dtmf_interrupt(chan) ? AST_DIGIT_ANY : "", ast_channel_language(chan));
1450  }
1451 
1452  return res;
1453 }
int ast_say_money_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang)
function to pronounce monetary amounts
Definition: channel.c:8348

References ast_channel_language(), AST_DIGIT_ANY, ast_say_money_str(), and permit_dtmf_interrupt().

◆ pbx_builtin_saynumber()

static int pbx_builtin_saynumber ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1355 of file pbx_builtins.c.

1356 {
1357  char tmp[256];
1358  char *number = tmp;
1359  int number_val;
1360  char *options;
1361  int res;
1362  int interrupt = permit_dtmf_interrupt(chan);
1363 
1364  if (ast_strlen_zero(data)) {
1365  ast_log(LOG_WARNING, "SayNumber requires an argument (number)\n");
1366  return -1;
1367  }
1368  ast_copy_string(tmp, data, sizeof(tmp));
1369  strsep(&number, ",");
1370 
1371  if (ast_str_to_int(tmp, &number_val)) {
1372  ast_log(LOG_WARNING, "argument '%s' to SayNumber could not be parsed as a number.\n", tmp);
1373  return 0;
1374  }
1375 
1376  options = strsep(&number, ",");
1377  if (options) {
1378  if ( strcasecmp(options, "f") && strcasecmp(options, "m") &&
1379  strcasecmp(options, "c") && strcasecmp(options, "n") ) {
1380  ast_log(LOG_WARNING, "SayNumber gender option is either 'f', 'm', 'c' or 'n'\n");
1381  return -1;
1382  }
1383  }
1384 
1385  res = ast_say_number(chan, number_val, interrupt ? AST_DIGIT_ANY : "", ast_channel_language(chan), options);
1386 
1387  if (res < 0 && !ast_check_hangup_locked(chan)) {
1388  ast_log(LOG_WARNING, "We were unable to say the number %s, is it too large?\n", tmp);
1389  }
1390 
1391  return interrupt ? res : 0;
1392 }
int ast_check_hangup_locked(struct ast_channel *chan)
Definition: channel.c:459
int ast_str_to_int(const char *str, int *res)
Convert the given string to a signed integer.
Definition: conversions.c:44
int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says a number
Definition: channel.c:8318
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
Definition: strings.h:406
Number structure.
Definition: app_followme.c:154

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().

◆ pbx_builtin_sayordinal()

static int pbx_builtin_sayordinal ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1394 of file pbx_builtins.c.

1395 {
1396  char tmp[256];
1397  char *number = tmp;
1398  int number_val;
1399  char *options;
1400  int res;
1401  int interrupt = permit_dtmf_interrupt(chan);
1402 
1403  if (ast_strlen_zero(data)) {
1404  ast_log(LOG_WARNING, "SayOrdinal requires an argument (number)\n");
1405  return -1;
1406  }
1407  ast_copy_string(tmp, data, sizeof(tmp));
1408  strsep(&number, ",");
1409 
1410  if (ast_str_to_int(tmp, &number_val)) {
1411  ast_log(LOG_WARNING, "argument '%s' to SayOrdinal could not be parsed as a number.\n", tmp);
1412  return 0;
1413  }
1414 
1415  options = strsep(&number, ",");
1416  if (options) {
1417  if ( strcasecmp(options, "f") && strcasecmp(options, "m") &&
1418  strcasecmp(options, "c") && strcasecmp(options, "n") ) {
1419  ast_log(LOG_WARNING, "SayOrdinal gender option is either 'f', 'm', 'c' or 'n'\n");
1420  return -1;
1421  }
1422  }
1423 
1424  res = ast_say_ordinal(chan, number_val, interrupt ? AST_DIGIT_ANY : "", ast_channel_language(chan), options);
1425 
1426  if (res < 0 && !ast_check_hangup_locked(chan)) {
1427  ast_log(LOG_WARNING, "We were unable to say the number %s, is it too large?\n", tmp);
1428  }
1429 
1430  return interrupt ? res : 0;
1431 }
int ast_say_ordinal(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
says an ordinal number
Definition: channel.c:8324

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().

◆ pbx_builtin_sayphonetic()

static int pbx_builtin_sayphonetic ( struct ast_channel chan,
const char *  data 
)
static

Definition at line 1513 of file pbx_builtins.c.

1514 {
1515  int res = 0;
1516 
1517  if (data) {
1518  res = ast_say_phonetic_str(chan, data, permit_dtmf_interrupt(chan) ? AST_DIGIT_ANY : "", ast_channel_language(chan));
1519  }
1520 
1521  return res;
1522 }
int ast_say_phonetic_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang)
Definition: channel.c:8360

References ast_channel_language(), AST_DIGIT_ANY, ast_say_phonetic_str(), and permit_dtmf_interrupt().

◆ permit_dtmf_interrupt()

static int permit_dtmf_interrupt ( struct ast_channel chan)
static

Determine if DTMF interruption was requested.

If the SAY_DTMF_INTERRUPT channel variable is truthy, the caller has requested DTMF interruption be enabled.

Parameters
chanthe channel to examine
Return values
-1if DTMF interruption was requested
0if DTMF interruption was not requested

Definition at line 1344 of file pbx_builtins.c.

1345 {
1346  int interrupt;
1347 
1348  ast_channel_lock(chan);
1349  interrupt = ast_true(pbx_builtin_getvar_helper(chan, "SAY_DTMF_INTERRUPT"));
1350  ast_channel_unlock(chan);
1351 
1352  return interrupt;
1353 }
#define ast_channel_lock(chan)
Definition: channel.h:2922
#define ast_channel_unlock(chan)
Definition: channel.h:2923
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true"....
Definition: main/utils.c:2097

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().

◆ unload_pbx_builtins()

static void unload_pbx_builtins ( void  )
static

Definition at line 1597 of file pbx_builtins.c.

1598 {
1599  int x;
1600 
1601  /* Unregister builtin applications */
1602  for (x = 0; x < ARRAY_LEN(builtins); x++) {
1604  }
1605 }
int ast_unregister_application(const char *app)
Unregister an application.
Definition: pbx_app.c:392

References ARRAY_LEN, ast_unregister_application(), builtins, name, and ast_channel::x.

Referenced by load_pbx_builtins().

Variable Documentation

◆ background_opts

const struct ast_app_option background_opts[128] = { [ 's' ] = { .flag = (1 << 0) }, [ 'n' ] = { .flag = (1 << 1) }, [ 'm' ] = { .flag = (1 << 2) }, [ 'p' ] = { .flag = (1 << 3) }, }
static

Definition at line 1 of file pbx_builtins.c.

Referenced by pbx_builtin_background().

◆ builtins

struct pbx_builtin builtins[]

◆ waitexten_opts

const struct ast_app_option waitexten_opts[128] = { [ 'm' ] = { .flag = (1 << 0) , .arg_index = 0 + 1 }, [ 'd' ] = { .flag = (1 << 1) , .arg_index = 0 + 1 }, }
static

Definition at line 1 of file pbx_builtins.c.

Referenced by pbx_builtin_waitexten().