Asterisk - The Open Source Telephony Project
18.5.0
|
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) |
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) |
Unregisters a handler for a built in interval feature. 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) |
Signal imparting threads to wake up. More... | |
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_destroy_specific (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
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 ATTENDEDTRANSFER "ATTENDEDTRANSFER" |
Definition at line 139 of file bridge.c.
Referenced by ast_bridge_set_transfer_variables(), and attended_transfer_bridge().
#define BLINDTRANSFER "BLINDTRANSFER" |
Definition at line 136 of file bridge.c.
Referenced by ast_bridge_set_transfer_variables(), and blind_transfer_bridge().
#define BRIDGE_LOCK_ONE_OR_BOTH | ( | b1, | |
b2 | |||
) |
Referenced by attended_transfer_bridge().
#define FORMAT_HDR "%-36s %5s %-15s %-15s %s\n" |
Referenced by handle_bridge_show_all(), and handle_bridge_technology_show().
#define FORMAT_HDR "%-20s %-20s %8s %s\n" |
#define FORMAT_ROW "%-36s %5u %-15s %-15s %s\n" |
Referenced by handle_bridge_show_all(), and handle_bridge_technology_show().
#define FORMAT_ROW "%-20s %-20s %8u %s\n" |
#define MAX_BRIDGEPEER_CHANS (10 + 1) |
Referenced by set_bridge_peer_vars_multiparty().
#define UPDATE_BRIDGE_VARS_GET | ( | chan, | |
name, | |||
pvtid | |||
) |
Referenced by set_bridge_peer_vars_2party().
enum bridge_allow_merge |
Definition at line 2859 of file bridge.c.
enum bridge_allow_swap |
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 214 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, 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 2519 of file bridge.c.
References ao2_cleanup, ast_answer(), ast_assert, ast_bridge_channel_queue_playfile(), ast_bridge_features_destroy(), ast_bridge_impart(), AST_BRIDGE_IMPART_CHAN_INDEPENDENT, ast_bridge_lock_both, ast_bridge_unlock, ast_channel_get_bridge(), ast_channel_get_bridge_channel(), ast_channel_lock, ast_channel_name(), ast_channel_pbx(), ast_channel_ref, ast_channel_unlock, ast_channel_unref, ast_channel_yank(), ast_hangup(), ast_log, ast_moh_stop(), AST_STATE_UP, ast_strlen_zero, bridge_dissolve_check_stolen(), bridge_find_channel(), bridge_move_locked(), LOG_WARNING, NULL, and RAII_VAR.
Referenced by action_bridge(), bridge_exec(), and manager_park_unbridged().
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) |
a | pointer to a new bridge on success |
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 960 of file bridge.c.
References bridge_manager_request::bridge, bridge_alloc(), bridge_base_init(), and bridge_register().
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 1952 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 970 of file bridge.c.
References ao2_ref, ast_bridge_lock, ast_bridge_unlock, ast_debug, bridge_dissolve(), 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(), handle_bridge_destroy_specific(), 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 3245 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 3720 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 3741 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 3151 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 3428 of file bridge.c.
References ARRAY_LEN, ast_bridge_dtmf_hook(), ast_debug, ast_strlen_zero, builtin_features_dtmf, and builtin_features_handlers.
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 3687 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 allocted, but not initialized |
0 | on success |
-1 | on failure |
Definition at line 3459 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 3470 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 3662 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:
features | New allocated features struct. |
NULL | on error. |
Definition at line 3750 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 3123 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 3568 of file bridge.c.
References ast_bridge_features::dtmf_hooks, hooks_remove_container(), hooks_remove_heap(), ast_bridge_features::interval_hooks, and ast_bridge_features::other_hooks.
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 3490 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 3475 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 3139 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 5070 of file bridge.c.
References ao2_find, and OBJ_SEARCH_KEY.
Referenced by ast_bridge_get_snapshot_by_uniqueid(), complete_bridge_participant(), handle_bridge_destroy_specific(), 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 3328 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_HANGUP, and bridge_other_hook().
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 1924 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(), bridge_channel_impart_cond::cond, bridge_channel_impart_cond::done, bridge_channel_impart_cond::lock, 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(), handle_invite_replaces(), 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 3382 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 3168 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 | ) |
Definition at line 3180 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. |
None | 0, 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 3958 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 1667 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, 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 | ||
) |
Unregisters a handler for a built in interval feature.
interval | the interval feature to unregister |
0 | on success |
-1 | on failure |
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 3338 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_JOIN, and bridge_other_hook().
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 2025 of file bridge.c.
References ast_bridge_channel_queue_callback(), ast_bridge_lock, ast_bridge_unlock, bridge_find_channel(), 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 3348 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_LEAVE, and bridge_other_hook().
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 2348 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 3061 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, and bridge_merge_inhibit_nolock().
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 2508 of file bridge.c.
References ast_bridge_lock_both, ast_bridge_unlock, and bridge_move_locked().
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 3370 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_MOVE, bridge_other_hook(), and hook_cb().
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 1482 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_manager_request::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 3931 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 4142 of file bridge.c.
References ast_bridge_lock, ast_bridge_peer_nolock(), and ast_bridge_unlock.
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 4114 of file bridge.c.
References AST_BRIDGE_CAPABILITY_1TO1MIX, AST_BRIDGE_CAPABILITY_NATIVE, ast_channel_ref, AST_LIST_TRAVERSE, 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(), feature_automixmonitor(), and feature_automonitor().
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 4103 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 4085 of file bridge.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_container_alloc_hash, ao2_link, AST_LIST_TRAVERSE, 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 307 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 1997 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, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, bridge_find_channel(), 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 3984 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 3772 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 3779 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 3786 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 3765 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 3874 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 3856 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 4033 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_bridge_softmix::send_sdp_label, and ast_bridge::softmix.
Referenced by 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 3841 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 3816 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 3833 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 4404 of file bridge.c.
References ATTENDEDTRANSFER, BLINDTRANSFER, NULL, and pbx_builtin_setvar_helper().
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 3849 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 3068 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, bridge_channel_internal_suspend_nolock(), and bridge_find_channel().
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 3358 of file bridge.c.
References AST_BRIDGE_HOOK_TYPE_TALK, bridge_other_hook(), and hook_cb().
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 3108 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 265 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, 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 3113 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 4460 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, bridge_manager_request::bridge, ast_bridge::feature_flags, and NULL.
Referenced by ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), handle_invite_replaces(), 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 4729 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(), local_attended_transfer(), misdn_attempt_transfer(), refer_attended_task(), and skinny_transfer_attended().
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 4477 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_manager_request::bridge, bridge_channel_internal_queue_blind_transfer(), channels, ast_bridge::feature_flags, lock, LOG_ERROR, NULL, publish, RAII_VAR, SCOPED_LOCK, set_transfer_variables_all(), and try_parking().
Referenced by action_blind_transfer(), blind_transfer_exec(), console_transfer(), feature_blind_transfer(), handle_request_refer(), refer_incoming_attended_request(), refer_incoming_blind_request(), skinny_transfer_blind(), 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 2968 of file bridge.c.
References ast_bridge_channel_unlock, ast_bridge_unlock, ast_channel_internal_bridge_channel(), ast_channel_unlock, 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 3089 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, bridge_channel_internal_unsuspend_nolock(), and bridge_find_channel().
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 3883 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.
name | channel name of the bridged peer |
pvtid | Private CallID of the bridged peer |
Definition at line 1242 of file bridge.c.
References ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), 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 |
A | string representation of video_mode |
Definition at line 4018 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.
a | pointer to the bridges container success |
NULL | on failure |
Definition at line 174 of file bridge.c.
References ao2_bump.
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 3008 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 5605 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_manager_create(), bridge_prnt_obj(), bridge_sort_cmp(), 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 3865 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. |
publication | 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 4280 of file bridge.c.
References 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_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 4178 of file bridge.c.
References 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_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, NULL, pbx_builtin_setvar_helper(), and ast_blind_transfer_message::replace_channel.
Referenced by ast_bridge_transfer_blind().
|
static |
Definition at line 604 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 724 of file bridge.c.
References ao2_alloc, ao2_cleanup, ast_assert, ast_log, AST_MEDIA_TYPE_END, ast_string_field_init, AST_VECTOR_INIT, bridge_manager_request::bridge, 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 2608 of file bridge.c.
References AST_BRIDGE_FLAG_MASQUERADE_ONLY, ast_test_flag, 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 |
|
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) |
self | on success |
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 760 of file bridge.c.
References 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(), find_best_technology(), LOG_WARNING, NULL, and ast_bridge::uniqueid.
Referenced by ast_bridge_base_new(), ast_bridge_basic_new(), bridge_agent_hold_new(), bridge_parking_new(), and bridge_stasis_new().
|
static |
|
static |
Definition at line 891 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 2055 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 443 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 1757 of file bridge.c.
References ao2_t_cleanup, AST_BRIDGE_AFTER_CB_REASON_DEPART, AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED, ast_bridge_discard_after_callback(), ast_bridge_discard_after_goto(), ast_bridge_features_destroy(), ast_callid_threadassoc_add(), bridge_channel_impart_signal(), bridge_channel_internal_join(), ast_bridge_channel::callid, ast_bridge_channel::chan, ast_bridge_channel::features, NULL, and ast_bridge_channel::swap.
Referenced by bridge_impart_internal().
|
static |
Definition at line 1593 of file bridge.c.
References ast_assert, ast_calloc, ast_channel_datastore_add(), ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, ast_datastore_alloc, ast_datastore_free(), AST_LIST_INSERT_TAIL, ast_datastore::data, and NULL.
Referenced by bridge_impart_internal().
|
static |
Definition at line 1550 of file bridge.c.
References ast_free, and bridge_channel_impart_ds_head_signal().
|
static |
Definition at line 1567 of file bridge.c.
References bridge_channel_impart_ds_head_signal().
|
static |
Definition at line 1536 of file bridge.c.
References ast_cond_signal, AST_LIST_REMOVE_HEAD, ast_mutex_lock, ast_mutex_unlock, cond, bridge_channel_impart_cond::cond, bridge_channel_impart_cond::done, and bridge_channel_impart_cond::lock.
Referenced by bridge_channel_impart_ds_head_dtor(), bridge_channel_impart_ds_head_fixup(), and bridge_channel_impart_signal().
void bridge_channel_impart_signal | ( | struct ast_channel * | chan | ) |
Signal imparting threads to wake up.
chan | Channel imparted that we need to signal. |
Definition at line 1626 of file bridge.c.
References ast_channel_datastore_find(), ast_channel_lock, ast_channel_unlock, bridge_channel_impart_ds_head_signal(), ast_datastore::data, and NULL.
Referenced by ast_bridge_impart(), ast_bridge_join(), bridge_channel_depart_thread(), bridge_channel_ind_thread(), and bridge_channel_internal_join().
|
static |
Definition at line 1647 of file bridge.c.
References ast_cond_wait, ast_mutex_lock, ast_mutex_unlock, bridge_channel_impart_cond::cond, bridge_channel_impart_cond::done, and bridge_channel_impart_cond::lock.
Referenced by bridge_impart_internal().
|
static |
Thread responsible for independent imparted bridged channels.
Definition at line 1788 of file bridge.c.
References ao2_lock, ao2_ref, ao2_t_cleanup, ao2_unlock, ast_bridge_features_destroy(), ast_bridge_run_after_callback(), ast_bridge_run_after_goto(), ast_callid_threadassoc_add(), ast_channel_internal_bridge_channel_set(), ast_channel_lock, ast_channel_unlock, bridge_channel_impart_signal(), bridge_channel_internal_join(), ast_bridge_channel::callid, ast_bridge_channel::chan, ast_bridge_channel::features, NULL, and ast_bridge_channel::swap.
Referenced by bridge_impart_internal().
|
static |
Definition at line 2070 of file bridge.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ao2_unlink, AST_BRIDGE_HOOK_TYPE_MOVE, ast_channel_name(), ast_debug, ast_bridge_hook::callback, ast_bridge_channel::chan, ast_bridge_channel::features, ast_bridge_hook::hook_pvt, ast_bridge_features::other_hooks, and ast_bridge_hook::type.
Referenced by bridge_do_merge(), and bridge_do_move().
|
static |
Definition at line 5591 of file bridge.c.
References ao2_cleanup, ao2_container_unregister(), ARRAY_LEN, ast_cli_unregister_multiple(), ast_manager_unregister(), and NULL.
Referenced by ast_bridging_init().
|
static |
Definition at line 486 of file bridge.c.
References AST_LIST_TRAVERSE, bridge_channel_complete_join(), bridge_channel_queue_deferred_frames(), ast_bridge::channels, ast_bridge::dissolved, and ast_bridge_channel::just_joined.
Referenced by bridge_reconfigured().
void bridge_dissolve | ( | struct ast_bridge * | bridge, |
int | cause | ||
) |
Definition at line 319 of file bridge.c.
References ast_bridge_channel_leave_bridge(), ast_bridge_queue_action(), ast_cause2str(), AST_CAUSE_NORMAL_CLEARING, ast_debug, AST_FRAME_BRIDGE_ACTION, AST_LIST_TRAVERSE, BRIDGE_CHANNEL_ACTION_DEFERRED_DISSOLVING, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, ast_bridge::cause, ast_bridge::channels, ast_bridge::dissolved, ast_frame::frametype, and ast_bridge::uniqueid.
Referenced by ast_bridge_destroy(), bridge_channel_dissolve_check(), bridge_dissolve_check_stolen(), and bridge_reconfigured().
|
static |
Definition at line 361 of file bridge.c.
References AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP, AST_BRIDGE_FLAG_DISSOLVE_HANGUP, ast_test_flag, bridge_dissolve(), ast_bridge::dissolved, ast_bridge_features::feature_flags, ast_bridge::feature_flags, ast_bridge_channel::features, ast_bridge::num_channels, and ast_bridge_features::usable.
Referenced by ast_bridge_add_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 | ||
) |
Definition at line 2096 of file bridge.c.
References AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE, ast_bridge_channel_leave_bridge(), ast_bridge_channel_leave_bridge_nolock(), ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_bridge_features_remove(), AST_BRIDGE_HOOK_REMOVE_ON_PULL, ast_bridge_publish_merge(), AST_CAUSE_NORMAL_CLEARING, ast_debug, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_test_flag, ast_bridge_channel::bridge, bridge_channel_change_bridge(), bridge_channel_internal_pull(), bridge_channel_internal_push(), bridge_channel_moving(), BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, BRIDGE_CHANNEL_STATE_WAIT, bridge_reconfigured(), ast_bridge::cause, ast_bridge::channels, ast_bridge_features::feature_flags, ast_bridge_channel::features, ast_bridge_channel::state, and ast_bridge::uniqueid.
Referenced by bridge_merge(), bridge_merge_locked(), try_merge_optimize_out(), and two_bridge_attended_transfer().
int bridge_do_move | ( | struct ast_bridge * | dst_bridge, |
struct ast_bridge_channel * | bridge_channel, | ||
int | attempt_recovery, | ||
unsigned int | optimized | ||
) |
Definition at line 2362 of file bridge.c.
References ao2_ref, ast_bridge_channel_leave_bridge(), ast_bridge_features_remove(), AST_BRIDGE_HOOK_REMOVE_ON_PULL, ast_channel_name(), ast_debug, ast_bridge_channel::bridge, bridge_channel_change_bridge(), bridge_channel_internal_pull(), bridge_channel_internal_push(), bridge_channel_internal_push_full(), bridge_channel_moving(), bridge_channel_settle_owed_events(), BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, BRIDGE_CHANNEL_STATE_WAIT, bridge_reconfigured(), ast_bridge::cause, ast_bridge_channel::chan, ast_bridge_channel::features, ast_bridge_channel::in_bridge, NULL, ast_bridge_channel::state, ast_bridge_channel::swap, and ast_bridge::uniqueid.
Referenced by bridge_move(), bridge_move_locked(), bridge_swap_attended_transfer(), and try_swap_optimize_out().
|
static |
Definition at line 3606 of file bridge.c.
References ast_bridge_hook_dtmf_parms::code, ast_bridge_hook_dtmf::dtmf, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
Referenced by ast_bridge_features_init().
struct ast_bridge_channel* bridge_find_channel | ( | struct ast_bridge * | bridge, |
struct ast_channel * | chan | ||
) |
Definition at line 1469 of file bridge.c.
References AST_LIST_TRAVERSE, ast_bridge_channel::chan, and ast_bridge::channels.
Referenced by ast_bridge_add_channel(), ast_bridge_join(), ast_bridge_kick(), ast_bridge_notify_masquerade(), ast_bridge_remove(), ast_bridge_suspend(), ast_bridge_unsuspend(), bridge_channel_internal_push_full(), bridge_impart_internal(), bridge_merge(), bridge_merge_locked(), bridge_move_locked(), and play_uri().
|
static |
Definition at line 640 of file bridge.c.
References ast_bridge::action_queue, ast_assert, AST_FRAME_BRIDGE_ACTION, ast_frfree, AST_LIST_REMOVE_HEAD, bridge_action_bridge(), and ast_frame::frametype.
Referenced by bridge_manager_service(), and destroy_bridge().
|
static |
Definition at line 3202 of file bridge.c.
References ast_bridge_hook::destructor, and ast_bridge_hook::hook_pvt.
Referenced by bridge_hook_generic().
|
static |
Definition at line 3225 of file bridge.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ast_set_flag, bridge_hook_destroy(), ast_bridge_hook::callback, ast_bridge_hook::destructor, ast_bridge_hook::hook_pvt, and ast_bridge_hook::remove_flags.
Referenced by ast_bridge_dtmf_hook(), ast_bridge_interval_hook(), and bridge_other_hook().
|
static |
Definition at line 1823 of file bridge.c.
References ao2_lock, ao2_ref, ao2_t_bump, ao2_t_cleanup, ao2_unlock, ast_bridge_features_destroy(), ast_bridge_features_new(), AST_BRIDGE_IMPART_CHAN_DEPARTABLE, AST_BRIDGE_IMPART_CHAN_INDEPENDENT, AST_BRIDGE_IMPART_CHAN_MASK, AST_BRIDGE_IMPART_INHIBIT_JOIN_COLP, ast_bridge_lock, ast_bridge_unlock, ast_channel_flags(), ast_channel_internal_bridge_channel_set(), ast_channel_lock, ast_channel_name(), ast_channel_pbx(), ast_channel_unlock, AST_FLAG_ZOMBIE, ast_log, AST_LOG_NOTICE, AST_LOG_WARNING, ast_pthread_create, ast_pthread_create_detached, ast_read_threadstorage_callid(), ast_test_flag, bridge_channel_depart_thread(), bridge_channel_impart_add(), bridge_channel_impart_wait(), bridge_channel_ind_thread(), bridge_channel_internal_alloc(), bridge_find_channel(), ast_bridge_channel::callid, ast_bridge_channel::chan, ast_bridge_channel::depart_wait, ast_bridge_channel::features, ast_bridge_channel::inhibit_colp, NULL, ast_bridge_methods::push_peek, ast_bridge_channel::swap, ast_bridge_channel::thread, ast_bridge::uniqueid, and ast_bridge::v_table.
Referenced by ast_bridge_impart().
|
static |
Definition at line 5009 of file bridge.c.
References ao2_alloc, ao2_ref, ast_cond_init, AST_LIST_HEAD_INIT_NOLOCK, ast_pthread_create, AST_PTHREADT_NULL, bridge_manager_destroy(), bridge_manager_thread(), bridge_manager_controller::cond, NULL, bridge_manager_controller::service_requests, and bridge_manager_controller::thread.
Referenced by ast_bridging_init().
|
static |
Definition at line 4977 of file bridge.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_cond_destroy, ast_cond_signal, ast_debug, ast_free, AST_LIST_REMOVE_HEAD, AST_PTHREADT_NULL, bridge_manager_request::bridge, bridge_manager_controller::cond, NULL, request(), bridge_manager_controller::service_requests, bridge_manager_controller::stop, and bridge_manager_controller::thread.
Referenced by bridge_manager_create().
|
static |
Definition at line 4923 of file bridge.c.
References ast_bridge_lock, ast_bridge_unlock, ast_callid_threadassoc_change(), bridge_handle_actions(), and ast_bridge::callid.
Referenced by bridge_manager_thread().
|
static |
Definition at line 188 of file bridge.c.
References ao2_lock, ao2_ref, ao2_unlock, ast_calloc, ast_cond_signal, AST_LIST_INSERT_TAIL, bridge_manager_request::bridge, bridge_manager_controller::cond, request(), bridge_manager_controller::service_requests, and bridge_manager_controller::stop.
Referenced by bridge_queue_action_nodup().
|
static |
Definition at line 4942 of file bridge.c.
References ao2_lock, ao2_object_get_lockaddr(), ao2_ref, ao2_unlock, ast_cond_wait, ast_free, AST_LIST_REMOVE_HEAD, bridge_manager_request::bridge, bridge_manager_service(), bridge_manager_controller::cond, NULL, request(), bridge_manager_controller::service_requests, and bridge_manager_controller::stop.
Referenced by bridge_manager_create().
|
static |
Definition at line 2201 of file bridge.c.
References AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM, AST_BRIDGE_FLAG_MERGE_INHIBIT_TO, ast_test_flag, merge_direction::dest, NULL, and merge_direction::src.
Referenced by bridge_merge_locked(), and bridges_allow_merge_optimization().
void bridge_merge_inhibit_nolock | ( | struct ast_bridge * | bridge, |
int | request | ||
) |
Definition at line 3052 of file bridge.c.
References ast_assert, ast_bridge::inhibit_merge, and request().
Referenced by ast_bridge_channel_merge_inhibit(), and ast_bridge_merge_inhibit().
|
static |
Definition at line 2264 of file bridge.c.
References ast_bridge::allowed_capabilities, ast_alloca, ast_assert, AST_BRIDGE_CAPABILITY_MULTIMIX, AST_BRIDGE_FLAG_MASQUERADE_ONLY, AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM, AST_BRIDGE_FLAG_MERGE_INHIBIT_TO, AST_BRIDGE_FLAG_SMART, ast_debug, ast_test_flag, bridge_do_merge(), bridge_find_channel(), bridge_merge_determine_direction(), ast_bridge_technology::capabilities, merge_direction::dest, ast_bridge::dissolved, ast_bridge::feature_flags, ast_bridge::inhibit_merge, NULL, ast_bridge::num_channels, merge_direction::src, ast_bridge::technology, and ast_bridge::uniqueid.
Referenced by ast_bridge_merge().
|
static |
Definition at line 2447 of file bridge.c.
References AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE, AST_BRIDGE_FLAG_MASQUERADE_ONLY, ast_channel_name(), ast_debug, ast_test_flag, BRIDGE_CHANNEL_STATE_WAIT, bridge_do_move(), bridge_find_channel(), ast_bridge::dissolved, ast_bridge_features::feature_flags, ast_bridge::feature_flags, ast_bridge_channel::features, ast_bridge::inhibit_merge, ast_bridge_channel::state, ast_bridge_channel::swap, and ast_bridge::uniqueid.
Referenced by ast_bridge_add_channel(), and ast_bridge_move().
|
static |
Definition at line 3294 of file bridge.c.
References ao2_link, ao2_ref, bridge_hook_generic(), ast_bridge_hook::destructor, NULL, ast_bridge_features::other_hooks, type, and ast_bridge_hook::type.
Referenced by ast_bridge_hangup_hook(), ast_bridge_join_hook(), ast_bridge_leave_hook(), ast_bridge_move_hook(), and ast_bridge_talk_detector_hook().
|
static |
Definition at line 5573 of file bridge.c.
References bridge_manager_request::bridge, ast_bridge_methods::name, ast_bridge::num_channels, ast_bridge::uniqueid, and ast_bridge::v_table.
Referenced by ast_bridging_init().
|
static |
Definition at line 296 of file bridge.c.
References ast_bridge::action_queue, ast_bridge_lock, ast_bridge_unlock, ast_debug, AST_LIST_INSERT_TAIL, bridge_manager_service_req(), ast_frame::frametype, ast_frame_subclass::integer, ast_frame::subclass, and ast_bridge::uniqueid.
Referenced by ast_bridge_queue_action(), and smart_bridge_operation().
void bridge_reconfigured | ( | struct ast_bridge * | bridge, |
unsigned int | colp_update | ||
) |
Definition at line 1443 of file bridge.c.
References AST_BRIDGE_FLAG_SMART, ast_bridge_publish_state(), ast_test_flag, bridge_complete_join(), bridge_dissolve(), bridge_reconfigured_connected_line_update(), check_bridge_play_sounds(), ast_bridge::dissolved, ast_bridge::feature_flags, ast_bridge::reconfigured, set_bridge_peer_vars(), and smart_bridge_operation().
Referenced by ast_bridge_notify_masquerade(), bridge_channel_handle_control(), bridge_channel_internal_join(), bridge_channel_wait(), bridge_do_merge(), and bridge_do_move().
|
static |
Definition at line 393 of file bridge.c.
References AST_BRIDGE_CAPABILITY_1TO1MIX, AST_BRIDGE_CAPABILITY_NATIVE, ast_bridge_channel_peer(), ast_bridge_channel_queue_control_data(), ast_channel_caller(), ast_channel_flags(), ast_channel_lock, ast_channel_unlock, ast_check_hangup_locked(), ast_connected_line_build_data(), ast_connected_line_copy_from_caller(), AST_CONTROL_CONNECTED_LINE, AST_FLAG_ZOMBIE, AST_LIST_FIRST, ast_party_connected_line_free(), ast_party_connected_line_init(), ast_test_flag, ast_bridge_technology::capabilities, ast_bridge_channel::chan, ast_bridge::channels, NULL, and ast_bridge::technology.
Referenced by bridge_reconfigured().
struct ast_bridge* bridge_register | ( | struct ast_bridge * | bridge | ) |
Register the new bridge with the system.
bridge | What to register. (Tolerates a NULL pointer) |
bridge | on success. |
NULL | on error. |
Definition at line 709 of file bridge.c.
References ao2_link, ast_bridge_destroy(), ast_bridge_lock, ast_bridge_publish_state(), ast_bridge_unlock, bridge_manager_request::bridge, ast_bridge::construction_completed, and NULL.
Referenced by ast_bridge_base_new(), ast_bridge_basic_new(), bridge_agent_hold_new(), bridge_parking_new(), and bridge_stasis_new().
|
static |
Internal callback function for sending channels in a bridge to the CLI.
Definition at line 5140 of file bridge.c.
References a, ao2_ref, ast_channel_snapshot_get_latest(), ast_cli(), ast_channel_snapshot::base, ast_cli_args::fd, ast_channel_snapshot_base::name, and ast_bridge_snapshot::uniqueid.
Referenced by handle_bridge_show_specific().
|
static |
Definition at line 5048 of file bridge.c.
References OBJ_KEY, OBJ_PARTIAL_KEY, OBJ_POINTER, and ast_bridge::uniqueid.
Referenced by ast_bridging_init().
|
static |
Definition at line 4620 of file bridge.c.
References AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE, ast_bridge_channel_leave_bridge(), ast_bridge_channel_peer(), AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_INVALID, AST_BRIDGE_TRANSFER_SUCCESS, AST_CAUSE_NORMAL_CLEARING, ast_test_flag, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, BRIDGE_CHANNEL_STATE_WAIT, bridge_do_move(), ast_bridge_features::feature_flags, ast_bridge_channel::features, ast_bridge_channel::state, and ast_bridge_channel::swap.
Referenced by two_bridge_attended_transfer().
|
static |
Definition at line 574 of file bridge.c.
References ast_debug, ast_module_unref, ast_bridge::creator, ast_frame::data, ast_bridge_technology::destroy, ast_bridge_technology::mod, ast_bridge_technology::name, ast_bridge::name, ast_frame::ptr, tech_deferred_destroy::tech, tech_deferred_destroy::tech_pvt, ast_bridge::technology, and ast_bridge::uniqueid.
Referenced by bridge_action_bridge().
|
static |
Definition at line 2883 of file bridge.c.
References ast_bridge::allowed_capabilities, AST_BRIDGE_CAPABILITY_MULTIMIX, AST_BRIDGE_FLAG_SMART, ast_test_flag, bridge_merge_determine_direction(), ast_bridge_technology::capabilities, merge_direction::dest, ast_bridge::feature_flags, MERGE_ALLOWED, MERGE_NO_MULTIMIX, MERGE_NOT_ENOUGH_CHANNELS, MERGE_PROHIBITED, ast_bridge::num_channels, merge_direction::src, and ast_bridge::technology.
Referenced by ast_bridges_allow_optimization(), and try_merge_optimize_out().
|
static |
Definition at line 2737 of file bridge.c.
References AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM, AST_BRIDGE_FLAG_SWAP_INHIBIT_TO, AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY, ast_test_flag, ast_bridge::feature_flags, ast_bridge_methods::get_merge_priority, ast_bridge::num_channels, SWAP_PROHIBITED, SWAP_TO_CHAN_BRIDGE, SWAP_TO_PEER_BRIDGE, and ast_bridge::v_table.
Referenced by ast_bridges_allow_optimization(), and try_swap_optimize_out().
|
static |
Definition at line 4063 of file bridge.c.
References ast_channel_name(), CMP_MATCH, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
Referenced by ast_bridge_peers_nolock().
|
static |
Definition at line 4040 of file bridge.c.
References ast_assert, ast_channel_name(), ast_str_hash(), name, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
Referenced by ast_bridge_peers_nolock().
|
static |
Definition at line 1203 of file bridge.c.
References ast_bridge_channel_queue_playfile(), ast_channel_lock, ast_channel_unlock, ast_strdupa, ast_strlen_zero, ast_bridge_channel::chan, NULL, pbx_builtin_getvar_helper(), pbx_builtin_setvar_helper(), and play_file().
Referenced by check_bridge_play_sounds().
|
static |
Definition at line 1233 of file bridge.c.
References AST_LIST_TRAVERSE, ast_bridge::channels, and check_bridge_play_sound().
Referenced by bridge_reconfigured().
|
static |
Definition at line 3793 of file bridge.c.
References 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::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 ast_bridge_set_sfu_video_mode(), ast_bridge_set_single_src_video_mode(), ast_bridge_set_talker_src_video_mode(), and destroy_bridge().
|
static |
Definition at line 5086 of file bridge.c.
References ao2_callback, ast_strlen_zero, complete_bridge_live_search(), NULL, and OBJ_PARTIAL_KEY.
Referenced by handle_bridge_destroy_specific(), handle_bridge_kick_channel(), and handle_bridge_show_specific().
|
static |
Definition at line 5075 of file bridge.c.
References ast_cli_completion_add(), ast_strdup, bridge_manager_request::bridge, CMP_STOP, and ast_bridge::uniqueid.
Referenced by complete_bridge_live().
|
static |
Definition at line 5241 of file bridge.c.
References ao2_ref, ast_bridge_find_by_id(), ast_bridge_lock, ast_bridge_unlock, ast_channel_name(), ast_cli_completion_add(), AST_LIST_TRAVERSE, ast_strdup, bridge_manager_request::bridge, ast_bridge_channel::chan, ast_bridge::channels, and NULL.
Referenced by handle_bridge_kick_channel().
|
static |
Definition at line 5390 of file bridge.c.
References ast_cli_completion_add(), AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_strdup, ast_bridge_technology::name, and NULL.
Referenced by handle_bridge_technology_suspend().
|
static |
Definition at line 658 of file bridge.c.
References ao2_cleanup, ast_assert, ast_bridge_lock, ast_bridge_unlock, ast_debug, AST_LIST_EMPTY, ast_module_unref, ast_string_field_free_memory, AST_VECTOR_FREE, bridge_manager_request::bridge, bridge_handle_actions(), bridge_topics_destroy(), ast_bridge::callid, ast_bridge::channels, cleanup_video_mode(), ast_bridge::construction_completed, ast_bridge::current_snapshot, ast_bridge_technology::destroy, ast_bridge_methods::destroy, ast_bridge::media_types, ast_bridge_technology::mod, ast_bridge_technology::name, ast_bridge_methods::name, NULL, ast_bridge_technology::stop, ast_bridge::technology, ast_bridge::uniqueid, and ast_bridge::v_table.
Referenced by bridge_alloc().
|
static |
Definition at line 1303 of file bridge.c.
References buf.
Referenced by set_bridge_peer_vars_multiparty().
|
static |
Helper function used to find the "best" bridge technology given specified capabilities.
Definition at line 511 of file bridge.c.
References ast_debug, ast_module_running_ref, ast_module_unref, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_bridge_technology::capabilities, ast_bridge_technology::compatible, ast_bridge_technology::mod, ast_bridge_technology::name, NULL, ast_bridge_technology::preference, and ast_bridge_technology::suspended.
Referenced by bridge_base_init(), and smart_bridge_operation().
|
static |
Definition at line 4241 of file bridge.c.
References ao2_cleanup, ao2_iterator_destroy(), ao2_iterator_init(), and ao2_iterator_next.
Referenced by ast_bridge_transfer_attended().
|
static |
Definition at line 5206 of file bridge.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_bridge_destroy(), ast_bridge_find_by_id(), ast_cli(), bridge_manager_request::bridge, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_bridge_live(), ast_cli_args::fd, NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 5269 of file bridge.c.
References ao2_ref, ast_cli_args::argc, ast_cli_args::argv, ast_bridge_channel_queue_callback(), ast_bridge_find_by_id(), ast_bridge_kick(), ast_bridge_lock, ast_bridge_unlock, ast_channel_get_by_name_prefix(), ast_channel_name(), ast_channel_unref, ast_cli(), ast_cli_complete(), AST_LIST_TRAVERSE, bridge_manager_request::bridge, ast_bridge::channels, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_bridge_live(), complete_bridge_participant(), ast_cli_args::fd, kick_it(), NULL, ast_cli_args::pos, ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 5094 of file bridge.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_bridge_get_snapshot(), ast_cli(), ast_format_duration_hh_mm_ss(), ast_tvnow(), bridge_manager_request::bridge, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, ast_bridge_snapshot::creationtime, ast_cli_args::fd, FORMAT_HDR, FORMAT_ROW, NULL, ast_bridge_snapshot::num_channels, S_OR, ast_bridge_snapshot::subclass, ast_bridge_snapshot::technology, ast_bridge_snapshot::uniqueid, and ast_cli_entry::usage.
|
static |
Definition at line 5157 of file bridge.c.
References ao2_callback, ao2_ref, ast_cli_args::argc, ast_cli_args::argv, ast_bridge_get_snapshot_by_uniqueid(), ast_bridge_video_mode_to_string(), ast_cli(), ast_format_duration_hh_mm_ss(), ast_tvnow(), bridge_show_specific_print_channel(), ast_bridge_snapshot::channels, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_bridge_live(), ast_bridge_snapshot::creationtime, ast_bridge_snapshot::creator, ast_cli_args::fd, ast_bridge_snapshot::name, NULL, ast_bridge_snapshot::num_active, ast_bridge_snapshot::num_channels, OBJ_NODATA, ast_cli_args::pos, S_OR, ast_bridge_snapshot::subclass, ast_bridge_snapshot::technology, ast_bridge_snapshot::uniqueid, ast_cli_entry::usage, ast_bridge_snapshot::video_mode, ast_bridge_snapshot::video_source_id, and ast_cli_args::word.
|
static |
Definition at line 5355 of file bridge.c.
References ast_cli(), AST_CLI_YESNO, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_bridge_technology::capabilities, CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, ast_cli_args::fd, FORMAT_HDR, FORMAT_ROW, ast_bridge_technology::name, NULL, ast_bridge_technology::preference, ast_bridge_technology::suspended, tech_capability2str(), type, and ast_cli_entry::usage.
|
static |
Definition at line 5409 of file bridge.c.
References ast_cli_args::argc, ast_cli_args::argv, ast_bridge_technology_suspend(), ast_bridge_technology_unsuspend(), ast_cli(), AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, complete_bridge_technology(), ast_cli_args::fd, ast_bridge_technology::name, NULL, ast_cli_args::pos, suspend(), ast_cli_entry::usage, and ast_cli_args::word.
|
static |
Definition at line 5474 of file bridge.c.
References ast_bridge_technology_suspend(), ast_bridge_technology_unsuspend(), AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_strlen_zero, astman_get_header(), astman_send_ack(), astman_send_error(), ast_bridge_technology::name, and name.
Referenced by manager_bridge_tech_suspend(), and manager_bridge_tech_unsuspend().
|
static |
Definition at line 3508 of file bridge.c.
References ast_test_flag, CMP_MATCH, and ast_bridge_hook::remove_flags.
Referenced by hooks_remove_container().
|
static |
Definition at line 3530 of file bridge.c.
References ao2_callback, hook_remove_match(), OBJ_MULTIPLE, OBJ_NODATA, and OBJ_UNLINK.
Referenced by ast_bridge_features_remove().
|
static |
Definition at line 3546 of file bridge.c.
References ao2_ref, ast_heap_peek(), ast_heap_remove(), ast_heap_size(), ast_heap_unlock, ast_heap_wrlock, ast_test_flag, and ast_bridge_hook::remove_flags.
Referenced by ast_bridge_features_remove().
|
static |
Definition at line 3575 of file bridge.c.
References a, ast_tvcmp(), b, ast_bridge_hook_timer_parms::seqno, ast_bridge_hook_timer::timer, and ast_bridge_hook_timer_parms::trip_time.
Referenced by ast_bridge_features_init().
|
static |
Wrapper for interval hooks that calls into the wrapped hook.
Definition at line 3636 of file bridge.c.
References ast_bridge_hook::callback, ast_bridge_hook_timer::generic, and ast_bridge_hook::hook_pvt.
Referenced by wrap_hook().
|
static |
Destructor for the hook wrapper.
Definition at line 3644 of file bridge.c.
References ao2_cleanup.
Referenced by wrap_hook().
|
static |
Definition at line 2020 of file bridge.c.
References ast_bridge_channel_kick(), and AST_CAUSE_NORMAL_CLEARING.
Referenced by ast_bridge_kick(), and handle_bridge_kick_channel().
|
static |
Definition at line 5518 of file bridge.c.
References ast_free, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, ast_str_buffer(), ast_str_create, ast_str_set(), ast_strlen_zero, AST_YESNO, astman_append(), astman_get_header(), astman_send_error(), astman_send_list_complete_end(), astman_send_list_complete_start(), astman_send_listack(), ast_bridge_technology::capabilities, ast_bridge_technology::name, ast_bridge_technology::preference, RAII_VAR, ast_bridge_technology::suspended, tech_capability2str(), and type.
Referenced by ast_bridging_init().
|
static |
Definition at line 5508 of file bridge.c.
References handle_manager_bridge_tech_suspend().
Referenced by ast_bridging_init().
|
static |
Definition at line 5513 of file bridge.c.
References handle_manager_bridge_tech_suspend().
Referenced by ast_bridging_init().
|
static |
Callback for merging hook ao2_containers.
Definition at line 3629 of file bridge.c.
References ao2_link.
Referenced by ast_bridge_features_merge().
|
static |
Definition at line 2627 of file bridge.c.
References ast_bridge_channel::activity, ast_bridge_channel_trylock, ast_bridge_channel_unlock, ast_bridge_trylock, ast_bridge_unlock, ast_channel_flags(), ast_channel_has_audio_frame_or_monitor(), ast_channel_internal_bridge_channel(), ast_channel_readq(), AST_FLAG_EMULATE_DTMF, AST_LIST_EMPTY, ast_test_flag, ast_bridge_channel::bridge, bridge_manager_request::bridge, bridge_allows_optimization(), bridge_channel_internal_allows_optimization(), BRIDGE_CHANNEL_STATE_WAIT, BRIDGE_CHANNEL_THREAD_SIMPLE, NULL, and ast_bridge_channel::state.
Referenced by ast_bridge_unreal_optimize_out().
|
static |
Definition at line 2672 of file bridge.c.
References ast_bridge_channel::activity, ast_bridge_channel_trylock, ast_bridge_channel_unlock, ast_bridge_trylock, ast_bridge_unlock, ast_channel_flags(), ast_channel_has_audio_frame_or_monitor(), ast_channel_internal_bridge_channel(), ast_channel_readq(), ast_channel_trylock, ast_channel_unlock, AST_FLAG_EMULATE_DTMF, AST_LIST_EMPTY, ast_test_flag, ast_bridge_channel::bridge, bridge_manager_request::bridge, bridge_allows_optimization(), bridge_channel_internal_allows_optimization(), BRIDGE_CHANNEL_STATE_WAIT, BRIDGE_CHANNEL_THREAD_IDLE, NULL, and ast_bridge_channel::state.
Referenced by ast_bridge_unreal_optimize_out().
|
static |
Definition at line 1426 of file bridge.c.
References AST_BRIDGE_CAPABILITY_HOLDING, AST_LIST_FIRST, AST_LIST_LAST, ast_bridge_technology::capabilities, ast_bridge::channels, ast_bridge::num_channels, set_bridge_peer_vars_2party(), set_bridge_peer_vars_holding(), set_bridge_peer_vars_multiparty(), and ast_bridge::technology.
Referenced by bridge_reconfigured().
|
static |
Definition at line 1263 of file bridge.c.
References ast_bridge_vars_set(), ast_channel_lock, ast_channel_unlock, NULL, and UPDATE_BRIDGE_VARS_GET.
Referenced by set_bridge_peer_vars().
|
static |
Definition at line 1404 of file bridge.c.
References ast_bridge_vars_set(), ast_channel_lock, ast_channel_unlock, AST_LIST_TRAVERSE, ast_bridge_channel::chan, ast_bridge::channels, and NULL.
Referenced by set_bridge_peer_vars().
|
static |
Definition at line 1342 of file bridge.c.
References ast_alloca, ast_bridge_vars_set(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, AST_LIST_TRAVERSE, ast_strdupa, buf, ast_bridge_channel::chan, ast_bridge::channels, fill_bridgepeer_buf(), len(), MAX_BRIDGEPEER_CHANS, MIN, NULL, and ast_bridge::num_channels.
Referenced by set_bridge_peer_vars().
|
static |
Definition at line 4435 of file bridge.c.
References ao2_cleanup, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ast_bridge_set_transfer_variables(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_strdupa, pbx_builtin_getvar_helper(), and S_OR.
Referenced by ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), and two_bridge_attended_transfer().
|
static |
Definition at line 998 of file bridge.c.
References ast_bridge::allowed_capabilities, AST_BRIDGE_CAPABILITY_1TO1MIX, AST_BRIDGE_CAPABILITY_MULTIMIX, AST_BRIDGE_CAPABILITY_NATIVE, AST_BRIDGE_CHANNEL_FLAG_LONELY, ast_channel_name(), ast_debug, AST_FRAME_BRIDGE_ACTION, ast_frdup, AST_LIST_INSERT_TAIL, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, ast_module_unref, ast_test_flag, ast_verb, BRIDGE_CHANNEL_ACTION_DEFERRED_TECH_DESTROY, bridge_channel_complete_join(), bridge_queue_action_nodup(), ast_bridge_technology::capabilities, ast_bridge_channel::chan, ast_bridge::channels, ast_bridge_technology::compatible, ast_bridge_technology::create, ast_bridge::creator, deferred_action(), ast_bridge_technology::destroy, ast_bridge::dissolved, ast_bridge_features::feature_flags, ast_bridge_channel::features, find_best_technology(), ast_frame::frametype, ast_bridge_channel::just_joined, ast_bridge_technology::leave, LOG_WARNING, ast_bridge_technology::mod, ast_bridge_technology::name, ast_bridge::name, NULL, ast_bridge::num_active, ast_bridge::num_channels, ast_bridge::num_lonely, ast_bridge_technology::start, ast_bridge_technology::stop, ast_bridge_channel::suspended, tech_deferred_destroy::tech, ast_bridge::tech_pvt, ast_bridge::technology, and ast_bridge::uniqueid.
Referenced by bridge_reconfigured().
|
static |
Bridge technology capabilities to string.
Definition at line 5335 of file bridge.c.
References AST_BRIDGE_CAPABILITY_1TO1MIX, AST_BRIDGE_CAPABILITY_EARLY, AST_BRIDGE_CAPABILITY_HOLDING, AST_BRIDGE_CAPABILITY_MULTIMIX, AST_BRIDGE_CAPABILITY_NATIVE, and type.
Referenced by handle_bridge_technology_show(), and manager_bridge_tech_list().
|
static |
Definition at line 2917 of file bridge.c.
References ARRAY_LEN, ast_atomic_fetchadd_int(), ast_channel_internal_bridge(), ast_channel_name(), ast_debug, ast_set_flag, ast_test_flag, AST_UNREAL_CHAN, AST_UNREAL_OPTIMIZE_BEGUN, AST_UNREAL_OWNER, ast_verb, bridge_do_merge(), bridges_allow_merge_optimization(), ast_unreal_pvt::callbacks, ast_bridge_channel::chan, merge_direction::dest, id, MERGE_ALLOWED, MERGE_NO_MULTIMIX, MERGE_NOT_ENOUGH_CHANNELS, MERGE_PROHIBITED, NULL, ast_unreal_pvt_callbacks::optimization_finished, optimization_id, ast_unreal_pvt_callbacks::optimization_started, ast_unreal_pvt::owner, merge_direction::src, and ast_bridge::uniqueid.
Referenced by ast_bridge_unreal_optimize_out().
|
static |
Definition at line 4378 of file bridge.c.
References ao2_cleanup, AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_SUCCESS, ast_channel_get_bridge_channel(), ast_channel_lock, ast_channel_unlock, ast_parking_blind_transfer_park(), ast_parking_provider_registered(), NULL, and RAII_VAR.
Referenced by ast_bridge_transfer_blind().
|
static |
Definition at line 2793 of file bridge.c.
References ast_atomic_fetchadd_int(), ast_bridge_channel_leave_bridge(), ast_bridge_channel_peer(), AST_CAUSE_NORMAL_CLEARING, ast_channel_name(), ast_channel_trylock, ast_channel_unlock, ast_set_flag, ast_test_flag, AST_UNREAL_CHAN, AST_UNREAL_OPTIMIZE_BEGUN, AST_UNREAL_OWNER, ast_verb, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, BRIDGE_CHANNEL_STATE_WAIT, bridge_do_move(), bridges_allow_swap_optimization(), ast_unreal_pvt::callbacks, ast_bridge_channel::chan, id, ast_unreal_pvt_callbacks::optimization_finished, optimization_id, ast_unreal_pvt_callbacks::optimization_started, ast_unreal_pvt::owner, ast_bridge_channel::state, ast_bridge_channel::swap, SWAP_PROHIBITED, SWAP_TO_CHAN_BRIDGE, and SWAP_TO_PEER_BRIDGE.
Referenced by ast_bridge_unreal_optimize_out().
|
static |
Definition at line 4663 of file bridge.c.
References ao2_cleanup, ARRAY_LEN, ast_attended_transfer_message_add_merge(), 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, ast_bridge_peers_nolock(), AST_BRIDGE_TRANSFER_FAIL, AST_BRIDGE_TRANSFER_INVALID, AST_BRIDGE_TRANSFER_SUCCESS, ast_bridges_allow_optimization(), attended_transfer_bridge(), bridge_do_merge(), bridge_swap_attended_transfer(), channels, ast_bridge::dissolved, end, ast_bridge::inhibit_merge, NULL, RAII_VAR, and set_transfer_variables_all().
Referenced by ast_bridge_transfer_attended().
|
static |
Wrap the provided interval hook and add it to features.
Definition at line 3650 of file bridge.c.
References ao2_bump, ast_bridge_interval_hook(), ast_bridge_hook::callback, ast_flags::flags, ast_bridge_hook_timer_parms::flags, ast_bridge_hook_timer::generic, ast_bridge_hook::hook_pvt, ast_bridge_hook_timer_parms::interval, interval_wrapper_cb(), interval_wrapper_pvt_dtor(), ast_bridge_hook::remove_flags, and ast_bridge_hook_timer::timer.
Referenced by ast_bridge_features_merge().
struct ast_bridge_methods ast_bridge_base_v_table |
Bridge base class virtual method table.
Definition at line 949 of file bridge.c.
Referenced by ast_bridging_init_basic(), bridge_agent_hold_dissolving(), bridge_agent_hold_pull(), bridge_agent_hold_push(), bridge_basic_destroy(), bridge_basic_pull(), bridge_basic_push(), bridge_init_agent_hold(), bridge_parking_destroy(), bridge_parking_dissolving(), bridge_parking_get_merge_priority(), bridge_parking_notify_masquerade(), bridge_parking_pull(), bridge_parking_push(), bridge_stasis_init(), bridge_stasis_pull(), bridge_stasis_push(), and bridge_stasis_push_peek().
|
static |
|
static |
|
static |
|
static |
|
static |
All bridges container.
Definition at line 123 of file bridge.c.
Referenced by app_to_json(), ast_ari_bridges_list(), bridges_scrape_cb(), manager_bridges_list(), and stasis_app_to_cli().
|
static |
Default DTMF keys for built in features
Definition at line 144 of file bridge.c.
Referenced by ast_bridge_features_enable(), and ast_bridge_features_register().
|
static |
Function handlers for the built in features
Definition at line 147 of file bridge.c.
Referenced by ast_bridge_features_do(), ast_bridge_features_enable(), ast_bridge_features_register(), and ast_bridge_features_unregister().
|
static |
Function handlers for built in interval features
Definition at line 150 of file bridge.c.
Referenced by ast_bridge_features_set_limits(), ast_bridge_interval_register(), and ast_bridge_interval_unregister().
|
static |
Definition at line 127 of file bridge.c.
Referenced by try_merge_optimize_out(), and try_swap_optimize_out().