Asterisk - The Open Source Telephony Project  18.5.0
Enumerations | Functions
features.h File Reference

Call Parking and Pickup API Includes code and algorithms from the Zapata library. More...

#include "asterisk/pbx.h"
#include "asterisk/linkedlists.h"
#include "asterisk/bridge.h"
Include dependency graph for features.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  {
  AST_FEATURE_FLAG_NEEDSDTMF = (1 << 0), AST_FEATURE_FLAG_ONPEER = (1 << 1), AST_FEATURE_FLAG_ONSELF = (1 << 2), AST_FEATURE_FLAG_BYCALLEE = (1 << 3),
  AST_FEATURE_FLAG_BYCALLER = (1 << 4), AST_FEATURE_FLAG_BYBOTH = (3 << 3)
}
 main call feature structure More...
 

Functions

int ast_bridge_add_channel (struct ast_bridge *bridge, struct ast_channel *chan, struct ast_bridge_features *features, int play_tone, const char *xfersound)
 Add an arbitrary channel to a bridge. More...
 
int ast_bridge_call (struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config)
 Bridge a call, optionally allowing redirection. More...
 
int ast_bridge_call_with_flags (struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, unsigned int flags)
 Bridge a call, and add additional flags to the bridge. More...
 
int ast_bridge_timelimit (struct ast_channel *chan, struct ast_bridge_config *config, char *parse, struct timeval *calldurationlimit)
 parse L option and read associated channel variables to set warning, warning frequency, and timelimit More...
 

Detailed Description

Call Parking and Pickup API Includes code and algorithms from the Zapata library.

Definition in file features.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

main call feature structure

Enumerator
AST_FEATURE_FLAG_NEEDSDTMF 
AST_FEATURE_FLAG_ONPEER 
AST_FEATURE_FLAG_ONSELF 
AST_FEATURE_FLAG_BYCALLEE 
AST_FEATURE_FLAG_BYCALLER 
AST_FEATURE_FLAG_BYBOTH 

Definition at line 33 of file features.h.

Function Documentation

◆ ast_bridge_add_channel()

int ast_bridge_add_channel ( struct ast_bridge bridge,
struct ast_channel chan,
struct ast_bridge_features features,
int  play_tone,
const char *  xfersound 
)

Add an arbitrary channel to a bridge.

Since
12.0.0

The channel that is being added to the bridge can be in any state: unbridged, bridged, answered, unanswered, etc. The channel will be added asynchronously, meaning that when this function returns once the channel has been added to the bridge, not once the channel has been removed from the bridge.

In addition, a tone can optionally be played to the channel once the channel is placed into the bridge.

Note
When this function returns, there is no guarantee that the channel that was passed in is valid any longer. Do not attempt to operate on the channel after this function returns.
Parameters
bridgeBridge to which the channel should be added
chanThe channel to add to the bridge
featuresFeatures for this channel in the bridge
play_toneIndicates if a tone should be played to the channel
xfersoundSound that should be used to indicate transfer with play_tone
Note
The features parameter must be NULL or obtained by ast_bridge_features_new(). You must not dereference features after calling even if the call fails.
Return values
0Success
-1Failure

Definition at line 2519 of file bridge.c.

References ao2_cleanup, ast_answer(), ast_assert, ast_bridge_channel_queue_playfile(), ast_bridge_features_destroy(), ast_bridge_impart(), AST_BRIDGE_IMPART_CHAN_INDEPENDENT, ast_bridge_lock_both, ast_bridge_unlock, ast_channel_get_bridge(), ast_channel_get_bridge_channel(), ast_channel_lock, ast_channel_name(), ast_channel_pbx(), ast_channel_ref, ast_channel_unlock, ast_channel_unref, ast_channel_yank(), ast_hangup(), ast_log, ast_moh_stop(), AST_STATE_UP, ast_strlen_zero, bridge_dissolve_check_stolen(), bridge_find_channel(), bridge_move_locked(), LOG_WARNING, NULL, and RAII_VAR.

Referenced by action_bridge(), bridge_exec(), and manager_park_unbridged().

2521 {
2522  RAII_VAR(struct ast_bridge *, chan_bridge, NULL, ao2_cleanup);
2523  RAII_VAR(struct ast_channel *, yanked_chan, NULL, ao2_cleanup);
2524 
2525  ast_moh_stop(chan);
2526 
2527  ast_channel_lock(chan);
2528  chan_bridge = ast_channel_get_bridge(chan);
2529  ast_channel_unlock(chan);
2530 
2531  if (chan_bridge) {
2532  struct ast_bridge_channel *bridge_channel;
2533 
2534  /* The channel is in a bridge so it is not getting any new features. */
2535  ast_bridge_features_destroy(features);
2536 
2537  ast_bridge_lock_both(bridge, chan_bridge);
2538  bridge_channel = bridge_find_channel(chan_bridge, chan);
2539 
2540  if (bridge_move_locked(bridge, chan_bridge, chan, NULL, 1)) {
2541  ast_bridge_unlock(chan_bridge);
2542  ast_bridge_unlock(bridge);
2543  return -1;
2544  }
2545 
2546  /*
2547  * bridge_move_locked() will implicitly ensure that
2548  * bridge_channel is not NULL.
2549  */
2550  ast_assert(bridge_channel != NULL);
2551 
2552  /*
2553  * Additional checks if the channel we just stole dissolves the
2554  * original bridge.
2555  */
2556  bridge_dissolve_check_stolen(chan_bridge, bridge_channel);
2557  ast_bridge_unlock(chan_bridge);
2558  ast_bridge_unlock(bridge);
2559  } else {
2560  /* Slightly less easy case. We need to yank channel A from
2561  * where he currently is and impart him into our bridge.
2562  */
2563  yanked_chan = ast_channel_yank(chan);
2564  if (!yanked_chan) {
2565  ast_log(LOG_WARNING, "Could not gain control of channel %s\n", ast_channel_name(chan));
2566  ast_bridge_features_destroy(features);
2567  return -1;
2568  }
2569  if (ast_channel_state(yanked_chan) != AST_STATE_UP) {
2570  ast_answer(yanked_chan);
2571  }
2572  ast_channel_ref(yanked_chan);
2573  if (ast_bridge_impart(bridge, yanked_chan, NULL, features,
2575  /* It is possible for us to yank a channel and have some other
2576  * thread start a PBX on the channl after we yanked it. In particular,
2577  * this can theoretically happen on the ;2 of a Local channel if we
2578  * yank it prior to the ;1 being answered. Make sure that it isn't
2579  * executing a PBX before hanging it up.
2580  */
2581  if (ast_channel_pbx(yanked_chan)) {
2582  ast_channel_unref(yanked_chan);
2583  } else {
2584  ast_hangup(yanked_chan);
2585  }
2586  return -1;
2587  }
2588  }
2589 
2590  if (play_tone && !ast_strlen_zero(xfersound)) {
2591  struct ast_channel *play_chan = yanked_chan ?: chan;
2592  RAII_VAR(struct ast_bridge_channel *, play_bridge_channel, NULL, ao2_cleanup);
2593 
2594  ast_channel_lock(play_chan);
2595  play_bridge_channel = ast_channel_get_bridge_channel(play_chan);
2596  ast_channel_unlock(play_chan);
2597 
2598  if (!play_bridge_channel) {
2599  ast_log(LOG_WARNING, "Unable to play tone for channel %s. No longer in a bridge.\n",
2600  ast_channel_name(play_chan));
2601  } else {
2602  ast_bridge_channel_queue_playfile(play_bridge_channel, NULL, xfersound, NULL);
2603  }
2604  }
2605  return 0;
2606 }
static int bridge_move_locked(struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge, struct ast_channel *chan, struct ast_channel *swap, int attempt_recovery)
Definition: bridge.c:2447
#define ast_channel_lock(chan)
Definition: channel.h:2945
Main Channel structure associated with a channel.
#define ast_bridge_lock_both(bridge1, bridge2)
Lock two bridges.
Definition: bridge.h:500
#define ast_channel_unref(c)
Decrease channel reference count.
Definition: channel.h:2981
#define LOG_WARNING
Definition: logger.h:274
struct ast_bridge_channel * bridge_find_channel(struct ast_bridge *bridge, struct ast_channel *chan)
Definition: bridge.c:1469
ast_channel_state
ast_channel states
Definition: channelstate.h:35
struct ast_channel * ast_channel_yank(struct ast_channel *yankee)
Gain control of a channel in the system.
Definition: channel.c:10794
#define ast_assert(a)
Definition: utils.h:695
static void bridge_dissolve_check_stolen(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Definition: bridge.c:361
#define NULL
Definition: resample.c:96
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
Definition: channel.c:7876
#define ast_strlen_zero(foo)
Definition: strings.h:52
#define ast_log
Definition: astobj2.c:42
struct ast_bridge * ast_channel_get_bridge(const struct ast_channel *chan)
Get the bridge associated with a channel.
Definition: channel.c:10735
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
Definition: utils.h:911
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
Structure that contains information about a bridge.
Definition: bridge.h:357
int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags)
Impart a channel to a bridge (non-blocking)
Definition: bridge.c:1924
#define ast_channel_unlock(chan)
Definition: channel.h:2946
#define ast_bridge_unlock(bridge)
Unlock the bridge.
Definition: bridge.h:493
void ast_bridge_features_destroy(struct ast_bridge_features *features)
Destroy an allocated bridge features struct.
Definition: bridge.c:3741
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
Definition: channel.c:2548
struct ast_bridge_channel * ast_channel_get_bridge_channel(struct ast_channel *chan)
Get a reference to the channel&#39;s bridge pointer.
Definition: channel.c:10783
Structure that contains information regarding a channel in a bridge.
#define ast_channel_ref(c)
Increase channel reference count.
Definition: channel.h:2970
#define ao2_cleanup(obj)
Definition: astobj2.h:1958
const char * ast_channel_name(const struct ast_channel *chan)
int ast_bridge_channel_queue_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
Queue a bridge action play file frame onto the bridge channel.
int ast_answer(struct ast_channel *chan)
Answer a channel.
Definition: channel.c:2814

◆ ast_bridge_call()

int ast_bridge_call ( struct ast_channel chan,
struct ast_channel peer,
struct ast_bridge_config config 
)

Bridge a call, optionally allowing redirection.

Note
The function caller is assumed to have already done the COLP exchange for the initial bridging of the two channels if it was desired.

Bridge a call, optionally allowing redirection.

Parameters
chanThe bridge considers this channel the caller.
peerThe bridge considers this channel the callee.
configConfiguration for this bridge.

Set start time, check for two channels,check if monitor on check for feature activation, create new CDR

Return values
reson success.
-1on failure to bridge.

Definition at line 716 of file features.c.

References ast_bridge_call_with_flags().

Referenced by app_exec(), and dial_exec_full().

717 {
718  return ast_bridge_call_with_flags(chan, peer, config, 0);
719 }
int ast_bridge_call_with_flags(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, unsigned int flags)
Bridge a call, and add additional flags to the bridge.
Definition: features.c:633

◆ ast_bridge_call_with_flags()

int ast_bridge_call_with_flags ( struct ast_channel chan,
struct ast_channel peer,
struct ast_bridge_config config,
unsigned int  flags 
)

Bridge a call, and add additional flags to the bridge.

This does the same thing as ast_bridge_call, except that once the bridge is created, the provided flags are set on the bridge. The provided flags are added to the bridge's flags; they will not clear any flags already set.

Parameters
chanThe calling channel
peerThe called channel
configBridge configuration for the channels
flagsAdditional flags to set on the created bridge
Note
The function caller is assumed to have already done the COLP exchange for the initial bridging of the two channels if it was desired.

Definition at line 633 of file features.c.

References ast_bridge_basic_new(), ast_bridge_basic_set_flags(), ast_bridge_destroy(), ast_bridge_features_cleanup(), ast_bridge_features_destroy(), ast_bridge_features_init(), ast_bridge_features_new(), ast_bridge_impart(), AST_BRIDGE_IMPART_CHAN_INDEPENDENT, AST_BRIDGE_IMPART_INHIBIT_JOIN_COLP, ast_bridge_join(), AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP, AST_BRIDGE_JOIN_PASS_REFERENCE, ast_channel_lock, ast_channel_name(), ast_channel_softhangup_internal_flag(), ast_channel_unlock, AST_SOFTHANGUP_ASYNCGOTO, bridge_failed_peer_goto(), ast_bridge_config::end_bridge_callback, ast_bridge_config::end_bridge_callback_data, NULL, ast_dial_features::peer_features, pre_bridge_setup(), and SCOPE_TRACE.

Referenced by ast_bridge_call(), and try_calling().

634 {
635  int res;
636  struct ast_bridge *bridge;
637  struct ast_bridge_features chan_features;
638  struct ast_bridge_features *peer_features;
639  SCOPE_TRACE(1, "%s Peer: %s\n", ast_channel_name(chan), ast_channel_name(peer));
640 
641  /* Setup features. */
642  res = ast_bridge_features_init(&chan_features);
643  peer_features = ast_bridge_features_new();
644  if (res || !peer_features) {
645  ast_bridge_features_destroy(peer_features);
646  ast_bridge_features_cleanup(&chan_features);
647  bridge_failed_peer_goto(chan, peer);
648  return -1;
649  }
650 
651  if (pre_bridge_setup(chan, peer, config, &chan_features, peer_features)) {
652  ast_bridge_features_destroy(peer_features);
653  ast_bridge_features_cleanup(&chan_features);
654  bridge_failed_peer_goto(chan, peer);
655  return -1;
656  }
657 
658  /* Create bridge */
659  bridge = ast_bridge_basic_new();
660  if (!bridge) {
661  ast_bridge_features_destroy(peer_features);
662  ast_bridge_features_cleanup(&chan_features);
663  bridge_failed_peer_goto(chan, peer);
664  return -1;
665  }
666 
667  ast_bridge_basic_set_flags(bridge, flags);
668 
669  /* Put peer into the bridge */
670  if (ast_bridge_impart(bridge, peer, NULL, peer_features,
672  ast_bridge_destroy(bridge, 0);
673  ast_bridge_features_cleanup(&chan_features);
674  bridge_failed_peer_goto(chan, peer);
675  return -1;
676  }
677 
678  /* Join bridge */
679  ast_bridge_join(bridge, chan, NULL, &chan_features, NULL,
681 
682  /*
683  * If the bridge was broken for a hangup that isn't real, then
684  * don't run the h extension, because the channel isn't really
685  * hung up. This should really only happen with
686  * AST_SOFTHANGUP_ASYNCGOTO.
687  */
688  res = -1;
689  ast_channel_lock(chan);
691  res = 0;
692  }
693  ast_channel_unlock(chan);
694 
695  ast_bridge_features_cleanup(&chan_features);
696 
697  if (res && config->end_bridge_callback) {
699  }
700 
701  return res;
702 }
#define ast_channel_lock(chan)
Definition: channel.h:2945
void ast_bridge_features_cleanup(struct ast_bridge_features *features)
Clean up the contents of a bridge features structure.
Definition: bridge.c:3720
Structure that contains features information.
int ast_bridge_features_init(struct ast_bridge_features *features)
Initialize bridge features structure.
Definition: bridge.c:3687
int ast_bridge_destroy(struct ast_bridge *bridge, int cause)
Destroy a bridge.
Definition: bridge.c:970
#define NULL
Definition: resample.c:96
void ast_bridge_features_destroy(struct ast_bridge_features *features)
Destroy an allocated bridge features struct.
Definition: bridge.c:3741
static int pre_bridge_setup(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config, struct ast_bridge_features *chan_features, struct ast_bridge_features *peer_features)
Definition: features.c:536
int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags) attribute_warn_unused_result
Impart a channel to a bridge (non-blocking)
Definition: bridge.c:1924
void ast_bridge_basic_set_flags(struct ast_bridge *bridge, unsigned int flags)
Set feature flags on a basic bridge.
void * end_bridge_callback_data
Definition: channel.h:1092
Structure that contains information about a bridge.
Definition: bridge.h:357
#define ast_channel_unlock(chan)
Definition: channel.h:2946
int ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, struct ast_bridge_tech_optimizations *tech_args, enum ast_bridge_join_flags flags)
Join a channel to a bridge (blocking)
Definition: bridge.c:1667
struct ast_bridge_features * ast_bridge_features_new(void)
Allocate a new bridge features struct.
Definition: bridge.c:3750
void(* end_bridge_callback)(void *)
Definition: channel.h:1091
int ast_channel_softhangup_internal_flag(struct ast_channel *chan)
struct ast_bridge * ast_bridge_basic_new(void)
Create a new basic class bridge.
#define SCOPE_TRACE(level,...)
Print a trace message with details when a scope is entered or existed.
Definition: logger.h:749
const char * ast_channel_name(const struct ast_channel *chan)
static void bridge_failed_peer_goto(struct ast_channel *chan, struct ast_channel *peer)
Definition: features.c:528

◆ ast_bridge_timelimit()

int ast_bridge_timelimit ( struct ast_channel chan,
struct ast_bridge_config config,
char *  parse,
struct timeval *  calldurationlimit 
)

parse L option and read associated channel variables to set warning, warning frequency, and timelimit

Note
caller must be aware of freeing memory for warning_sound, end_sound, and start_sound

Definition at line 886 of file features.c.

References ast_channel_lock, ast_channel_unlock, AST_FEATURE_PLAY_WARNING, ast_log, ast_set_flag, ast_strdup, ast_strdupa, ast_strlen_zero, ast_true(), ast_verb, ast_bridge_config::end_sound, ast_bridge_config::features_callee, ast_bridge_config::features_caller, LOG_WARNING, NULL, pbx_builtin_getvar_helper(), ast_bridge_config::play_warning, S_OR, ast_bridge_config::start_sound, strsep(), ast_bridge_config::timelimit, var, ast_bridge_config::warning_freq, and ast_bridge_config::warning_sound.

Referenced by bridge_exec(), and dial_exec_full().

888 {
889  char *stringp = ast_strdupa(parse);
890  char *limit_str, *warning_str, *warnfreq_str;
891  const char *var;
892  int play_to_caller = 0, play_to_callee = 0;
893  int delta;
894 
895  limit_str = strsep(&stringp, ":");
896  warning_str = strsep(&stringp, ":");
897  warnfreq_str = strsep(&stringp, ":");
898 
899  config->timelimit = atol(limit_str);
900  if (warning_str)
901  config->play_warning = atol(warning_str);
902  if (warnfreq_str)
903  config->warning_freq = atol(warnfreq_str);
904 
905  if (!config->timelimit) {
906  ast_log(LOG_WARNING, "Bridge does not accept L(%s)\n", limit_str);
907  config->timelimit = config->play_warning = config->warning_freq = 0;
908  config->warning_sound = NULL;
909  return -1; /* error */
910  } else if ( (delta = config->play_warning - config->timelimit) > 0) {
911  int w = config->warning_freq;
912 
913  /*
914  * If the first warning is requested _after_ the entire call
915  * would end, and no warning frequency is requested, then turn
916  * off the warning. If a warning frequency is requested, reduce
917  * the 'first warning' time by that frequency until it falls
918  * within the call's total time limit.
919  *
920  * Graphically:
921  * timelim->| delta |<-playwarning
922  * 0__________________|_________________|
923  * | w | | | |
924  *
925  * so the number of intervals to cut is 1+(delta-1)/w
926  */
927  if (w == 0) {
928  config->play_warning = 0;
929  } else {
930  config->play_warning -= w * ( 1 + (delta-1)/w );
931  if (config->play_warning < 1)
932  config->play_warning = config->warning_freq = 0;
933  }
934  }
935 
936  ast_channel_lock(chan);
937 
938  var = pbx_builtin_getvar_helper(chan, "LIMIT_PLAYAUDIO_CALLER");
939  play_to_caller = var ? ast_true(var) : 1;
940 
941  var = pbx_builtin_getvar_helper(chan, "LIMIT_PLAYAUDIO_CALLEE");
942  play_to_callee = var ? ast_true(var) : 0;
943 
944  if (!play_to_caller && !play_to_callee)
945  play_to_caller = 1;
946 
947  var = pbx_builtin_getvar_helper(chan, "LIMIT_WARNING_FILE");
948  config->warning_sound = !ast_strlen_zero(var) ? ast_strdup(var) : ast_strdup("timeleft");
949 
950  /* The code looking at config wants a NULL, not just "", to decide
951  * that the message should not be played, so we replace "" with NULL.
952  * Note, pbx_builtin_getvar_helper _can_ return NULL if the variable is
953  * not found.
954  */
955 
956  var = pbx_builtin_getvar_helper(chan, "LIMIT_TIMEOUT_FILE");
957  config->end_sound = !ast_strlen_zero(var) ? ast_strdup(var) : NULL;
958 
959  var = pbx_builtin_getvar_helper(chan, "LIMIT_CONNECT_FILE");
960  config->start_sound = !ast_strlen_zero(var) ? ast_strdup(var) : NULL;
961 
962  ast_channel_unlock(chan);
963 
964  /* undo effect of S(x) in case they are both used */
965  calldurationlimit->tv_sec = 0;
966  calldurationlimit->tv_usec = 0;
967 
968  /* more efficient to do it like S(x) does since no advanced opts */
969  if (!config->play_warning && !config->start_sound && !config->end_sound && config->timelimit) {
970  calldurationlimit->tv_sec = config->timelimit / 1000;
971  calldurationlimit->tv_usec = (config->timelimit % 1000) * 1000;
972  ast_verb(3, "Setting call duration limit to %.3lf seconds.\n",
973  calldurationlimit->tv_sec + calldurationlimit->tv_usec / 1000000.0);
974  play_to_caller = 0;
975  play_to_callee = 0;
976  config->timelimit = 0;
977  config->play_warning = 0;
978  config->warning_freq = 0;
979  } else {
980  ast_verb(4, "Limit Data for this call:\n");
981  ast_verb(4, "timelimit = %ld ms (%.3lf s)\n", config->timelimit, config->timelimit / 1000.0);
982  ast_verb(4, "play_warning = %ld ms (%.3lf s)\n", config->play_warning, config->play_warning / 1000.0);
983  ast_verb(4, "play_to_caller = %s\n", play_to_caller ? "yes" : "no");
984  ast_verb(4, "play_to_callee = %s\n", play_to_callee ? "yes" : "no");
985  ast_verb(4, "warning_freq = %ld ms (%.3lf s)\n", config->warning_freq, config->warning_freq / 1000.0);
986  ast_verb(4, "start_sound = %s\n", S_OR(config->start_sound, ""));
987  ast_verb(4, "warning_sound = %s\n", config->warning_sound);
988  ast_verb(4, "end_sound = %s\n", S_OR(config->end_sound, ""));
989  }
990  if (play_to_caller)
992  if (play_to_callee)
994  return 0;
995 }
#define ast_channel_lock(chan)
Definition: channel.h:2945
struct ast_flags features_callee
Definition: channel.h:1079
#define ast_set_flag(p, flag)
Definition: utils.h:70
#define LOG_WARNING
Definition: logger.h:274
#define var
Definition: ast_expr2f.c:614
#define ast_strdup(str)
A wrapper for strdup()
Definition: astmm.h:243
#define NULL
Definition: resample.c:96
#define ast_verb(level,...)
Definition: logger.h:463
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
const char * start_sound
Definition: channel.h:1089
#define ast_strlen_zero(foo)
Definition: strings.h:52
#define ast_log
Definition: astobj2.c:42
const char * end_sound
Definition: channel.h:1088
#define ast_strdupa(s)
duplicate a string in memory from the stack
Definition: astmm.h:300
struct ast_flags features_caller
Definition: channel.h:1078
int attribute_pure ast_true(const char *val)
Make sure something is true. Determine if a string containing a boolean value is "true". This function checks to see whether a string passed to it is an indication of an "true" value. It checks to see if the string is "yes", "true", "y", "t", "on" or "1".
Definition: main/utils.c:1951
#define ast_channel_unlock(chan)
Definition: channel.h:2946
static void parse(struct mgcp_request *req)
Definition: chan_mgcp.c:1872
char * strsep(char **str, const char *delims)
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
Definition: strings.h:79
const char * warning_sound
Definition: channel.h:1087