Asterisk - The Open Source Telephony Project
18.5.0
|
Call Parking and Pickup API Includes code and algorithms from the Zapata library. More...
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... | |
Call Parking and Pickup API Includes code and algorithms from the Zapata library.
Definition in file features.h.
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.
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.
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.
bridge | Bridge to which the channel should be added |
chan | The channel to add to the bridge |
features | Features for this channel in the bridge |
play_tone | Indicates if a tone should be played to the channel |
xfersound | Sound that should be used to indicate transfer with play_tone |
0 | Success |
-1 | Failure |
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().
int ast_bridge_call | ( | struct ast_channel * | chan, |
struct ast_channel * | peer, | ||
struct ast_bridge_config * | config | ||
) |
Bridge a call, optionally allowing redirection.
Bridge a call, optionally allowing redirection.
chan | The bridge considers this channel the caller. |
peer | The bridge considers this channel the callee. |
config | Configuration for this bridge. |
Set start time, check for two channels,check if monitor on check for feature activation, create new CDR
res | on success. |
-1 | on 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().
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.
chan | The calling channel |
peer | The called channel |
config | Bridge configuration for the channels |
flags | Additional flags to set on the created bridge |
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().
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
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().