65 #ifndef _ASTERISK_BRIDGING_H 66 #define _ASTERISK_BRIDGING_H 68 #if defined(__cplusplus) || defined(c_plusplus) 351 struct timeval creationtime;
412 struct ast_vector_int media_types;
416 struct timeval creationtime;
467 #define ast_bridge_trylock(bridge) _ast_bridge_trylock(bridge, __FILE__, __PRETTY_FUNCTION__, __LINE__, #bridge) 480 #define ast_bridge_lock(bridge) _ast_bridge_lock(bridge, __FILE__, __PRETTY_FUNCTION__, __LINE__, #bridge) 493 #define ast_bridge_unlock(bridge) _ast_bridge_unlock(bridge, __FILE__, __PRETTY_FUNCTION__, __LINE__, #bridge) 500 #define ast_bridge_lock_both(bridge1, bridge2) \ 503 ast_bridge_lock(bridge1); \ 504 if (!ast_bridge_trylock(bridge2)) { \ 507 ast_bridge_unlock(bridge1); \ 1300 #if defined(__cplusplus) || defined(c_plusplus)
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
struct ao2_container * channels
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan)
Remove a channel from a bridge.
struct ao2_container * ast_bridges(void)
Returns the global bridges container.
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.
enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_transferee, struct ast_channel *to_transfer_target)
Attended transfer.
ast_bridge_video_mode_type
Video source modes.
void ast_bridge_set_binaural_active(struct ast_bridge *bridge, unsigned int binaural_active)
Activates the use of binaural signals in a 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.
void ast_bridge_vars_set(struct ast_channel *chan, const char *name, const char *pvtid)
Sets BRIDGECHANNEL and BRIDGEPVTCALLID for a channel.
struct ast_bridge * ast_bridge_find_by_id(const char *bridge_id)
Find bridge by id.
unsigned int remb_send_interval
Structure that contains features information.
int(* ast_bridge_push_channel_fn)(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
Push this channel into the bridge.
ast_bridge_hook_remove_flags
unsigned int internal_mixing_interval
The mixing interval indicates how quickly softmix mixing should occur to mix audio.
Convenient Signal Processing routines.
void(* ast_bridge_dissolving_fn)(struct ast_bridge *self)
The bridge is being dissolved.
int __ao2_lock(void *a, enum ao2_lock_req lock_how, const char *file, const char *func, int line, const char *var)
Lock an object.
int ast_bridge_unsuspend(struct ast_bridge *bridge, struct ast_channel *chan)
Unsuspend a channel from a bridge.
Structure that contains a snapshot of information about a bridge.
unsigned int reconfigured
struct ast_channel * chan_old_vsrc
int ast_bridge_queue_action(struct ast_bridge *bridge, struct ast_frame *action)
Put an action onto the specified bridge.
struct ast_channel * chan_vsrc
Universally unique identifier support.
This is used for both SINGLE_SRC_TALKER mode to set what channel should be the current single video f...
int __ao2_unlock(void *a, const char *file, const char *func, int line, const char *var)
Unlock an object.
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.
int ast_bridge_destroy(struct ast_bridge *bridge, int cause)
Destroy a bridge.
ast_bridge_dissolving_fn dissolving
Data structure that defines a video source mode.
#define AST_DECLARE_STRING_FIELDS(field_list)
Declare the fields needed in a structure.
static void _ast_bridge_unlock(struct ast_bridge *bridge, const char *file, const char *function, int line, const char *var)
unsigned int inhibit_merge
Count of the active temporary requests to inhibit bridge merges. Zero if merges are allowed...
int ast_bridge_queue_everyone_else(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
Queue the given frame to everyone else.
ast_bridge_capability
Capabilities for a bridge technology.
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.
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.
struct ast_bridge_methods ast_bridge_base_v_table
Bridge base class virtual method table.
int(* ast_bridge_merge_priority_fn)(struct ast_bridge *self)
Get the merge priority of this bridge.
struct ast_bridge_technology * technology
void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame)
Update information about talker energy for talker src video mode.
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.
struct ast_bridge * ast_bridge_transfer_acquire_bridge(struct ast_channel *chan)
Acquire the channel's bridge for transfer purposes.
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.
Channel Bridging Roles API.
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.
int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags) attribute_warn_unused_result
Impart a channel to a bridge (non-blocking)
ast_bridge_notify_masquerade_fn notify_masquerade
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.
static void _ast_bridge_lock(struct ast_bridge *bridge, const char *file, const char *function, int line, const char *var)
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.
void ast_bridge_merge_inhibit(struct ast_bridge *bridge, int request)
Adjust the bridge merge inhibit request count.
#define AST_STRING_FIELD(name)
Declare a string field.
static struct channel_usage channels
AST_LIST_HEAD_NOLOCK(contactliststruct, contact)
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.
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...
struct ast_channel * chan
void(* ast_bridge_pull_channel_fn)(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
Pull this channel from the bridge.
const struct ast_bridge_methods * v_table
struct ao2_container * ast_bridge_peers(struct ast_bridge *bridge)
Get a container of all channels in the bridge.
struct ast_bridge_snapshot * current_snapshot
Structure that contains information about a bridge.
static int _ast_bridge_trylock(struct ast_bridge *bridge, const char *file, const char *function, int line, const char *var)
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.
int __ao2_trylock(void *a, enum ao2_lock_req lock_how, const char *file, const char *func, int line, const char *var)
Try locking– (don't block if fail)
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.
int ast_bridge_depart(struct ast_channel *chan)
Depart a channel from a bridge.
The base pvt structure for local channel derivatives.
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.
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 virtual methods table definition.
int ast_bridge_kick(struct ast_bridge *bridge, struct ast_channel *chan)
Kick a channel from a bridge.
struct ao2_container * ast_bridge_peers_nolock(struct ast_bridge *bridge)
Get a container of all channels in the bridge.
void ast_bridge_notify_masquerade(struct ast_channel *chan)
Notify bridging that this channel was just masqueraded.
ast_bridge_merge_priority_fn get_merge_priority
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...
#define attribute_warn_unused_result
void(* ast_bridge_destructor_fn)(struct ast_bridge *self)
Destroy the bridge.
unsigned int video_update_discard
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.
static int request(void *obj)
struct ast_channel * swap
void ast_bridge_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags flags)
Remove marked bridge channel feature hooks.
unsigned int num_channels
Structure used to handle boolean flags.
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)
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.
unsigned int send_sdp_label
int average_talking_energy
Structure that contains information regarding a channel in a bridge.
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.
ast_bridge_push_channel_fn push_peek
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.
This is used for selective forwarding unit configuration.
int ast_bridge_suspend(struct ast_bridge *bridge, struct ast_channel *chan)
Suspend a channel temporarily from a bridge.
This is used for both SINGLE_SRC mode to set what channel should be the current single video feed...
ast_bridge_video_sfu_remb_behavior
REMB report behaviors.
Structure that is the essence of a bridge technology.
struct ast_channel * chan_vsrc
AO2 object that wraps data for transfer_channel_cb.
Data structure associated with a single frame of data.
struct stasis_topic * topic
void(* transfer_channel_cb)(struct ast_channel *chan, struct transfer_channel_data *user_data, enum ast_transfer_type transfer_type)
Callback function type called during blind transfers.
ast_bridge_pull_channel_fn pull
ast_bridge_destructor_fn destroy
ast_bridge_push_channel_fn push
static char context[AST_MAX_CONTEXT]
const ast_string_field creator
ast_bridge_optimization
Tells, if optimization is allowed, how the optimization would be performed.
unsigned int internal_sample_rate
The internal sample rate softmix uses to mix channels.
Structure specific to bridge technologies capable of performing talking optimizations.
uint32_t allowed_capabilities
unsigned int maximum_sample_rate
The maximum sample rate softmix uses to mix channels.
unsigned int num_channels
int ast_bridge_number_video_src(struct ast_bridge *bridge)
Returns the number of video sources currently active in the bridge.
void(* ast_bridge_notify_masquerade_fn)(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
Notify the bridge that this channel was just masqueraded.
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.
unsigned int construction_completed
unsigned int binaural_active