Asterisk - The Open Source Telephony Project GIT-master-d5a0626
|
Bridging API. More...
#include "asterisk.h"
#include "asterisk/logger.h"
#include "asterisk/channel.h"
#include "asterisk/options.h"
#include "asterisk/utils.h"
#include "asterisk/lock.h"
#include "asterisk/linkedlists.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_internal.h"
#include "asterisk/bridge_channel_internal.h"
#include "asterisk/bridge_features.h"
#include "asterisk/bridge_basic.h"
#include "asterisk/bridge_technology.h"
#include "asterisk/bridge_channel.h"
#include "asterisk/bridge_after.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/stasis_cache_pattern.h"
#include "asterisk/app.h"
#include "asterisk/file.h"
#include "asterisk/module.h"
#include "asterisk/astobj2.h"
#include "asterisk/pbx.h"
#include "asterisk/test.h"
#include "asterisk/_private.h"
#include "asterisk/heap.h"
#include "asterisk/say.h"
#include "asterisk/timing.h"
#include "asterisk/stringfields.h"
#include "asterisk/musiconhold.h"
#include "asterisk/features.h"
#include "asterisk/cli.h"
#include "asterisk/parking.h"
#include "asterisk/core_local.h"
#include "asterisk/core_unreal.h"
#include "asterisk/causes.h"
Go to the source code of this file.
Data Structures | |
struct | bridge_channel_impart_cond |
Internal bridge impart wait condition and associated conditional. More... | |
struct | bridge_channel_impart_ds_head |
struct | bridge_manager_controller |
struct | bridge_manager_request |
struct | bridge_technologies |
struct | merge_direction |
struct | tech_deferred_destroy |
Macros | |
#define | ATTENDEDTRANSFER "ATTENDEDTRANSFER" |
#define | BLINDTRANSFER "BLINDTRANSFER" |
#define | BRIDGE_ARRAY_GROW 32 |
#define | BRIDGE_ARRAY_START 128 |
#define | BRIDGE_LOCK_ONE_OR_BOTH(b1, b2) |
#define | FORMAT_HDR "%-36s %5s %-15s %-15s %s\n" |
#define | FORMAT_HDR "%-20s %-20s %8s %s\n" |
#define | FORMAT_ROW "%-36s %5u %-15s %-15s %s\n" |
#define | FORMAT_ROW "%-20s %-20s %8u %s\n" |
#define | MAX_BRIDGEPEER_CHANS (10 + 1) |
#define | UPDATE_BRIDGE_VARS_GET(chan, name, pvtid) |
Enumerations | |
enum | bridge_allow_merge { MERGE_PROHIBITED , MERGE_NOT_ENOUGH_CHANNELS , MERGE_NO_MULTIMIX , MERGE_ALLOWED } |
enum | bridge_allow_swap { SWAP_PROHIBITED , SWAP_TO_CHAN_BRIDGE , SWAP_TO_PEER_BRIDGE } |
Functions | |
int | __ast_bridge_technology_register (struct ast_bridge_technology *technology, struct ast_module *module) |
Register a bridge technology for use. More... | |
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... | |
struct ast_bridge * | ast_bridge_base_new (uint32_t capabilities, unsigned int flags, const char *creator, const char *name, const char *id) |
Create a new base class bridge. More... | |
int | ast_bridge_depart (struct ast_channel *chan) |
Depart a channel from a bridge. More... | |
int | ast_bridge_destroy (struct ast_bridge *bridge, int cause) |
Destroy a bridge. More... | |
int | ast_bridge_dtmf_hook (struct ast_bridge_features *features, const char *dtmf, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Attach a DTMF hook to a bridge features structure. More... | |
void | ast_bridge_features_cleanup (struct ast_bridge_features *features) |
Clean up the contents of a bridge features structure. More... | |
void | ast_bridge_features_destroy (struct ast_bridge_features *features) |
Destroy an allocated bridge features struct. More... | |
int | ast_bridge_features_do (enum ast_bridge_builtin_feature feature, struct ast_bridge_channel *bridge_channel, void *hook_pvt) |
Invoke a built in feature hook now. More... | |
int | ast_bridge_features_enable (struct ast_bridge_features *features, enum ast_bridge_builtin_feature feature, const char *dtmf, void *config, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Enable a built in feature on a bridge features structure. More... | |
int | ast_bridge_features_init (struct ast_bridge_features *features) |
Initialize bridge features structure. More... | |
int | ast_bridge_features_limits_construct (struct ast_bridge_features_limits *limits) |
Constructor function for ast_bridge_features_limits. More... | |
void | ast_bridge_features_limits_destroy (struct ast_bridge_features_limits *limits) |
Destructor function for ast_bridge_features_limits. More... | |
void | ast_bridge_features_merge (struct ast_bridge_features *into, const struct ast_bridge_features *from) |
Merge one ast_bridge_features into another. More... | |
struct ast_bridge_features * | ast_bridge_features_new (void) |
Allocate a new bridge features struct. More... | |
int | ast_bridge_features_register (enum ast_bridge_builtin_feature feature, ast_bridge_hook_callback callback, const char *dtmf) |
Register a handler for a built in feature. More... | |
void | ast_bridge_features_remove (struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags remove_flags) |
Remove marked bridge channel feature hooks. More... | |
void | ast_bridge_features_set_flag (struct ast_bridge_features *features, unsigned int flag) |
Set a flag on a bridge channel features structure. More... | |
int | ast_bridge_features_set_limits (struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, enum ast_bridge_hook_remove_flags remove_flags) |
Limit the amount of time a channel may stay in the bridge and optionally play warning messages as time runs out. More... | |
int | ast_bridge_features_unregister (enum ast_bridge_builtin_feature feature) |
Unregister a handler for a built in feature. More... | |
struct ast_bridge * | ast_bridge_find_by_id (const char *bridge_id) |
Find bridge by id. More... | |
int | ast_bridge_hangup_hook (struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Attach a hangup hook to a bridge features structure. More... | |
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) More... | |
int | ast_bridge_interval_hook (struct ast_bridge_features *features, enum ast_bridge_hook_timer_option flags, unsigned int interval, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Attach an interval hook to a bridge features structure. More... | |
int | ast_bridge_interval_register (enum ast_bridge_builtin_interval interval, ast_bridge_builtin_set_limits_fn callback) |
Register a handler for a built in interval feature. More... | |
int | ast_bridge_interval_unregister (enum ast_bridge_builtin_interval interval) |
Unregisters a handler for a built in interval feature. More... | |
int | ast_bridge_is_video_src (struct ast_bridge *bridge, struct ast_channel *chan) |
Determine if a channel is a video src for the bridge. More... | |
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) More... | |
int | ast_bridge_join_hook (struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Attach a bridge channel join hook to a bridge features structure. More... | |
int | ast_bridge_kick (struct ast_bridge *bridge, struct ast_channel *chan) |
Kick a channel from a bridge. More... | |
int | ast_bridge_leave_hook (struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Attach a bridge channel leave hook to a bridge features structure. More... | |
int | ast_bridge_merge (struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge, int merge_best_direction, struct ast_channel **kick_me, unsigned int num_kick) |
Merge two bridges together. More... | |
void | ast_bridge_merge_inhibit (struct ast_bridge *bridge, int request) |
Adjust the bridge merge inhibit request count. More... | |
int | ast_bridge_move (struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge, struct ast_channel *chan, struct ast_channel *swap, int attempt_recovery) |
Move a channel from one bridge to another. More... | |
int | ast_bridge_move_hook (struct ast_bridge_features *features, ast_bridge_move_indicate_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Attach a bridge channel move detection hook to a bridge features structure. More... | |
void | ast_bridge_notify_masquerade (struct ast_channel *chan) |
Notify bridging that this channel was just masqueraded. More... | |
int | ast_bridge_number_video_src (struct ast_bridge *bridge) |
Returns the number of video sources currently active in the bridge. More... | |
struct ast_channel * | ast_bridge_peer (struct ast_bridge *bridge, struct ast_channel *chan) |
Get the channel's bridge peer only if the bridge is two-party. More... | |
struct ast_channel * | ast_bridge_peer_nolock (struct ast_bridge *bridge, struct ast_channel *chan) |
Get the channel's bridge peer only if the bridge is two-party. More... | |
struct ao2_container * | ast_bridge_peers (struct ast_bridge *bridge) |
Get a container of all channels in the bridge. More... | |
struct ao2_container * | ast_bridge_peers_nolock (struct ast_bridge *bridge) |
Get a container of all channels in the bridge. More... | |
int | ast_bridge_queue_action (struct ast_bridge *bridge, struct ast_frame *action) |
Put an action onto the specified bridge. More... | |
int | ast_bridge_remove (struct ast_bridge *bridge, struct ast_channel *chan) |
Remove a channel from a bridge. More... | |
void | ast_bridge_remove_video_src (struct ast_bridge *bridge, struct ast_channel *chan) |
remove a channel as a source of video for the bridge. More... | |
void | ast_bridge_set_binaural_active (struct ast_bridge *bridge, unsigned int binaural_active) |
Activates the use of binaural signals in a conference bridge. More... | |
void | ast_bridge_set_internal_sample_rate (struct ast_bridge *bridge, unsigned int sample_rate) |
Adjust the internal mixing sample rate of a bridge used during multimix mode. More... | |
void | ast_bridge_set_maximum_sample_rate (struct ast_bridge *bridge, unsigned int sample_rate) |
Adjust the maximum mixing sample rate of a bridge used during multimix mode. More... | |
void | ast_bridge_set_mixing_interval (struct ast_bridge *bridge, unsigned int mixing_interval) |
Adjust the internal mixing interval of a bridge used during multimix mode. More... | |
void | ast_bridge_set_remb_estimated_bitrate (struct ast_bridge *bridge, float estimated_bitrate) |
Force the REMB report estimated bitrate to a specific max value. More... | |
void | ast_bridge_set_remb_send_interval (struct ast_bridge *bridge, unsigned int remb_send_interval) |
Set the interval at which a combined REMB frame will be sent to video sources. More... | |
void | ast_bridge_set_send_sdp_label (struct ast_bridge *bridge, unsigned int send_sdp_label) |
Controls whether to send a "label" attribute in each stream in an SDP. More... | |
void | ast_bridge_set_sfu_video_mode (struct ast_bridge *bridge) |
Set the bridge to be a selective forwarding unit. More... | |
void | ast_bridge_set_single_src_video_mode (struct ast_bridge *bridge, struct ast_channel *video_src_chan) |
Set a bridge to feed a single video source to all participants. More... | |
void | ast_bridge_set_talker_src_video_mode (struct ast_bridge *bridge) |
Set the bridge to pick the strongest talker supporting video as the single source video feed. More... | |
void | ast_bridge_set_transfer_variables (struct ast_channel *chan, const char *value, int attended) |
Set the relevant transfer variables for a single channel. More... | |
void | ast_bridge_set_video_update_discard (struct ast_bridge *bridge, unsigned int video_update_discard) |
Set the amount of time to discard subsequent video updates after a video update has been sent. More... | |
int | ast_bridge_suspend (struct ast_bridge *bridge, struct ast_channel *chan) |
Suspend a channel temporarily from a bridge. More... | |
int | ast_bridge_talk_detector_hook (struct ast_bridge_features *features, ast_bridge_talking_indicate_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
Attach a bridge channel talk detection hook to a bridge features structure. More... | |
void | ast_bridge_technology_suspend (struct ast_bridge_technology *technology) |
Suspend a bridge technology from consideration. More... | |
int | ast_bridge_technology_unregister (struct ast_bridge_technology *technology) |
Unregister a bridge technology from use. More... | |
void | ast_bridge_technology_unsuspend (struct ast_bridge_technology *technology) |
Unsuspend a bridge technology. More... | |
struct ast_bridge * | ast_bridge_transfer_acquire_bridge (struct ast_channel *chan) |
Acquire the channel's bridge for transfer purposes. More... | |
enum ast_transfer_result | ast_bridge_transfer_attended (struct ast_channel *to_transferee, struct ast_channel *to_transfer_target) |
Attended transfer. More... | |
enum ast_transfer_result | ast_bridge_transfer_blind (int is_external, struct ast_channel *transferer, const char *exten, const char *context, transfer_channel_cb new_channel_cb, void *user_data) |
Blind transfer target to the extension and context provided. More... | |
int | ast_bridge_unreal_optimize_out (struct ast_channel *chan, struct ast_channel *peer, struct ast_unreal_pvt *pvt) |
Check and optimize out the unreal channels between bridges. More... | |
int | ast_bridge_unsuspend (struct ast_bridge *bridge, struct ast_channel *chan) |
Unsuspend a channel from a bridge. More... | |
void | ast_bridge_update_talker_src_video_mode (struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyframe) |
Update information about talker energy for talker src video mode. More... | |
void | ast_bridge_vars_set (struct ast_channel *chan, const char *name, const char *pvtid) |
Sets BRIDGECHANNEL and BRIDGEPVTCALLID for a channel. More... | |
const char * | ast_bridge_video_mode_to_string (enum ast_bridge_video_mode_type video_mode) |
Converts an enum representation of a bridge video mode to string. More... | |
struct ao2_container * | ast_bridges (void) |
Returns the global bridges container. More... | |
enum ast_bridge_optimization | ast_bridges_allow_optimization (struct ast_bridge *chan_bridge, struct ast_bridge *peer_bridge) |
Determine if bridges allow for optimization to occur betweem them. More... | |
int | ast_bridging_init (void) |
Initialize the bridging system. More... | |
void | ast_brige_set_remb_behavior (struct ast_bridge *bridge, enum ast_bridge_video_sfu_remb_behavior behavior) |
Set the REMB report generation behavior on a bridge. More... | |
static enum ast_transfer_result | attended_transfer_bridge (struct ast_channel *chan1, struct ast_channel *chan2, struct ast_bridge *bridge1, struct ast_bridge *bridge2, struct ast_attended_transfer_message *transfer_msg) |
Perform an attended transfer of a bridge. More... | |
static enum ast_transfer_result | blind_transfer_bridge (int is_external, struct ast_channel *transferer, struct ast_bridge *bridge, const char *exten, const char *context, struct ast_channel *transferee, transfer_channel_cb new_channel_cb, struct transfer_channel_data *user_data_wrapper, struct ast_blind_transfer_message *transfer_message) |
static void | bridge_action_bridge (struct ast_bridge *bridge, struct ast_frame *action) |
struct ast_bridge * | bridge_alloc (size_t size, const struct ast_bridge_methods *v_table) |
static int | bridge_allows_optimization (struct ast_bridge *bridge) |
static void | bridge_base_destroy (struct ast_bridge *self) |
static void | bridge_base_dissolving (struct ast_bridge *self) |
static int | bridge_base_get_merge_priority (struct ast_bridge *self) |
struct ast_bridge * | bridge_base_init (struct ast_bridge *self, uint32_t capabilities, unsigned int flags, const char *creator, const char *name, const char *id) |
Initialize the base class of the bridge. More... | |
static void | bridge_base_notify_masquerade (struct ast_bridge *self, struct ast_bridge_channel *bridge_channel) |
static void | bridge_base_pull (struct ast_bridge *self, struct ast_bridge_channel *bridge_channel) |
static int | bridge_base_push (struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap) |
static int | bridge_base_push_peek (struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap) |
static void | bridge_channel_change_bridge (struct ast_bridge_channel *bridge_channel, struct ast_bridge *new_bridge) |
static void | bridge_channel_complete_join (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel) |
static void * | bridge_channel_depart_thread (void *data) |
Thread responsible for imparted bridged channels to be departed. More... | |
static int | bridge_channel_impart_add (struct ast_channel *chan, struct bridge_channel_impart_cond *cond) |
static void | bridge_channel_impart_ds_head_dtor (void *doomed) |
static void | bridge_channel_impart_ds_head_fixup (void *data, struct ast_channel *old_chan, struct ast_channel *new_chan) |
static void | bridge_channel_impart_ds_head_signal (struct bridge_channel_impart_ds_head *ds_head) |
void | bridge_channel_impart_signal (struct ast_channel *chan) |
static void | bridge_channel_impart_wait (struct bridge_channel_impart_cond *cond) |
static void * | bridge_channel_ind_thread (void *data) |
Thread responsible for independent imparted bridged channels. More... | |
static void | bridge_channel_moving (struct ast_bridge_channel *bridge_channel, struct ast_bridge *src, struct ast_bridge *dst) |
static void | bridge_cleanup (void) |
static void | bridge_complete_join (struct ast_bridge *bridge) |
void | bridge_dissolve (struct ast_bridge *bridge, int cause) |
static void | bridge_dissolve_check_stolen (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel) |
void | bridge_do_merge (struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge, struct ast_bridge_channel **kick_me, unsigned int num_kick, unsigned int optimized) |
int | bridge_do_move (struct ast_bridge *dst_bridge, struct ast_bridge_channel *bridge_channel, int attempt_recovery, unsigned int optimized) |
static int | bridge_dtmf_hook_sort (const void *obj_left, const void *obj_right, int flags) |
struct ast_bridge_channel * | bridge_find_channel (struct ast_bridge *bridge, struct ast_channel *chan) |
static void | bridge_handle_actions (struct ast_bridge *bridge) |
static void | bridge_hook_destroy (void *vhook) |
static struct ast_bridge_hook * | bridge_hook_generic (size_t size, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags) |
static int | bridge_impart_internal (struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags, struct bridge_channel_impart_cond *cond) |
static struct bridge_manager_controller * | bridge_manager_create (void) |
static void | bridge_manager_destroy (void *obj) |
static void | bridge_manager_service (struct ast_bridge *bridge) |
static void | bridge_manager_service_req (struct ast_bridge *bridge) |
static void * | bridge_manager_thread (void *data) |
static struct merge_direction | bridge_merge_determine_direction (struct ast_bridge *bridge1, struct ast_bridge *bridge2) |
void | bridge_merge_inhibit_nolock (struct ast_bridge *bridge, int request) |
static int | bridge_merge_locked (struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge, int merge_best_direction, struct ast_channel **kick_me, unsigned int num_kick) |
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) |
static int | bridge_other_hook (struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags, enum ast_bridge_hook_type type) |
static void | bridge_prnt_obj (void *v_obj, void *where, ao2_prnt_fn *prnt) |
static void | bridge_queue_action_nodup (struct ast_bridge *bridge, struct ast_frame *action) |
void | bridge_reconfigured (struct ast_bridge *bridge, unsigned int colp_update) |
static void | bridge_reconfigured_connected_line_update (struct ast_bridge *bridge) |
struct ast_bridge * | bridge_register (struct ast_bridge *bridge) |
Register the new bridge with the system. More... | |
static int | bridge_show_specific_print_channel (void *obj, void *arg, int flags) |
Internal callback function for sending channels in a bridge to the CLI. More... | |
static int | bridge_sort_cmp (const void *obj_left, const void *obj_right, int flags) |
static enum ast_transfer_result | bridge_swap_attended_transfer (struct ast_bridge *dest_bridge, struct ast_bridge_channel *source_bridge_channel, struct ast_channel *swap_channel) |
static void | bridge_tech_deferred_destroy (struct ast_bridge *bridge, struct ast_frame *action) |
static enum bridge_allow_merge | bridges_allow_merge_optimization (struct ast_bridge *chan_bridge, struct ast_bridge *peer_bridge, int num_kick_channels, struct merge_direction *merge) |
static enum bridge_allow_swap | bridges_allow_swap_optimization (struct ast_bridge *chan_bridge, struct ast_bridge *peer_bridge) |
static int | channel_cmp (void *obj, void *arg, int flags) |
static int | channel_hash (const void *obj, int flags) |
static void | check_bridge_play_sound (struct ast_bridge_channel *bridge_channel) |
static void | check_bridge_play_sounds (struct ast_bridge *bridge) |
static void | cleanup_video_mode (struct ast_bridge *bridge) |
static char * | complete_bridge_live (const char *word) |
static int | complete_bridge_live_search (void *obj, void *arg, int flags) |
static char * | complete_bridge_participant (const char *bridge_name, const char *word) |
static char * | complete_bridge_technology (const char *word) |
static void | destroy_bridge (void *obj) |
static void | fill_bridgepeer_buf (char *buf, unsigned int cur_idx, const char *names[], unsigned int num_names) |
static struct ast_bridge_technology * | find_best_technology (uint32_t capabilities, struct ast_bridge *bridge) |
Helper function used to find the "best" bridge technology given specified capabilities. More... | |
static struct ast_channel * | get_transferee (struct ao2_container *channels, struct ast_channel *transferer) |
static char * | handle_bridge_kick_channel (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_bridge_show_all (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_bridge_show_specific (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_bridge_technology_show (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_bridge_technology_suspend (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | handle_manager_bridge_tech_suspend (struct mansession *s, const struct message *m, int suspend) |
static int | hook_remove_match (void *obj, void *arg, int flags) |
static void | hooks_remove_container (struct ao2_container *hooks, enum ast_bridge_hook_remove_flags remove_flags) |
static void | hooks_remove_heap (struct ast_heap *hooks, enum ast_bridge_hook_remove_flags remove_flags) |
static int | interval_hook_time_cmp (void *a, void *b) |
static int | interval_wrapper_cb (struct ast_bridge_channel *bridge_channel, void *obj) |
Wrapper for interval hooks that calls into the wrapped hook. More... | |
static void | interval_wrapper_pvt_dtor (void *obj) |
Destructor for the hook wrapper. More... | |
static void | kick_it (struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size) |
static int | manager_bridge_tech_list (struct mansession *s, const struct message *m) |
static int | manager_bridge_tech_suspend (struct mansession *s, const struct message *m) |
static int | manager_bridge_tech_unsuspend (struct mansession *s, const struct message *m) |
static int | merge_container_cb (void *obj, void *data, int flags) |
Callback for merging hook ao2_containers. More... | |
static struct ast_bridge * | optimize_lock_chan_stack (struct ast_channel *chan) |
static struct ast_bridge * | optimize_lock_peer_stack (struct ast_channel *peer) |
static void | set_bridge_peer_vars (struct ast_bridge *bridge) |
static void | set_bridge_peer_vars_2party (struct ast_channel *c0, struct ast_channel *c1) |
static void | set_bridge_peer_vars_holding (struct ast_bridge *bridge) |
static void | set_bridge_peer_vars_multiparty (struct ast_bridge *bridge) |
static void | set_transfer_variables_all (struct ast_channel *transferer, struct ao2_container *channels, int is_attended) |
static int | smart_bridge_operation (struct ast_bridge *bridge) |
static const char * | tech_capability2str (uint32_t capabilities) |
static int | try_merge_optimize_out (struct ast_bridge *chan_bridge, struct ast_bridge_channel *chan_bridge_channel, struct ast_bridge *peer_bridge, struct ast_bridge_channel *peer_bridge_channel, struct ast_unreal_pvt *pvt) |
static enum ast_transfer_result | try_parking (struct ast_channel *transferer, const char *context, const char *exten, transfer_channel_cb new_channel_cb, struct transfer_channel_data *user_data_wrapper) |
static int | try_swap_optimize_out (struct ast_bridge *chan_bridge, struct ast_bridge_channel *chan_bridge_channel, struct ast_bridge *peer_bridge, struct ast_bridge_channel *peer_bridge_channel, struct ast_unreal_pvt *pvt) |
static enum ast_transfer_result | two_bridge_attended_transfer (struct ast_channel *to_transferee, struct ast_bridge_channel *to_transferee_bridge_channel, struct ast_channel *to_transfer_target, struct ast_bridge_channel *to_target_bridge_channel, struct ast_bridge *to_transferee_bridge, struct ast_bridge *to_target_bridge, struct ast_attended_transfer_message *transfer_msg) |
static void | wrap_hook (struct ast_bridge_features *features, struct ast_bridge_hook_timer *hook) |
Wrap the provided interval hook and add it to features. More... | |
Variables | |
struct ast_bridge_methods | ast_bridge_base_v_table |
Bridge base class virtual method table. More... | |
static const struct ast_datastore_info | bridge_channel_impart_ds_info |
static struct ast_cli_entry | bridge_cli [] |
static struct bridge_manager_controller * | bridge_manager |
static struct bridge_technologies | bridge_technologies = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static struct ao2_container * | bridges |
static char | builtin_features_dtmf [AST_BRIDGE_BUILTIN_END][MAXIMUM_DTMF_FEATURE_STRING] |
static ast_bridge_hook_callback | builtin_features_handlers [AST_BRIDGE_BUILTIN_END] |
static ast_bridge_builtin_set_limits_fn | builtin_interval_handlers [AST_BRIDGE_BUILTIN_INTERVAL_END] |
static unsigned int | optimization_id |
Bridging API.
Definition in file bridge.c.
#define BRIDGE_LOCK_ONE_OR_BOTH | ( | b1, | |
b2 | |||
) |
#define FORMAT_HDR "%-36s %5s %-15s %-15s %s\n" |
#define FORMAT_HDR "%-20s %-20s %8s %s\n" |
#define FORMAT_ROW "%-36s %5u %-15s %-15s %s\n" |
#define FORMAT_ROW "%-20s %-20s %8u %s\n" |
#define MAX_BRIDGEPEER_CHANS (10 + 1) |
#define UPDATE_BRIDGE_VARS_GET | ( | chan, | |
name, | |||
pvtid | |||
) |
enum bridge_allow_merge |
Definition at line 2811 of file bridge.c.
enum bridge_allow_swap |
Definition at line 2672 of file bridge.c.
int __ast_bridge_technology_register | ( | struct ast_bridge_technology * | technology, |
struct ast_module * | mod | ||
) |
Register a bridge technology for use.
technology | The bridge technology to register |
mod | The module that is registering the bridge technology |
0 | on success |
-1 | on failure |
Example usage:
This registers a bridge technology declared as the structure simple_bridge_tech with the bridging core and makes it available for use when creating bridges.
Definition at line 212 of file bridge.c.
References ast_log, AST_RWLIST_INSERT_BEFORE_CURRENT, AST_RWLIST_INSERT_TAIL, AST_RWLIST_TRAVERSE, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_strlen_zero(), ast_verb, ast_bridge_technology::capabilities, current, LOG_WARNING, ast_bridge_technology::mod, ast_bridge_technology::name, ast_bridge_technology::preference, and ast_bridge_technology::write.
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 2471 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(), ast_bridge_channel::bridge, bridge_dissolve_check_stolen(), bridge_find_channel(), bridge_move_locked(), ast_bridge_channel::chan, ast_bridge_channel::features, LOG_WARNING, NULL, and RAII_VAR.
Referenced by action_bridge(), bridge_exec(), and manager_park_unbridged().
struct ast_bridge * ast_bridge_base_new | ( | uint32_t | capabilities, |
unsigned int | flags, | ||
const char * | creator, | ||
const char * | name, | ||
const char * | id | ||
) |
Create a new base class bridge.
capabilities | The capabilities that we require to be used on the bridge |
flags | Flags that will alter the behavior of the bridge |
creator | Entity that created the bridge (optional) |
name | Name given to the bridge by its creator (optional, requires named creator) |
id | Unique ID given to the bridge by its creator (optional) |
NULL | on failure |
Example usage:
This creates a no frills two party bridge that will be destroyed once one of the channels hangs up.
Definition at line 934 of file bridge.c.
References ast_bridge_base_v_table, bridge_alloc(), bridge_base_init(), bridge_register(), ast_bridge::creator, and name.
Referenced by AST_TEST_DEFINE(), get_wait_bridge_wrapper(), and join_conference_bridge().
int ast_bridge_depart | ( | struct ast_channel * | chan | ) |
Depart a channel from a bridge.
chan | Channel to depart |
0 | on success |
-1 | on failure |
Example usage:
This removes the channel pointed to by the chan pointer from any bridge it may be in and gives control to the calling thread. This does not hang up the channel.
Definition at line 1906 of file bridge.c.
References ao2_ref, ast_assert, ast_bridge_channel_leave_bridge(), AST_CAUSE_NORMAL_CLEARING, ast_channel_internal_bridge_channel(), ast_channel_internal_bridge_channel_set(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_debug, ast_log, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, ast_bridge_channel::chan, ast_bridge_channel::depart_wait, LOG_ERROR, NULL, SCOPE_TRACE, and ast_bridge_channel::thread.
Referenced by app_control_continue(), AST_TEST_DEFINE(), control_swap_channel_in_bridge(), depart_channel(), and stasis_app_exec().
int ast_bridge_destroy | ( | struct ast_bridge * | bridge, |
int | cause | ||
) |
Destroy a bridge.
bridge | Bridge to destroy |
cause | Cause of bridge being destroyed. (If cause <= 0 then use AST_CAUSE_NORMAL_CLEARING) |
0 | on success |
-1 | on failure |
Example usage:
This destroys a bridge that was previously created.
Definition at line 944 of file bridge.c.
References ao2_ref, ast_bridge_lock, ast_bridge_unlock, ast_debug, bridge_dissolve(), ast_bridge::cause, and ast_bridge::uniqueid.
Referenced by action_bridge(), agent_connect_caller(), agent_logout(), agent_pvt_destructor(), agent_request_exec(), agent_run(), ast_bridge_call_with_flags(), attended_transfer_properties_shutdown(), bridge_create_common(), bridge_exec(), bridge_register(), caller_abort_agent(), destroy_conference_bridge(), fail_enter(), manager_bridge_destroy(), parked_call_app_exec(), parking_lot_destructor(), safe_bridge_destroy(), stasis_app_bridge_destroy(), stasis_app_control_shutdown(), unload_module(), wait_bridge_wrapper_alloc(), and wait_bridge_wrapper_destructor().
int ast_bridge_dtmf_hook | ( | struct ast_bridge_features * | features, |
const char * | dtmf, | ||
ast_bridge_hook_callback | callback, | ||
void * | hook_pvt, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Attach a DTMF hook to a bridge features structure.
features | Bridge features structure |
dtmf | DTMF string to be activated upon |
callback | Function to execute upon activation |
hook_pvt | Unique data |
destructor | Optional destructor callback for hook_pvt data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure (The caller must cleanup any hook_pvt resources.) |
Example usage:
This makes the bridging core call pound_callback if a channel that has this feature structure inputs the DTMF string '#'. A pointer to useful data may be provided to the hook_pvt parameter.
Definition at line 3182 of file bridge.c.
References ao2_link, ao2_ref, AST_BRIDGE_HOOK_TYPE_DTMF, ast_copy_string(), bridge_hook_generic(), ast_bridge_hook_dtmf_parms::code, ast_bridge_hook::destructor, ast_bridge_hook_dtmf::dtmf, ast_bridge_features::dtmf_hooks, ast_bridge_hook_dtmf::generic, NULL, and ast_bridge_hook::type.
Referenced by apply_menu_to_user(), ast_bridge_features_enable(), AST_TEST_DEFINE(), bridge_agent_hold_push(), bridge_personality_atxfer_push(), and dynamic_dtmf_hook_add().
void ast_bridge_features_cleanup | ( | struct ast_bridge_features * | features | ) |
Clean up the contents of a bridge features structure.
features | Bridge features structure |
Example usage:
This cleans up the feature structure 'features'.
Definition at line 3653 of file bridge.c.
References ao2_cleanup, ao2_ref, ast_heap_destroy(), ast_heap_pop(), ast_bridge_features::dtmf_hooks, ast_bridge_features::interval_hooks, NULL, and ast_bridge_features::other_hooks.
Referenced by agent_request_exec(), agent_run(), ast_bridge_call_with_flags(), ast_bridge_features_destroy(), AST_TEST_DEFINE(), bridge_exec(), bridgeadd_exec(), bridgewait_exec(), channel_feature_hooks_set_full(), confbridge_exec(), park_and_announce_app_exec(), park_app_exec(), and parked_call_app_exec().
void ast_bridge_features_destroy | ( | struct ast_bridge_features * | features | ) |
Destroy an allocated bridge features struct.
features | Bridge features structure |
Example usage:
Definition at line 3674 of file bridge.c.
References ast_bridge_features_cleanup(), and ast_free.
Referenced by ast_bridge_add_channel(), ast_bridge_call_with_flags(), ast_bridge_features_new(), ast_local_setup_bridge(), bridge_channel_depart_thread(), bridge_channel_ind_thread(), bridge_exec(), bridge_impart_internal(), conf_start_record(), control_dtor(), features_destroy(), and local_pvt_destructor().
int ast_bridge_features_do | ( | enum ast_bridge_builtin_feature | feature, |
struct ast_bridge_channel * | bridge_channel, | ||
void * | hook_pvt | ||
) |
Invoke a built in feature hook now.
feature | The feature to invoke |
bridge_channel | Channel executing the feature |
hook_pvt | Private data passed in when the hook was created |
0 | on success |
-1 | on failure |
Example usage:
Definition at line 3090 of file bridge.c.
References ARRAY_LEN, and builtin_features_handlers.
Referenced by agent_connect_caller().
int ast_bridge_features_enable | ( | struct ast_bridge_features * | features, |
enum ast_bridge_builtin_feature | feature, | ||
const char * | dtmf, | ||
void * | config, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Enable a built in feature on a bridge features structure.
features | Bridge features structure |
feature | Feature to enable |
dtmf | Optionally the DTMF stream to trigger the feature, if not specified it will be the default |
config | Configuration structure unique to the built in type |
destructor | Optional destructor callback for config data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure |
Example usage:
This enables the attended transfer DTMF option using the default DTMF string. An alternate string may be provided using the dtmf parameter. Internally this is simply setting up a hook to a built in feature callback function.
Definition at line 3365 of file bridge.c.
References ARRAY_LEN, ast_bridge_dtmf_hook(), ast_debug, ast_strlen_zero(), builtin_features_dtmf, builtin_features_handlers, and config.
Referenced by builtin_features_helper().
int ast_bridge_features_init | ( | struct ast_bridge_features * | features | ) |
Initialize bridge features structure.
features | Bridge featues structure |
0 | on success |
-1 | on failure |
Example usage:
This initializes the feature structure 'features' to have nothing enabled.
Definition at line 3620 of file bridge.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_list, AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE, ast_heap_create, bridge_dtmf_hook_sort(), ast_bridge_features::dtmf_hooks, ast_bridge_features::dtmf_passthrough, interval_hook_time_cmp(), ast_bridge_features::interval_hooks, NULL, ast_bridge_features::other_hooks, ast_bridge_features::text_messaging, and timer.
Referenced by agent_request_exec(), agent_run(), ast_bridge_call_with_flags(), ast_bridge_features_new(), AST_TEST_DEFINE(), bridge_exec(), bridgeadd_exec(), bridgewait_exec(), channel_feature_hooks_set_full(), confbridge_exec(), park_and_announce_app_exec(), park_app_exec(), and parked_call_app_exec().
int ast_bridge_features_limits_construct | ( | struct ast_bridge_features_limits * | limits | ) |
Constructor function for ast_bridge_features_limits.
limits | pointer to a ast_bridge_features_limits struct that has been allocated, but not initialized |
0 | on success |
-1 | on failure |
Definition at line 3396 of file bridge.c.
References ast_string_field_init.
Referenced by bridge_builtin_set_limits(), and pre_bridge_setup().
void ast_bridge_features_limits_destroy | ( | struct ast_bridge_features_limits * | limits | ) |
Destructor function for ast_bridge_features_limits.
limits | pointer to an ast_bridge_features_limits struct that needs to be destroyed |
This function does not free memory allocated to the ast_bridge_features_limits struct, it only frees elements within the struct. You must still call ast_free on the struct if you allocated it with malloc.
Definition at line 3407 of file bridge.c.
References ast_string_field_free_memory.
Referenced by bridge_features_limits_dtor(), and pre_bridge_setup().
void ast_bridge_features_merge | ( | struct ast_bridge_features * | into, |
const struct ast_bridge_features * | from | ||
) |
Merge one ast_bridge_features into another.
into | The ast_bridge_features that will be merged into |
from | The ast_bridge_features that will be merged from |
Definition at line 3595 of file bridge.c.
References ao2_callback, ast_heap_peek(), ast_heap_unlock, ast_heap_wrlock, ast_bridge_features::dtmf_hooks, ast_bridge_features::dtmf_passthrough, ast_bridge_features::feature_flags, ast_flags::flags, ast_bridge_features::interval_hooks, merge_container_cb(), ast_bridge_features::mute, ast_bridge_features::other_hooks, ast_bridge_features::usable, and wrap_hook().
Referenced by bridge_channel_internal_join(), and channel_feature_hooks_set_full().
struct ast_bridge_features * ast_bridge_features_new | ( | void | ) |
Allocate a new bridge features struct.
Example usage:
NULL | on error. |
Definition at line 3683 of file bridge.c.
References ast_bridge_features_destroy(), ast_bridge_features_init(), ast_malloc, and NULL.
Referenced by ast_bridge_call_with_flags(), ast_unreal_channel_push_to_bridge(), bridge_exec(), bridge_impart_internal(), channel_feature_hooks_set_full(), conf_announce_channel_push(), conf_start_record(), and stasis_app_control_bridge_features_init().
int ast_bridge_features_register | ( | enum ast_bridge_builtin_feature | feature, |
ast_bridge_hook_callback | callback, | ||
const char * | dtmf | ||
) |
Register a handler for a built in feature.
feature | The feature that the handler will be responsible for |
callback | The callback function that will handle it |
dtmf | Default DTMF string used to activate the feature |
0 | on success |
-1 | on failure |
Example usage:
This registers the function bridge_builtin_attended_transfer as the function responsible for the built in attended transfer feature.
Definition at line 3062 of file bridge.c.
References ARRAY_LEN, ast_copy_string(), ast_strlen_zero(), builtin_features_dtmf, and builtin_features_handlers.
Referenced by ast_bridging_init_basic(), load_module(), and load_parking_bridge_features().
void ast_bridge_features_remove | ( | struct ast_bridge_features * | features, |
enum ast_bridge_hook_remove_flags | flags | ||
) |
Remove marked bridge channel feature hooks.
features | Bridge features structure |
flags | Determinator for whether hook is removed. |
Definition at line 3501 of file bridge.c.
References ast_bridge_features::dtmf_hooks, hooks_remove_container(), hooks_remove_heap(), ast_bridge_features::interval_hooks, ast_bridge_features::other_hooks, and ast_bridge_hook::remove_flags.
Referenced by bridge_base_pull(), bridge_channel_internal_join(), bridge_do_merge(), bridge_do_move(), and remove_hooks_on_personality_change().
void ast_bridge_features_set_flag | ( | struct ast_bridge_features * | features, |
unsigned int | flag | ||
) |
Set a flag on a bridge channel features structure.
features | Bridge channel features structure |
flag | Flag to enable |
Example usage:
This sets the AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP feature to be enabled on the features structure 'features'.
Definition at line 3427 of file bridge.c.
References ast_set_flag, ast_bridge_features::feature_flags, and ast_bridge_features::usable.
int ast_bridge_features_set_limits | ( | struct ast_bridge_features * | features, |
struct ast_bridge_features_limits * | limits, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Limit the amount of time a channel may stay in the bridge and optionally play warning messages as time runs out.
features | Bridge features structure |
limits | Configured limits applicable to the channel |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure |
Example usage:
This sets the maximum time the channel can be in the bridge to 10 seconds and does not play any warnings.
Definition at line 3412 of file bridge.c.
References AST_BRIDGE_BUILTIN_INTERVAL_LIMITS, ast_log, builtin_interval_handlers, and LOG_ERROR.
Referenced by pre_bridge_setup().
int ast_bridge_features_unregister | ( | enum ast_bridge_builtin_feature | feature | ) |
Unregister a handler for a built in feature.
feature | The feature to unregister |
0 | on success |
-1 | on failure |
Example usage:
This unregisters the function that is handling the built in attended transfer feature.
Definition at line 3078 of file bridge.c.
References ARRAY_LEN, builtin_features_handlers, and NULL.
Referenced by unload_module(), and unload_parking_bridge_features().
struct ast_bridge * ast_bridge_find_by_id | ( | const char * | bridge_id | ) |
Find bridge by id.
bridge_id | Bridge identifier |
Definition at line 5012 of file bridge.c.
References ao2_find, bridges, and OBJ_SEARCH_KEY.
Referenced by ast_bridge_get_snapshot_by_uniqueid(), complete_bridge_participant(), handle_bridge_kick_channel(), manager_bridge_destroy(), and manager_bridge_kick().
int ast_bridge_hangup_hook | ( | struct ast_bridge_features * | features, |
ast_bridge_hook_callback | callback, | ||
void * | hook_pvt, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Attach a hangup hook to a bridge features structure.
features | Bridge features structure |
callback | Function to execute upon activation |
hook_pvt | Unique data |
destructor | Optional destructor callback for hook_pvt data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure (The caller must cleanup any hook_pvt resources.) |
Example usage:
This makes the bridging core call hangup_callback if a channel that has this hook hangs up. A pointer to useful data may be provided to the hook_pvt parameter.
Definition at line 3265 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_HANGUP, bridge_other_hook(), ast_bridge_hook::callback, ast_bridge_hook::destructor, ast_bridge_hook::hook_pvt, and ast_bridge_hook::remove_flags.
Referenced by add_normal_hooks(), and bridge_personality_atxfer_push().
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)
bridge | Bridge to impart on |
chan | Channel to impart (The channel reference is stolen if impart successful.) |
swap | Channel to swap out if swapping. NULL if not swapping. |
features | Bridge features structure. |
flags | defined by enum ast_bridge_impart_flags. |
0 | on success |
-1 | on failure (Caller still has ownership of chan) |
Example usage:
This adds a channel pointed to by the chan pointer to the bridge pointed to by the bridge pointer. This function will return immediately and will not wait until the channel is no longer part of the bridge.
If this channel will be replacing another channel the other channel can be specified in the swap parameter. The other channel will be thrown out of the bridge in an atomic fashion.
If channel specific features are enabled, a pointer to the features structure can be specified in the features parameter.
Definition at line 1878 of file bridge.c.
References AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED, ast_bridge_discard_after_callback(), ast_channel_name(), ast_cond_destroy, ast_cond_init, ast_mutex_destroy, ast_mutex_init, bridge_channel_impart_signal(), bridge_impart_internal(), cond, NULL, SCOPE_TRACE, and ast_bridge::uniqueid.
Referenced by add_to_dial_bridge(), ast_bridge_add_channel(), ast_bridge_call_with_flags(), AST_TEST_DEFINE(), ast_unreal_channel_push_to_bridge(), attended_transfer_bridge(), blind_transfer_bridge(), conf_announce_channel_push(), conf_start_record(), control_swap_channel_in_bridge(), feature_attended_transfer(), local_call(), parking_blind_transfer_park(), recalling_exit(), refer_incoming_invite_request(), and retransfer_enter().
int ast_bridge_interval_hook | ( | struct ast_bridge_features * | features, |
enum ast_bridge_hook_timer_option | flags, | ||
unsigned int | interval, | ||
ast_bridge_hook_callback | callback, | ||
void * | hook_pvt, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Attach an interval hook to a bridge features structure.
features | Bridge features structure |
flags | Interval timer callback option flags. |
interval | The interval that the hook should execute at in milliseconds |
callback | Function to execute upon activation |
hook_pvt | Unique data |
destructor | Optional destructor callback for hook_pvt data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure (The caller must cleanup any hook_pvt resources.) |
This makes the bridging core call playback_callback every second. A pointer to useful data may be provided to the hook_pvt parameter.
Definition at line 3319 of file bridge.c.
References ao2_ref, ast_atomic_fetchadd_int(), AST_BRIDGE_HOOK_TYPE_TIMER, ast_debug, ast_heap_push, ast_heap_unlock, ast_heap_wrlock, ast_samp2tv(), ast_tvadd(), ast_tvnow(), bridge_hook_generic(), ast_bridge_hook::destructor, ast_bridge_hook_timer_parms::flags, ast_bridge_hook_timer::generic, ast_bridge_hook_timer_parms::interval, ast_bridge_features::interval_hooks, ast_bridge_features::interval_sequence, NULL, ast_bridge_hook_timer_parms::seqno, ast_bridge_hook_timer::timer, ast_bridge_hook_timer_parms::trip_time, and ast_bridge_hook::type.
Referenced by agent_request_exec(), apply_option_timeout(), AST_TEST_DEFINE(), bridge_agent_hold_push(), bridge_builtin_set_limits(), confbridge_exec(), parking_set_duration(), set_interval_hook(), and wrap_hook().
int ast_bridge_interval_register | ( | enum ast_bridge_builtin_interval | interval, |
ast_bridge_builtin_set_limits_fn | callback | ||
) |
Register a handler for a built in interval feature.
interval | The interval feature that the handler will be responsible for |
callback | the Callback function that will handle it |
0 | on success |
-1 | on failure |
Example usage:
This registers the function bridge_builtin_set_limits as the function responsible for the built in duration limit feature.
Definition at line 3107 of file bridge.c.
References ARRAY_LEN, and builtin_interval_handlers.
Referenced by load_module().
int ast_bridge_interval_unregister | ( | enum ast_bridge_builtin_interval | interval | ) |
Unregisters a handler for a built in interval feature.
interval | the interval feature to unregister |
0 | on success |
-1 | on failure |
Example usage:
This unregisters the function that is handling the built in duration limit feature.
Definition at line 3119 of file bridge.c.
References ARRAY_LEN, builtin_interval_handlers, and NULL.
Referenced by unload_module().
int ast_bridge_is_video_src | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Determine if a channel is a video src for the bridge.
0 | Not a current video source of the bridge. |
non-zero | is a video source of the bridge, The number returned represents the priority this video stream has on the bridge where 1 is the highest priority. |
Definition at line 3891 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_NONE, AST_BRIDGE_VIDEO_MODE_SFU, AST_BRIDGE_VIDEO_MODE_SINGLE_SRC, AST_BRIDGE_VIDEO_MODE_TALKER_SRC, ast_bridge_video_talker_src_data::chan_old_vsrc, ast_bridge_video_single_src_data::chan_vsrc, ast_bridge_video_talker_src_data::chan_vsrc, ast_bridge_video_mode::mode, ast_bridge_video_mode::mode_data, ast_bridge_video_mode::single_src_data, ast_bridge::softmix, ast_bridge_video_mode::talker_src_data, and ast_bridge_softmix::video_mode.
Referenced by handle_video_on_exit(), handle_video_on_join(), softmix_bridge_write_video(), and softmix_pass_video_top_priority().
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)
bridge | Bridge to join |
chan | Channel to join |
swap | Channel to swap out if swapping (A channel reference is stolen.) |
features | Bridge features structure |
tech_args | Optional Bridging tech optimization parameters for this channel. |
flags | defined by enum ast_bridge_join_flags. |
0 | if the channel successfully joined the bridge before it exited. |
-1 | if the channel failed to join the bridge |
Example usage:
This adds a channel pointed to by the chan pointer to the bridge pointed to by the bridge pointer. This function will not return until the channel has been removed from the bridge, swapped out for another channel, or has hung up.
If this channel will be replacing another channel the other channel can be specified in the swap parameter. The other channel will be thrown out of the bridge in an atomic fashion.
If channel specific features are enabled a pointer to the features structure can be specified in the features parameter.
Definition at line 1621 of file bridge.c.
References ao2_lock, ao2_ref, ao2_t_cleanup, ao2_unlock, ast_assert, AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP, AST_BRIDGE_JOIN_PASS_REFERENCE, ast_bridge_lock, ast_bridge_run_after_callback(), ast_bridge_setup_after_goto(), ast_bridge_unlock, ast_channel_flags(), ast_channel_internal_bridge_channel_set(), ast_channel_lock, ast_channel_name(), ast_channel_softhangup_internal_flag(), ast_channel_unlock, AST_FLAG_ZOMBIE, AST_SOFTHANGUP_ASYNCGOTO, ast_softhangup_nolock(), ast_test_flag, ast_bridge_channel::bridge, bridge_channel_impart_signal(), bridge_channel_internal_alloc(), bridge_channel_internal_join(), bridge_find_channel(), ast_bridge_channel::chan, ast_bridge_channel::features, ast_bridge_channel::inhibit_colp, NULL, ast_bridge_methods::push_peek, SCOPE_TRACE, ast_bridge_channel::swap, ast_bridge_channel::tech_args, ast_bridge_channel::thread, ast_bridge::uniqueid, and ast_bridge::v_table.
Referenced by agent_request_exec(), agent_run(), ast_bridge_call_with_flags(), bridge_exec(), bridgeadd_exec(), bridgewait_exec(), confbridge_exec(), park_and_announce_app_exec(), park_app_exec(), and parked_call_app_exec().
int ast_bridge_join_hook | ( | struct ast_bridge_features * | features, |
ast_bridge_hook_callback | callback, | ||
void * | hook_pvt, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Attach a bridge channel join hook to a bridge features structure.
features | Bridge features structure |
callback | Function to execute upon activation |
hook_pvt | Unique data |
destructor | Optional destructor callback for hook_pvt data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure (The caller must cleanup any hook_pvt resources.) |
Example usage:
This makes the bridging core call join_callback when a channel successfully joins the bridging system. A pointer to useful data may be provided to the hook_pvt parameter.
Definition at line 3275 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_JOIN, bridge_other_hook(), ast_bridge_hook::callback, ast_bridge_hook::destructor, ast_bridge_hook::hook_pvt, and ast_bridge_hook::remove_flags.
Referenced by agent_request_exec(), and confbridge_exec().
int ast_bridge_kick | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Kick a channel from a bridge.
bridge | Bridge that the channel is to be kicked from |
chan | Channel to kick |
0 | on success |
-1 | on failure |
Example usage:
This kicks the channel pointed to by the chan pointer from the bridge pointed to by the bridge pointer and requests that it be hung up. Control over the channel will NOT be given to the calling thread.
Definition at line 1979 of file bridge.c.
References ast_bridge_channel_queue_callback(), ast_bridge_lock, ast_bridge_unlock, ast_bridge_channel::bridge, bridge_find_channel(), ast_bridge_channel::chan, kick_it(), and NULL.
Referenced by handle_bridge_kick_channel(), and manager_bridge_kick().
int ast_bridge_leave_hook | ( | struct ast_bridge_features * | features, |
ast_bridge_hook_callback | callback, | ||
void * | hook_pvt, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Attach a bridge channel leave hook to a bridge features structure.
features | Bridge features structure |
callback | Function to execute upon activation |
hook_pvt | Unique data |
destructor | Optional destructor callback for hook_pvt data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure (The caller must cleanup any hook_pvt resources.) |
Example usage:
This makes the bridging core call leave_callback when a channel successfully leaves the bridging system. A pointer to useful data may be provided to the hook_pvt parameter.
Definition at line 3285 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_LEAVE, bridge_other_hook(), ast_bridge_hook::callback, ast_bridge_hook::destructor, ast_bridge_hook::hook_pvt, and ast_bridge_hook::remove_flags.
Referenced by confbridge_exec().
int ast_bridge_merge | ( | struct ast_bridge * | dst_bridge, |
struct ast_bridge * | src_bridge, | ||
int | merge_best_direction, | ||
struct ast_channel ** | kick_me, | ||
unsigned int | num_kick | ||
) |
Merge two bridges together.
dst_bridge | Destination bridge of merge. |
src_bridge | Source bridge of merge. |
merge_best_direction | TRUE if don't care about which bridge merges into the other. |
kick_me | Array of channels to kick from the bridges. |
num_kick | Number of channels in the kick_me array. |
0 | on success |
-1 | on failure |
Example usage:
This moves the channels in src_bridge into the bridge pointed to by dst_bridge.
Definition at line 2300 of file bridge.c.
References ast_assert, ast_bridge_lock_both, ast_bridge_unlock, and bridge_merge_locked().
void ast_bridge_merge_inhibit | ( | struct ast_bridge * | bridge, |
int | request | ||
) |
Adjust the bridge merge inhibit request count.
bridge | What to operate on. |
request | Inhibit request increment. (Positive to add requests. Negative to remove requests.) |
Definition at line 3000 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, bridge_merge_inhibit_nolock(), and request().
Referenced by attended_transfer_properties_shutdown(), consulting_exit(), and feature_attended_transfer().
int ast_bridge_move | ( | struct ast_bridge * | dst_bridge, |
struct ast_bridge * | src_bridge, | ||
struct ast_channel * | chan, | ||
struct ast_channel * | swap, | ||
int | attempt_recovery | ||
) |
Move a channel from one bridge to another.
dst_bridge | Destination bridge of bridge channel move. |
src_bridge | Source bridge of bridge channel move. |
chan | Channel to move. |
swap | Channel to replace in dst_bridge. |
attempt_recovery | TRUE if failure attempts to push channel back into original bridge. |
0 | on success. |
-1 | on failure. |
Definition at line 2460 of file bridge.c.
References ast_bridge_lock_both, ast_bridge_unlock, bridge_move_locked(), ast_bridge_channel::chan, and ast_bridge_channel::swap.
Referenced by agent_connect_caller(), parked_call_app_exec(), and parking_park_bridge_channel().
int ast_bridge_move_hook | ( | struct ast_bridge_features * | features, |
ast_bridge_move_indicate_callback | callback, | ||
void * | hook_pvt, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Attach a bridge channel move detection hook to a bridge features structure.
features | Bridge features structure |
callback | Function to execute upon activation |
hook_pvt | Unique data |
destructor | Optional destructor callback for hook_pvt data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure (The caller must cleanup any hook_pvt resources.) |
Example usage:
This makes the bridging core call callback
when a channel is moved from one bridge to another. A pointer to useful data may be provided to the hook_pvt parameter.
Definition at line 3307 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_MOVE, bridge_other_hook(), ast_bridge_hook::callback, ast_bridge_hook::destructor, hook_cb(), ast_bridge_hook::hook_pvt, and ast_bridge_hook::remove_flags.
Referenced by bridge_stasis_pull().
void ast_bridge_notify_masquerade | ( | struct ast_channel * | chan | ) |
Notify bridging that this channel was just masqueraded.
chan | Channel just involved in a masquerade |
Definition at line 1442 of file bridge.c.
References ao2_ref, ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_channel_get_bridge_channel(), ast_channel_lock, ast_channel_unlock, ast_bridge_channel::bridge, bridge_find_channel(), bridge_reconfigured(), ast_bridge_methods::notify_masquerade, and ast_bridge::v_table.
Referenced by channel_do_masquerade().
int ast_bridge_number_video_src | ( | struct ast_bridge * | bridge | ) |
Returns the number of video sources currently active in the bridge.
Definition at line 3864 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_NONE, AST_BRIDGE_VIDEO_MODE_SFU, AST_BRIDGE_VIDEO_MODE_SINGLE_SRC, AST_BRIDGE_VIDEO_MODE_TALKER_SRC, ast_bridge_video_talker_src_data::chan_old_vsrc, ast_bridge_video_single_src_data::chan_vsrc, ast_bridge_video_talker_src_data::chan_vsrc, ast_bridge_video_mode::mode, ast_bridge_video_mode::mode_data, ast_bridge_video_mode::single_src_data, ast_bridge::softmix, ast_bridge_video_mode::talker_src_data, and ast_bridge_softmix::video_mode.
Referenced by softmix_bridge_write_video().
struct ast_channel * ast_bridge_peer | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Get the channel's bridge peer only if the bridge is two-party.
bridge | The bridge |
chan | Channel desiring the bridge peer channel. |
NULL | Channel not in a bridge or the bridge is not two-party. |
non-NULL | Reffed peer channel at time of calling. |
Definition at line 4075 of file bridge.c.
References ast_bridge_lock, ast_bridge_peer_nolock(), ast_bridge_unlock, and ast_channel::bridge.
Referenced by ast_attended_transfer_message_create(), ast_bridge_transfer_blind(), ast_channel_bridge_peer(), and get_transfer_parties_transferer_bridge().
struct ast_channel * ast_bridge_peer_nolock | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Get the channel's bridge peer only if the bridge is two-party.
bridge | The bridge which is already locked. |
chan | Channel desiring the bridge peer channel. |
NULL | Channel not in a bridge or the bridge is not two-party. |
non-NULL | Reffed peer channel at time of calling. |
Definition at line 4047 of file bridge.c.
References AST_BRIDGE_CAPABILITY_1TO1MIX, AST_BRIDGE_CAPABILITY_NATIVE, ast_channel_ref, AST_LIST_TRAVERSE, ast_bridge_channel::bridge, ast_bridge_technology::capabilities, ast_bridge_channel::chan, ast_bridge::channels, ast_bridge_channel::in_bridge, NULL, ast_bridge::num_channels, and ast_bridge::technology.
Referenced by ast_bridge_peer(), and feature_automixmonitor().
struct ao2_container * ast_bridge_peers | ( | struct ast_bridge * | bridge | ) |
Get a container of all channels in the bridge.
bridge | The bridge |
NULL | Failed to create container |
non-NULL | Container of channels in the bridge |
Definition at line 4036 of file bridge.c.
References ast_bridge_lock, ast_bridge_peers_nolock(), ast_bridge_unlock, and channels.
struct ao2_container * ast_bridge_peers_nolock | ( | struct ast_bridge * | bridge | ) |
Get a container of all channels in the bridge.
bridge | The bridge which is already locked. |
NULL | Failed to create container |
non-NULL | Container of channels in the bridge |
Definition at line 4018 of file bridge.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_container_alloc_hash, ao2_link, AST_LIST_TRAVERSE, ast_bridge_channel::bridge, ast_bridge_channel::chan, channel_cmp(), channel_hash(), channels, ast_bridge::channels, and NULL.
Referenced by ast_bridge_peers(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), and two_bridge_attended_transfer().
int ast_bridge_queue_action | ( | struct ast_bridge * | bridge, |
struct ast_frame * | action | ||
) |
Put an action onto the specified bridge.
bridge | What to queue the action on. |
action | What to do. |
0 | on success. |
-1 | on error. |
Definition at line 303 of file bridge.c.
References ast_frdup, and bridge_queue_action_nodup().
Referenced by bridge_dissolve().
int ast_bridge_remove | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Remove a channel from a bridge.
bridge | Bridge that the channel is to be removed from |
chan | Channel to remove |
0 | on success |
-1 | on failure |
Example usage:
This removes the channel pointed to by the chan pointer from the bridge pointed to by the bridge pointer and requests that it be hung up. Control over the channel will NOT be given to the calling thread.
Definition at line 1951 of file bridge.c.
References ast_bridge_channel_leave_bridge(), ast_bridge_lock, ast_bridge_unlock, AST_CAUSE_NORMAL_CLEARING, ast_channel_name(), ast_debug, ast_bridge_channel::bridge, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, bridge_find_channel(), ast_bridge_channel::chan, and ast_bridge::uniqueid.
Referenced by action_kick_last(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), execute_menu_entry(), kick_conference_participant(), and leave_marked().
void ast_bridge_remove_video_src | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
remove a channel as a source of video for the bridge.
Definition at line 3917 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_NONE, AST_BRIDGE_VIDEO_MODE_SFU, AST_BRIDGE_VIDEO_MODE_SINGLE_SRC, AST_BRIDGE_VIDEO_MODE_TALKER_SRC, ast_channel_unref, ast_bridge_video_talker_src_data::average_talking_energy, ast_bridge_video_talker_src_data::chan_old_vsrc, ast_bridge_video_single_src_data::chan_vsrc, ast_bridge_video_talker_src_data::chan_vsrc, ast_bridge_video_mode::mode, ast_bridge_video_mode::mode_data, NULL, ast_bridge_video_mode::single_src_data, ast_bridge::softmix, ast_bridge_video_mode::talker_src_data, and ast_bridge_softmix::video_mode.
Referenced by bridge_channel_internal_join(), and handle_video_on_exit().
void ast_bridge_set_binaural_active | ( | struct ast_bridge * | bridge, |
unsigned int | binaural_active | ||
) |
Activates the use of binaural signals in a conference bridge.
bridge | Channel to activate the binaural signals. |
binaural_active | If true binaural signal processing will be active for the bridge. |
Definition at line 3705 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_softmix::binaural_active, and ast_bridge::softmix.
Referenced by join_conference_bridge().
void ast_bridge_set_internal_sample_rate | ( | struct ast_bridge * | bridge, |
unsigned int | sample_rate | ||
) |
Adjust the internal mixing sample rate of a bridge used during multimix mode.
bridge | Channel to change the sample rate on. |
sample_rate | the sample rate to change to. If a value of 0 is passed here, the bridge will be free to pick what ever sample rate it chooses. |
Definition at line 3712 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_softmix::internal_sample_rate, and ast_bridge::softmix.
Referenced by join_conference_bridge().
void ast_bridge_set_maximum_sample_rate | ( | struct ast_bridge * | bridge, |
unsigned int | sample_rate | ||
) |
Adjust the maximum mixing sample rate of a bridge used during multimix mode.
bridge | Channel to change the sample rate on. |
sample_rate | the maximum sample rate to use. If a value of 0 is passed here, the bridge will be free to pick what ever sample rate it chooses. |
Definition at line 3719 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_softmix::maximum_sample_rate, and ast_bridge::softmix.
Referenced by join_conference_bridge().
void ast_bridge_set_mixing_interval | ( | struct ast_bridge * | bridge, |
unsigned int | mixing_interval | ||
) |
Adjust the internal mixing interval of a bridge used during multimix mode.
bridge | Channel to change the sample rate on. |
mixing_interval | the sample rate to change to. If 0 is set the bridge tech is free to choose any mixing interval it uses by default. |
Definition at line 3698 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_softmix::internal_mixing_interval, and ast_bridge::softmix.
Referenced by join_conference_bridge().
void ast_bridge_set_remb_estimated_bitrate | ( | struct ast_bridge * | bridge, |
float | estimated_bitrate | ||
) |
Force the REMB report estimated bitrate to a specific max value.
bridge | Bridge to set the REMB behavior on |
estimated_bitrate | The estimated bitrate in bits per second |
Definition at line 3807 of file bridge.c.
References ast_assert, ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_SFU, ast_bridge_video_sfu_data::estimated_bitrate, ast_bridge_video_mode::mode, ast_bridge_video_mode::mode_data, ast_bridge_video_mode::sfu_data, ast_bridge::softmix, and ast_bridge_softmix::video_mode.
Referenced by join_conference_bridge().
void ast_bridge_set_remb_send_interval | ( | struct ast_bridge * | bridge, |
unsigned int | remb_send_interval | ||
) |
Set the interval at which a combined REMB frame will be sent to video sources.
bridge | Bridge to set the REMB send interval on |
remb_send_interval | The REMB send interval |
Definition at line 3789 of file bridge.c.
References ast_assert, ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_SFU, ast_bridge_video_mode::mode, ast_bridge_video_mode::mode_data, ast_bridge_video_sfu_data::remb_send_interval, ast_bridge_video_mode::sfu_data, ast_bridge::softmix, and ast_bridge_softmix::video_mode.
Referenced by join_conference_bridge().
void ast_bridge_set_send_sdp_label | ( | struct ast_bridge * | bridge, |
unsigned int | send_sdp_label | ||
) |
Controls whether to send a "label" attribute in each stream in an SDP.
bridge | The bridge |
send_sdp_label | Whether to send the labels or not |
Definition at line 3966 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_softmix::send_sdp_label, and ast_bridge::softmix.
Referenced by bridge_stasis_new(), and join_conference_bridge().
void ast_bridge_set_sfu_video_mode | ( | struct ast_bridge * | bridge | ) |
Set the bridge to be a selective forwarding unit.
Definition at line 3774 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_SFU, cleanup_video_mode(), ast_bridge_video_mode::mode, ast_bridge::softmix, and ast_bridge_softmix::video_mode.
Referenced by bridge_stasis_new(), and join_conference_bridge().
void ast_bridge_set_single_src_video_mode | ( | struct ast_bridge * | bridge, |
struct ast_channel * | video_src_chan | ||
) |
Set a bridge to feed a single video source to all participants.
Definition at line 3749 of file bridge.c.
References ast_bridge_lock, ast_bridge_publish_state(), ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_SINGLE_SRC, ast_channel_name(), ast_channel_ref, ast_channel_uniqueid(), AST_CONTROL_VIDUPDATE, ast_indicate(), ast_verb, ast_bridge_video_single_src_data::chan_vsrc, cleanup_video_mode(), ast_bridge_video_mode::mode, ast_bridge_video_mode::mode_data, ast_bridge::name, ast_bridge_video_mode::single_src_data, ast_bridge::softmix, ast_bridge::uniqueid, and ast_bridge_softmix::video_mode.
Referenced by action_confbridgesetsinglevideosrc(), bridge_set_video_source_cb(), bridge_stasis_new(), execute_menu_entry(), handle_video_on_exit(), and handle_video_on_join().
void ast_bridge_set_talker_src_video_mode | ( | struct ast_bridge * | bridge | ) |
Set the bridge to pick the strongest talker supporting video as the single source video feed.
Definition at line 3766 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_TALKER_SRC, cleanup_video_mode(), ast_bridge_video_mode::mode, ast_bridge::softmix, and ast_bridge_softmix::video_mode.
Referenced by ast_ari_bridges_clear_video_source(), bridge_stasis_new(), handle_video_on_exit(), and join_conference_bridge().
void ast_bridge_set_transfer_variables | ( | struct ast_channel * | chan, |
const char * | value, | ||
int | is_attended | ||
) |
Set the relevant transfer variables for a single channel.
Sets either the ATTENDEDTRANSFER or BLINDTRANSFER variable for a channel while clearing the opposite.
chan | Channel the variable is being set for |
value | Value the variable is being set to |
is_attended | false set BLINDTRANSFER and unset ATTENDEDTRANSFER true set ATTENDEDTRANSFER and unset BLINDTRANSFER |
Definition at line 4352 of file bridge.c.
References ATTENDEDTRANSFER, BLINDTRANSFER, NULL, pbx_builtin_setvar_helper(), and value.
Referenced by dial_transfer(), manager_park(), park_local_transfer(), parking_park_bridge_channel(), and set_transfer_variables_all().
void ast_bridge_set_video_update_discard | ( | struct ast_bridge * | bridge, |
unsigned int | video_update_discard | ||
) |
Set the amount of time to discard subsequent video updates after a video update has been sent.
bridge | Bridge to set the minimum video update wait time on |
video_update_discard | Amount of time after sending a video update that others should be discarded |
Definition at line 3782 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge::softmix, ast_bridge_softmix::video_mode, and ast_bridge_video_mode::video_update_discard.
Referenced by bridge_stasis_new(), and join_conference_bridge().
int ast_bridge_suspend | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Suspend a channel temporarily from a bridge.
bridge | Bridge to suspend the channel from |
chan | Channel to suspend |
0 | on success |
-1 | on failure |
Example usage:
This suspends the channel pointed to by chan from the bridge pointed to by bridge temporarily. Control of the channel is given to the calling thread. This differs from ast_bridge_depart as the channel will not be removed from the bridge.
Definition at line 3007 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_channel::bridge, bridge_channel_internal_suspend_nolock(), bridge_find_channel(), and ast_bridge_channel::chan.
Referenced by conf_moh_start(), and conf_moh_stop().
int ast_bridge_talk_detector_hook | ( | struct ast_bridge_features * | features, |
ast_bridge_talking_indicate_callback | callback, | ||
void * | hook_pvt, | ||
ast_bridge_hook_pvt_destructor | destructor, | ||
enum ast_bridge_hook_remove_flags | remove_flags | ||
) |
Attach a bridge channel talk detection hook to a bridge features structure.
features | Bridge features structure |
callback | Function to execute upon activation |
hook_pvt | Unique data |
destructor | Optional destructor callback for hook_pvt data |
remove_flags | Dictates what situations the hook should be removed. |
0 | on success |
-1 | on failure (The caller must cleanup any hook_pvt resources.) |
Example usage:
This makes the bridging technology call talk_callback when a channel is recognized as starting and stopping talking. A pointer to useful data may be provided to the hook_pvt parameter.
Definition at line 3295 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_TALK, bridge_other_hook(), ast_bridge_hook::callback, ast_bridge_hook::destructor, hook_cb(), ast_bridge_hook::hook_pvt, and ast_bridge_hook::remove_flags.
Referenced by confbridge_exec().
void ast_bridge_technology_suspend | ( | struct ast_bridge_technology * | technology | ) |
Suspend a bridge technology from consideration.
technology | The bridge technology to suspend |
Example usage:
This suspends the bridge technology simple_bridge_tech from being considered when creating a new bridge. Existing bridges using the bridge technology are not affected.
Definition at line 3047 of file bridge.c.
References ast_bridge_technology::suspended.
Referenced by handle_bridge_technology_suspend(), and handle_manager_bridge_tech_suspend().
int ast_bridge_technology_unregister | ( | struct ast_bridge_technology * | technology | ) |
Unregister a bridge technology from use.
technology | The bridge technology to unregister |
0 | on success |
-1 | on failure |
Example usage:
This unregisters a bridge technlogy declared as the structure simple_bridge_tech with the bridging core. It will no longer be considered when creating a new bridge.
Definition at line 263 of file bridge.c.
References AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, current, and ast_bridge_technology::name.
Referenced by dahdi_native_unload(), and unload_module().
void ast_bridge_technology_unsuspend | ( | struct ast_bridge_technology * | technology | ) |
Unsuspend a bridge technology.
technology | The bridge technology to unsuspend |
Example usage:
This makes the bridge technology simple_bridge_tech considered when creating a new bridge again.
Definition at line 3052 of file bridge.c.
References ast_bridge_technology::suspended.
Referenced by handle_bridge_technology_suspend(), and handle_manager_bridge_tech_suspend().
struct ast_bridge * ast_bridge_transfer_acquire_bridge | ( | struct ast_channel * | chan | ) |
Acquire the channel's bridge for transfer purposes.
chan | Channel involved in a transfer. |
Definition at line 4408 of file bridge.c.
References ao2_ref, AST_BRIDGE_FLAG_INVISIBLE, AST_BRIDGE_FLAG_MASQUERADE_ONLY, ast_channel_get_bridge(), ast_channel_lock, ast_channel_unlock, ast_test_flag, ast_bridge::feature_flags, and NULL.
Referenced by ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), and invite_replaces().
enum ast_transfer_result ast_bridge_transfer_attended | ( | struct ast_channel * | to_transferee, |
struct ast_channel * | to_transfer_target | ||
) |
Attended transfer.
The two channels are both transferer channels. The first is the channel that is bridged to the transferee (or if unbridged, the 'first' call of the transfer). The second is the channel that is bridged to the transfer target (or if unbridged, the 'second' call of the transfer).
to_transferee | Transferer channel on initial call (presumably bridged to transferee) |
to_transfer_target | Transferer channel on consultation call (presumably bridged to transfer target) |
Definition at line 4677 of file bridge.c.
References ao2_cleanup, ao2_container_count(), app, ast_attended_transfer_message_add_app(), ast_attended_transfer_message_create(), ast_bridge_channel_write_playfile(), ast_bridge_channel_write_unhold(), AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY, AST_BRIDGE_FLAG_TRANSFER_PROHIBITED, ast_bridge_lock, ast_bridge_lock_both, ast_bridge_peers_nolock(), ast_bridge_publish_attended_transfer(), ast_bridge_remove(), ast_bridge_transfer_acquire_bridge(), AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_INVALID, AST_BRIDGE_TRANSFER_NOT_PERMITTED, AST_BRIDGE_TRANSFER_SUCCESS, ast_bridge_unlock, ast_channel_appl(), ast_channel_get_bridge_channel(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_log, ast_softhangup(), AST_SOFTHANGUP_DEV, ast_strdupa, ast_strlen_zero(), ast_test_flag, attended_transfer_bridge(), bridge_channel_internal_queue_attended_transfer(), channels, end, ast_bridge::feature_flags, get_transferee(), lock, LOG_ERROR, NULL, pbx_builtin_getvar_helper(), RAII_VAR, SCOPED_LOCK, set_transfer_variables_all(), and two_bridge_attended_transfer().
Referenced by analog_attempt_transfer(), AST_TEST_DEFINE(), attempt_transfer(), and refer_attended_task().
enum ast_transfer_result ast_bridge_transfer_blind | ( | int | is_external, |
struct ast_channel * | transferer, | ||
const char * | exten, | ||
const char * | context, | ||
transfer_channel_cb | new_channel_cb, | ||
void * | user_data | ||
) |
Blind transfer target to the extension and context provided.
The channel given is bridged to one or multiple channels. Depending on the bridge and the number of participants, the entire bridge could be transferred to the given destination, or a single channel may be redirected.
Callers may also provide a callback to be called on the channel that will be running dialplan. The user data passed into ast_bridge_transfer_blind will be given as the argument to the callback to be interpreted as desired. This callback is guaranteed to be called in the same thread as ast_bridge_transfer_blind() and before ast_bridge_transfer_blind() returns.
is_external | Indicates that transfer was initiated externally |
transferer | The channel performing the blind transfer |
exten | The dialplan extension to send the call to |
context | The dialplan context to send the call to |
new_channel_cb | A callback to be called on the channel that will be executing dialplan |
user_data | Argument for new_channel_cb |
Definition at line 4425 of file bridge.c.
References ao2_alloc, ao2_cleanup, ao2_container_count(), ast_blind_transfer_message_create(), ast_bridge_channel_write_unhold(), AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY, AST_BRIDGE_FLAG_TRANSFER_PROHIBITED, ast_bridge_lock, ast_bridge_peer(), ast_bridge_peers_nolock(), ast_bridge_publish_blind_transfer(), ast_bridge_remove(), ast_bridge_snapshot_create(), ast_bridge_transfer_acquire_bridge(), AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_INVALID, AST_BRIDGE_TRANSFER_NOT_PERMITTED, AST_BRIDGE_TRANSFER_SUCCESS, ast_bridge_unlock, ast_channel_cleanup, ast_channel_get_bridge_channel(), ast_channel_lock, ast_channel_name(), ast_channel_snapshot_get_latest(), ast_channel_uniqueid(), ast_channel_unlock, ast_log, ast_test_flag, blind_transfer_bridge(), bridge_channel_internal_queue_blind_transfer(), channels, voicemailpwcheck::context, lock, LOG_ERROR, NULL, publish, RAII_VAR, SCOPED_LOCK, set_transfer_variables_all(), and try_parking().
Referenced by action_blind_transfer(), blind_transfer_exec(), feature_blind_transfer(), refer_incoming_attended_request(), refer_incoming_blind_request(), and socket_process_helper().
int ast_bridge_unreal_optimize_out | ( | struct ast_channel * | chan, |
struct ast_channel * | peer, | ||
struct ast_unreal_pvt * | pvt | ||
) |
Check and optimize out the unreal channels between bridges.
chan | Unreal channel writing a frame into the channel driver. |
peer | Other unreal channel in the pair. |
pvt | Private data provided by an implementation of the unreal driver that contains the callbacks that should be called when optimization begins/ends |
0 | if unreal channels were not optimized out. |
non-zero | if unreal channels were optimized out. |
Definition at line 2920 of file bridge.c.
References ast_bridge_channel_unlock, ast_bridge_unlock, ast_channel_internal_bridge_channel(), ast_channel_unlock, ast_bridge_channel::chan, optimize_lock_chan_stack(), optimize_lock_peer_stack(), try_merge_optimize_out(), and try_swap_optimize_out().
Referenced by got_optimized_out().
int ast_bridge_unsuspend | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Unsuspend a channel from a bridge.
bridge | Bridge to unsuspend the channel from |
chan | Channel to unsuspend |
0 | on success |
-1 | on failure |
Example usage:
This unsuspends the channel pointed to by chan from the bridge pointed to by bridge. The bridge will go back to handling the channel once this function returns.
Definition at line 3028 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_channel::bridge, bridge_channel_internal_unsuspend_nolock(), bridge_find_channel(), and ast_bridge_channel::chan.
Referenced by conf_moh_start(), and conf_moh_stop().
void ast_bridge_update_talker_src_video_mode | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan, | ||
int | talker_energy, | ||
int | is_keyframe | ||
) |
Update information about talker energy for talker src video mode.
Definition at line 3816 of file bridge.c.
References ast_bridge_lock, ast_bridge_publish_state(), ast_bridge_unlock, ast_channel_name(), ast_channel_nativeformats(), ast_channel_ref, ast_channel_uniqueid(), ast_channel_unref, AST_CONTROL_VIDUPDATE, ast_format_cap_has_type(), ast_indicate(), AST_MEDIA_TYPE_VIDEO, ast_verb, ast_bridge_video_talker_src_data::average_talking_energy, ast_bridge_video_talker_src_data::chan_old_vsrc, ast_bridge_video_talker_src_data::chan_vsrc, ast_bridge_video_mode::mode_data, ast_bridge::name, ast_bridge::softmix, ast_bridge_video_mode::talker_src_data, ast_bridge::uniqueid, and ast_bridge_softmix::video_mode.
Referenced by softmix_bridge_write_video().
void ast_bridge_vars_set | ( | struct ast_channel * | chan, |
const char * | name, | ||
const char * | pvtid | ||
) |
Sets BRIDGECHANNEL and BRIDGEPVTCALLID for a channel.
chan | channel name of the bridged peer |
name | |
pvtid | Private CallID of the bridged peer |
Definition at line 1212 of file bridge.c.
References ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), ast_bridge_channel::chan, name, and pbx_builtin_setvar_helper().
Referenced by ast_bridge_channel_leave_bridge_nolock(), set_bridge_peer_vars_2party(), set_bridge_peer_vars_holding(), and set_bridge_peer_vars_multiparty().
const char * ast_bridge_video_mode_to_string | ( | enum ast_bridge_video_mode_type | video_mode | ) |
Converts an enum representation of a bridge video mode to string.
video_mode | The video mode |
video_mode
Definition at line 3951 of file bridge.c.
References AST_BRIDGE_VIDEO_MODE_NONE, AST_BRIDGE_VIDEO_MODE_SFU, AST_BRIDGE_VIDEO_MODE_SINGLE_SRC, and AST_BRIDGE_VIDEO_MODE_TALKER_SRC.
Referenced by ast_bridge_snapshot_to_json(), ast_manager_build_bridge_state_string_prefix(), and handle_bridge_show_specific().
struct ao2_container * ast_bridges | ( | void | ) |
Returns the global bridges container.
NULL | on failure |
ao2_ref(<container>, -1)when done with it
Definition at line 174 of file bridge.c.
References ao2_bump, and bridges.
Referenced by ast_ari_bridges_list(), bridges_scrape_cb(), and manager_bridges_list().
enum ast_bridge_optimization ast_bridges_allow_optimization | ( | struct ast_bridge * | chan_bridge, |
struct ast_bridge * | peer_bridge | ||
) |
Determine if bridges allow for optimization to occur betweem them.
chan_bridge | First bridge being tested |
peer_bridge | Second bridge being tested |
This determines if two bridges allow for unreal channel optimization to occur between them. The function does not require for unreal channels to already be in the bridges when called.
Definition at line 2960 of file bridge.c.
References AST_BRIDGE_OPTIMIZE_MERGE_TO_CHAN_BRIDGE, AST_BRIDGE_OPTIMIZE_MERGE_TO_PEER_BRIDGE, AST_BRIDGE_OPTIMIZE_PROHIBITED, AST_BRIDGE_OPTIMIZE_SWAP_TO_CHAN_BRIDGE, AST_BRIDGE_OPTIMIZE_SWAP_TO_PEER_BRIDGE, bridge_allows_optimization(), bridges_allow_merge_optimization(), bridges_allow_swap_optimization(), merge_direction::dest, MERGE_ALLOWED, SWAP_PROHIBITED, SWAP_TO_CHAN_BRIDGE, and SWAP_TO_PEER_BRIDGE.
Referenced by two_bridge_attended_transfer().
int ast_bridging_init | ( | void | ) |
Initialize the bridging system.
0 | on success. |
-1 | on error. |
Definition at line 5543 of file bridge.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE, ao2_container_alloc_rbtree, ao2_container_register(), ARRAY_LEN, ast_bridging_init_basic(), ast_cli_register_multiple, ast_manager_register_xml_core, ast_register_cleanup(), ast_stasis_bridging_init(), bridge_cleanup(), bridge_cli, bridge_manager, bridge_manager_create(), bridge_prnt_obj(), bridge_sort_cmp(), bridges, manager_bridge_tech_list(), manager_bridge_tech_suspend(), manager_bridge_tech_unsuspend(), and NULL.
Referenced by asterisk_daemon().
void ast_brige_set_remb_behavior | ( | struct ast_bridge * | bridge, |
enum ast_bridge_video_sfu_remb_behavior | behavior | ||
) |
Set the REMB report generation behavior on a bridge.
bridge | Bridge to set the REMB behavior on |
behavior | How REMB reports are generated |
Definition at line 3798 of file bridge.c.
References ast_assert, ast_bridge_lock, ast_bridge_unlock, AST_BRIDGE_VIDEO_MODE_SFU, ast_bridge_video_mode::mode, ast_bridge_video_mode::mode_data, ast_bridge_video_sfu_data::remb_behavior, ast_bridge_video_mode::sfu_data, ast_bridge::softmix, and ast_bridge_softmix::video_mode.
Referenced by join_conference_bridge().
|
static |
Perform an attended transfer of a bridge.
This performs an attended transfer of an entire bridge to a target. The target varies, depending on what bridges exist during the transfer attempt.
If two bridges exist, then a local channel is created to link the two bridges together.
If only one bridge exists, then a local channel is created with one end placed into the existing bridge and the other end masquerading into the unbridged channel.
chan1 | Transferer channel. Guaranteed to be bridged. |
chan2 | Other transferer channel. May or may not be bridged. |
bridge1 | Bridge that chan1 is in. Guaranteed to be non-NULL. |
bridge2 | Bridge that chan2 is in. If NULL, then chan2 is not bridged. |
transfer_msg | Data to publish for a stasis attended transfer message. |
AST_BRIDGE_TRANSFER_FAIL | Internal error occurred |
AST_BRIDGE_TRANSFER_SUCCESS | Succesfully transferred the bridge |
Definition at line 4221 of file bridge.c.
References ao2_bump, ao2_cleanup, ao2_ref, app, ast_attended_transfer_message_add_app(), ast_attended_transfer_message_add_link(), ast_bridge_impart(), AST_BRIDGE_IMPART_CHAN_INDEPENDENT, AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_SUCCESS, ast_bridge_unlock, ast_call(), ast_channel_appl(), ast_channel_lock, ast_channel_lock_both, ast_channel_name(), ast_channel_nativeformats(), ast_channel_req_accountcodes(), AST_CHANNEL_REQUESTOR_REPLACEMENT, ast_channel_unlock, ast_hangup(), ast_local_lock_all(), ast_local_setup_bridge(), ast_local_setup_masquerade(), ast_local_unlock_all(), ast_log, ast_request(), ast_strdupa, ATTENDEDTRANSFER, BRIDGE_LOCK_ONE_OR_BOTH, locals, LOG_ERROR, NULL, pbx_builtin_setvar_helper(), SWAP, and ast_channel::tech.
Referenced by ast_bridge_transfer_attended(), and two_bridge_attended_transfer().
|
static |
Definition at line 4111 of file bridge.c.
References ao2_bump, ao2_cleanup, ast_bridge_impart(), AST_BRIDGE_IMPART_CHAN_INDEPENDENT, AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_MULTI_PARTY, AST_BRIDGE_TRANSFER_SUCCESS, ast_call(), ast_channel_lock, ast_channel_lock_both, ast_channel_name(), ast_channel_nativeformats(), ast_channel_req_accountcodes(), AST_CHANNEL_REQUESTOR_REPLACEMENT, ast_channel_snapshot_get_latest(), ast_channel_uniqueid(), ast_channel_unlock, ast_hangup(), AST_MAX_CONTEXT, AST_MAX_EXTENSION, ast_request(), BLINDTRANSFER, voicemailpwcheck::context, NULL, pbx_builtin_setvar_helper(), and ast_blind_transfer_message::replace_channel.
Referenced by ast_bridge_transfer_blind().
|
static |
Definition at line 588 of file bridge.c.
References ao2_ref, ast_assert, ast_bridge_lock, ast_bridge_unlock, BRIDGE_CHANNEL_ACTION_DEFERRED_DISSOLVING, BRIDGE_CHANNEL_ACTION_DEFERRED_TECH_DESTROY, bridge_tech_deferred_destroy(), ast_bridge_methods::dissolving, ast_frame_subclass::integer, ast_frame::subclass, and ast_bridge::v_table.
Referenced by bridge_handle_actions().
struct ast_bridge * bridge_alloc | ( | size_t | size, |
const struct ast_bridge_methods * | v_table | ||
) |
Definition at line 706 of file bridge.c.
References ao2_alloc, ao2_cleanup, ast_assert, ast_log, AST_MEDIA_TYPE_END, ast_string_field_init, AST_VECTOR_INIT, ast_bridge_methods::destroy, destroy_bridge(), ast_bridge_methods::dissolving, ast_bridge_methods::get_merge_priority, LOG_ERROR, ast_bridge::media_types, ast_bridge_methods::name, ast_bridge_methods::notify_masquerade, NULL, ast_bridge_methods::pull, ast_bridge_methods::push, and ast_bridge::v_table.
Referenced by ast_bridge_base_new(), ast_bridge_basic_new(), bridge_agent_hold_new(), bridge_parking_new(), and bridge_stasis_new().
|
static |
Definition at line 2560 of file bridge.c.
References AST_BRIDGE_FLAG_MASQUERADE_ONLY, ast_test_flag, ast_channel::bridge, ast_bridge::dissolved, ast_bridge::feature_flags, and ast_bridge::inhibit_merge.
Referenced by ast_bridges_allow_optimization(), optimize_lock_chan_stack(), and optimize_lock_peer_stack().
|
static |
|
static |
Definition at line 832 of file bridge.c.
References ao2_unlink, and bridges.
|
static |
struct ast_bridge * bridge_base_init | ( | struct ast_bridge * | self, |
uint32_t | capabilities, | ||
unsigned int | flags, | ||
const char * | creator, | ||
const char * | name, | ||
const char * | id | ||
) |
Initialize the base class of the bridge.
self | Bridge to operate upon. (Tolerates a NULL pointer) |
capabilities | The capabilities that we require to be used on the bridge |
flags | Flags that will alter the behavior of the bridge |
creator | Entity that created the bridge (optional) |
name | Name given to the bridge by its creator (optional, requires named creator) |
id | Unique ID given to the bridge by its creator (optional) |
NULL | on failure, self is already destroyed |
Example usage:
This creates a no frills two party bridge that will be destroyed once one of the channels hangs up.
Definition at line 742 of file bridge.c.
References ast_bridge::allowed_capabilities, ao2_ref, AST_BRIDGE_FLAG_INVISIBLE, ast_bridge_topic(), ast_debug, ast_log, ast_set_flag, ast_string_field_set, ast_strlen_zero(), ast_tvnow(), ast_uuid_generate_str(), AST_UUID_STR_LEN, bridge_topics_init(), ast_bridge_technology::create, ast_bridge::creationtime, ast_bridge::creator, ast_bridge::feature_flags, find_best_technology(), LOG_WARNING, name, ast_bridge_methods::name, ast_bridge_technology::name, NULL, ast_bridge_technology::start, ast_bridge::technology, ast_bridge::uniqueid, and ast_bridge::v_table.
Referenced by ast_bridge_base_new(), ast_bridge_basic_new(), bridge_agent_hold_new(), bridge_parking_new(), and bridge_stasis_new().
|
static |
Definition at line 882 of file bridge.c.
References ast_bridge::reconfigured.
|
static |
Definition at line 867 of file bridge.c.
References ast_bridge_features_remove(), AST_BRIDGE_HOOK_REMOVE_ON_PULL, and ast_bridge_channel::features.
|
static |
|
static |
|
static |
Definition at line 2007 of file bridge.c.
References ao2_ref, ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_channel_internal_bridge_set(), ast_channel_lock, ast_channel_unlock, ast_bridge_channel::bridge, and ast_bridge_channel::chan.
Referenced by bridge_do_merge(), and bridge_do_move().
|
static |
Definition at line 433 of file bridge.c.
References ast_bridge_channel_leave_bridge(), ast_bridge_channel_stream_map(), ast_channel_name(), ast_debug, ast_bridge_channel::bridge, BRIDGE_CHANNEL_STATE_END, ast_bridge_channel::chan, ast_bridge_technology::join, ast_bridge_channel::just_joined, ast_bridge_technology::name, ast_bridge_technology::stream_topology_changed, ast_bridge::technology, and ast_bridge::uniqueid.
Referenced by bridge_complete_join(), and smart_bridge_operation().
|
static |
Thread responsible for imparted bridged channels to be departed.
Definition at line 1711 of file bridge.c.