Asterisk - The Open Source Telephony Project
18.5.0
|
Bridging Channel API. More...
#include "asterisk.h"
#include <signal.h>
#include "asterisk/heap.h"
#include "asterisk/alertpipe.h"
#include "asterisk/astobj2.h"
#include "asterisk/stringfields.h"
#include "asterisk/app.h"
#include "asterisk/pbx.h"
#include "asterisk/channel.h"
#include "asterisk/timing.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_channel.h"
#include "asterisk/bridge_after.h"
#include "asterisk/bridge_channel_internal.h"
#include "asterisk/bridge_internal.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/musiconhold.h"
#include "asterisk/features_config.h"
#include "asterisk/parking.h"
#include "asterisk/causes.h"
#include "asterisk/test.h"
#include "asterisk/sem.h"
#include "asterisk/stream.h"
#include "asterisk/message.h"
Go to the source code of this file.
Data Structures | |
struct | blind_transfer_data |
Data specifying where a blind transfer is going to. More... | |
struct | bridge_custom_callback |
struct | bridge_park |
struct | bridge_playfile |
struct | bridge_run_app |
struct | bridge_sync |
Synchronous bridge action object. More... | |
struct | sync_payload |
Frame payload for synchronous bridge actions. More... | |
struct | sync_structs |
List holding active synchronous action objects. More... | |
Macros | |
#define | PLAYBACK_TIMEOUT (600 * 1000) |
Failsafe for synchronous bridge action waiting. More... | |
Typedefs | |
typedef int(* | ast_bridge_channel_post_action_data) (struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen) |
Used to queue an action frame onto a bridge channel and write an action frame into a bridge. More... | |
Functions | |
static void | after_bridge_move_channel (struct ast_channel *chan_bridged, void *data) |
static void | after_bridge_move_channel_fail (enum ast_bridge_after_cb_reason reason, void *data) |
void | ast_bridge_channel_feature_digit (struct ast_bridge_channel *bridge_channel, int digit) |
Add a DTMF digit to the collected digits to match against DTMF features. More... | |
void | ast_bridge_channel_feature_digit_add (struct ast_bridge_channel *bridge_channel, int digit) |
Add a DTMF digit to the collected digits. More... | |
struct ast_channel * | ast_bridge_channel_get_chan (struct ast_bridge_channel *bridge_channel) |
Get a ref to the bridge_channel's ast_channel. More... | |
void | ast_bridge_channel_kick (struct ast_bridge_channel *bridge_channel, int cause) |
Kick the channel out of the bridge. More... | |
void | ast_bridge_channel_leave_bridge (struct ast_bridge_channel *bridge_channel, enum bridge_channel_state new_state, int cause) |
Set bridge channel state to leave bridge (if not leaving already). More... | |
void | ast_bridge_channel_leave_bridge_nolock (struct ast_bridge_channel *bridge_channel, enum bridge_channel_state new_state, int cause) |
Set bridge channel state to leave bridge (if not leaving already). More... | |
void | ast_bridge_channel_lock_bridge (struct ast_bridge_channel *bridge_channel) |
Lock the bridge associated with the bridge channel. More... | |
struct ast_bridge * | ast_bridge_channel_merge_inhibit (struct ast_bridge_channel *bridge_channel, int request) |
Adjust the bridge_channel's bridge merge inhibit request count. More... | |
int | ast_bridge_channel_notify_talking (struct ast_bridge_channel *bridge_channel, int started_talking) |
Lets the bridging indicate when a bridge channel has stopped or started talking. More... | |
struct ast_bridge_channel * | ast_bridge_channel_peer (struct ast_bridge_channel *bridge_channel) |
Get the peer bridge channel of a two party bridge. More... | |
void | ast_bridge_channel_playfile (struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class) |
Play a file on the bridge channel. More... | |
int | ast_bridge_channel_queue_app (struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class) |
Queue a bridge action run application frame onto the bridge channel. More... | |
int | ast_bridge_channel_queue_callback (struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_custom_callback_option flags, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size) |
Queue a bridge action custom callback frame onto the bridge channel. More... | |
int | ast_bridge_channel_queue_control_data (struct ast_bridge_channel *bridge_channel, enum ast_control_frame_type control, const void *data, size_t datalen) |
Queue a control frame onto the bridge channel with data. More... | |
int | ast_bridge_channel_queue_frame (struct ast_bridge_channel *bridge_channel, struct ast_frame *fr) |
Write a frame to the specified bridge_channel. More... | |
int | ast_bridge_channel_queue_playfile (struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class) |
Queue a bridge action play file frame onto the bridge channel. More... | |
int | ast_bridge_channel_queue_playfile_sync (struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class) |
Synchronously queue a bridge action play file frame onto the bridge channel. More... | |
void | ast_bridge_channel_restore_formats (struct ast_bridge_channel *bridge_channel) |
Restore the formats of a bridge channel's channel to how they were before bridge_channel_internal_join. More... | |
void | ast_bridge_channel_run_app (struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class) |
Run an application on the bridge channel. More... | |
void | ast_bridge_channel_stream_map (struct ast_bridge_channel *bridge_channel) |
Maps a channel's stream topology to and from the bridge. More... | |
void | ast_bridge_channel_update_accountcodes (struct ast_bridge_channel *joining, struct ast_bridge_channel *leaving) |
void | ast_bridge_channel_update_linkedids (struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap) |
int | ast_bridge_channel_write_app (struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class) |
Write a bridge action run application frame into the bridge. More... | |
int | ast_bridge_channel_write_callback (struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_custom_callback_option flags, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size) |
Write a bridge action custom callback frame into the bridge. More... | |
int | ast_bridge_channel_write_control_data (struct ast_bridge_channel *bridge_channel, enum ast_control_frame_type control, const void *data, size_t datalen) |
Write a control frame into the bridge with data. More... | |
int | ast_bridge_channel_write_hold (struct ast_bridge_channel *bridge_channel, const char *moh_class) |
Write a hold frame into the bridge. More... | |
int | ast_bridge_channel_write_park (struct ast_bridge_channel *bridge_channel, const char *parkee_uuid, const char *parker_uuid, const char *app_data) |
Have a bridge channel park a channel in the bridge. More... | |
int | ast_bridge_channel_write_playfile (struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class) |
Write a bridge action play file frame into the bridge. More... | |
int | ast_bridge_channel_write_unhold (struct ast_bridge_channel *bridge_channel) |
Write an unhold frame into the bridge. More... | |
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. More... | |
static void | bridge_channel_attended_transfer (struct ast_bridge_channel *bridge_channel, const char *target_chan_name) |
static void | bridge_channel_blind_transfer (struct ast_bridge_channel *bridge_channel, struct blind_transfer_data *blind_data) |
static void | bridge_channel_cancel_owed_events (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_destroy (void *obj) |
static void | bridge_channel_dissolve_check (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_do_callback (struct ast_bridge_channel *bridge_channel, struct bridge_custom_callback *data) |
static void | bridge_channel_dtmf_stream (struct ast_bridge_channel *bridge_channel, const char *dtmf) |
Internal function that plays back DTMF on a bridge channel. More... | |
static void | bridge_channel_event_join_leave (struct ast_bridge_channel *bridge_channel, enum ast_bridge_hook_type type) |
static int | bridge_channel_feature_digit_add (struct ast_bridge_channel *bridge_channel, int digit, size_t dtmf_len) |
static unsigned int | bridge_channel_feature_digit_timeout (struct ast_bridge_channel *bridge_channel) |
static int | bridge_channel_feature_timeout (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_handle_action (struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, void *data) |
static void | bridge_channel_handle_control (struct ast_bridge_channel *bridge_channel, struct ast_frame *fr) |
static void | bridge_channel_handle_feature_timeout (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_handle_interval (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_handle_write (struct ast_bridge_channel *bridge_channel) |
struct ast_bridge_channel * | bridge_channel_internal_alloc (struct ast_bridge *bridge) |
int | bridge_channel_internal_allows_optimization (struct ast_bridge_channel *bridge_channel) |
int | bridge_channel_internal_join (struct ast_bridge_channel *bridge_channel) |
void | bridge_channel_internal_pull (struct ast_bridge_channel *bridge_channel) |
int | bridge_channel_internal_push (struct ast_bridge_channel *bridge_channel) |
int | bridge_channel_internal_push_full (struct ast_bridge_channel *bridge_channel, int optimized) |
int | bridge_channel_internal_queue_attended_transfer (struct ast_channel *transferee, struct ast_channel *unbridged_chan) |
int | bridge_channel_internal_queue_blind_transfer (struct ast_channel *transferee, const char *exten, const char *context, transfer_channel_cb new_channel_cb, void *user_data) |
void | bridge_channel_internal_suspend_nolock (struct ast_bridge_channel *bridge_channel) |
void | bridge_channel_internal_unsuspend_nolock (struct ast_bridge_channel *bridge_channel) |
static int | bridge_channel_next_interval (struct ast_bridge_channel *bridge_channel) |
static int | bridge_channel_next_timeout (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_park (struct ast_bridge_channel *bridge_channel, struct bridge_park *payload) |
static void | bridge_channel_playfile (struct ast_bridge_channel *bridge_channel, struct bridge_playfile *payload) |
static void | bridge_channel_poke (struct ast_bridge_channel *bridge_channel) |
static int | bridge_channel_queue_action_data (struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen) |
static int | bridge_channel_queue_action_data_sync (struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen) |
void | bridge_channel_queue_deferred_frames (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_run_app (struct ast_bridge_channel *bridge_channel, struct bridge_run_app *data) |
void | bridge_channel_settle_owed_events (struct ast_bridge *orig_bridge, struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_suspend (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_talking (struct ast_bridge_channel *bridge_channel, int talking) |
static void | bridge_channel_unsuspend (struct ast_bridge_channel *bridge_channel) |
static void | bridge_channel_update_accountcodes_joining (struct ast_bridge_channel *joining, struct ast_bridge_channel *swap) |
static void | bridge_channel_update_accountcodes_leaving (struct ast_bridge_channel *leaving) |
static void | bridge_channel_wait (struct ast_bridge_channel *bridge_channel) |
static int | bridge_channel_write_action_data (struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen) |
static int | bridge_channel_write_dtmf_stream (struct ast_bridge_channel *bridge_channel, const char *dtmf) |
static int | bridge_channel_write_frame (struct ast_bridge_channel *bridge_channel, struct ast_frame *frame) |
static void | bridge_frame_free (struct ast_frame *frame) |
static struct ast_frame * | bridge_handle_dtmf (struct ast_bridge_channel *bridge_channel, struct ast_frame *frame) |
Internal function to handle DTMF from a channel. More... | |
static void | bridge_handle_trip (struct ast_bridge_channel *bridge_channel) |
static void | bridge_sync_cleanup (struct bridge_sync *sync_struct) |
Clean up a syncrhonization bridge object. More... | |
static void | bridge_sync_init (struct bridge_sync *sync_struct, unsigned int id) |
initialize a synchronous bridge object. More... | |
static void | bridge_sync_signal (struct bridge_sync *sync_struct) |
Signal that waiting for a synchronous bridge action is no longer necessary. More... | |
static void | bridge_sync_wait (struct bridge_sync *sync_struct) |
Wait for a synchronous bridge action to complete. More... | |
static void | channel_fill_empty_accountcode (struct ast_channel *dest, struct ast_channel *src) |
static void | channel_fill_empty_peeraccount (struct ast_channel *dest, struct ast_channel *src) |
static int | channel_set_cause (struct ast_channel *chan, int cause) |
static void | channel_set_empty_accountcodes (struct ast_channel *c0, struct ast_channel *c1) |
static void | channel_update_peeraccount (struct ast_channel *dest, struct ast_channel *src) |
static void | channel_update_peeraccounts (struct ast_channel *c0, struct ast_channel *c1) |
static int | payload_helper_app (ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class) |
static int | payload_helper_cb (ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_custom_callback_option flags, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size) |
static int | payload_helper_park (ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, const char *parkee_uuid, const char *parker_uuid, const char *app_data) |
static int | payload_helper_playfile (ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class) |
static int | run_app_helper (struct ast_channel *chan, const char *app_name, const char *app_args) |
static void | sendtext_safe (struct ast_channel *chan, const struct ast_frame *f) |
static void | testsuite_notify_feature_success (struct ast_channel *chan, const char *dtmf) |
Variables | |
static const char * | controls [] |
static int | sync_ids |
Counter used for assigning synchronous bridge action IDs. More... | |
static struct sync_structs | sync_structs = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
Bridging Channel API.
Definition in file bridge_channel.c.
#define PLAYBACK_TIMEOUT (600 * 1000) |
Failsafe for synchronous bridge action waiting.
When waiting for a synchronous bridge action to complete, if there is a frame resource leak somewhere, it is possible that we will never get notified that the synchronous action completed.
If a significant amount of time passes, then we will abandon waiting for the synchrnous bridge action to complete.
This constant represents the number of milliseconds we will wait for the bridge action to complete.
Definition at line 178 of file bridge_channel.c.
Referenced by bridge_sync_wait().
typedef int(* ast_bridge_channel_post_action_data) (struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen) |
Used to queue an action frame onto a bridge channel and write an action frame into a bridge.
bridge_channel | Which channel work with. |
action | Type of bridge action frame. |
data | Frame payload data to pass. |
datalen | Frame payload data length to pass. |
0 | on success. |
-1 | on error. |
Definition at line 73 of file bridge_channel.c.
|
static |
Definition at line 1943 of file bridge_channel.c.
References ao2_cleanup, ast_alloca, ast_channel_caller(), ast_channel_connected(), ast_channel_connected_indicated(), ast_channel_lock, ast_channel_move(), ast_channel_queue_connected_line_update(), ast_channel_unlock, ast_connected_line_build_data(), ast_connected_line_copy_from_caller(), AST_CONTROL_READ_ACTION, AST_FRAME_READ_ACTION_CONNECTED_LINE_MACRO, ast_party_connected_line_copy(), ast_party_connected_line_free(), ast_party_connected_line_init(), ast_party_id_reset(), ast_queue_control_data(), ast_softhangup(), AST_SOFTHANGUP_DEV, frame_size, NULL, ast_control_read_action_payload::payload_size, ast_party_connected_line::priv, and RAII_VAR.
Referenced by bridge_channel_attended_transfer().
|
static |
Definition at line 2003 of file bridge_channel.c.
References ao2_cleanup, ast_bridge_after_cb_reason_string(), ast_log, ast_softhangup(), AST_SOFTHANGUP_DEV, LOG_WARNING, and RAII_VAR.
Referenced by bridge_channel_attended_transfer().
void ast_bridge_channel_feature_digit | ( | struct ast_bridge_channel * | bridge_channel, |
int | digit | ||
) |
Add a DTMF digit to the collected digits to match against DTMF features.
bridge_channel | Channel that received a DTMF digit. |
digit | DTMF digit to add to collected digits or 0 for timeout event. |
clear_digits | clear the digits array prior to calling hooks |
Definition at line 1762 of file bridge_channel.c.
References ao2_find, ao2_ref, ao2_unlink, ARRAY_LEN, ast_bridge_channel_kick(), ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_channel_name(), ast_check_hangup_locked(), AST_CONTROL_SRCUPDATE, ast_debug, ast_indicate(), ast_samp2tv(), ast_test_suite_event_notify, ast_tvadd(), ast_tvnow(), ast_bridge_channel::bridge, bridge_channel_feature_digit_add(), bridge_channel_feature_digit_timeout(), bridge_channel_internal_suspend_nolock(), bridge_channel_unsuspend(), bridge_channel_write_dtmf_stream(), ast_bridge_hook::callback, ast_bridge_channel::chan, ast_bridge_hook_dtmf_parms::code, ast_bridge_channel::collected, ast_bridge_hook_dtmf::dtmf, ast_bridge_channel::dtmf_hook_state, ast_bridge_features::dtmf_hooks, ast_bridge_features::dtmf_passthrough, ast_bridge_channel::features, ast_bridge_hook_dtmf::generic, ast_bridge_hook::hook_pvt, ast_bridge_channel::interdigit_timeout, NULL, OBJ_SEARCH_PARTIAL_KEY, ast_bridge_channel::suspended, and testsuite_notify_feature_success().
Referenced by agent_alert(), bridge_channel_handle_feature_timeout(), bridge_channel_internal_join(), and bridge_handle_dtmf().
void ast_bridge_channel_feature_digit_add | ( | struct ast_bridge_channel * | bridge_channel, |
int | digit | ||
) |
Add a DTMF digit to the collected digits.
bridge_channel | Channel that received a DTMF digit. |
digit | DTMF digit to add to collected digits |
Definition at line 1754 of file bridge_channel.c.
References bridge_channel_feature_digit_add(), ast_bridge_channel::collected, and ast_bridge_channel::dtmf_hook_state.
Referenced by play_file().
struct ast_channel* ast_bridge_channel_get_chan | ( | struct ast_bridge_channel * | bridge_channel | ) |
Get a ref to the bridge_channel's ast_channel.
bridge_channel | The bridge channel |
ref'd | ast_channel on success |
NULL | otherwise |
Definition at line 211 of file bridge_channel.c.
References ao2_bump, ao2_lock, ao2_unlock, and ast_bridge_channel::chan.
Referenced by ast_bridge_channel_write_unhold().
void ast_bridge_channel_kick | ( | struct ast_bridge_channel * | bridge_channel, |
int | cause | ||
) |
Kick the channel out of the bridge.
bridge_channel | Which channel is being kicked or hungup. |
cause | Cause of channel being kicked. If cause <= 0 then use cause on channel if cause still <= 0 use AST_CAUSE_NORMAL_CLEARING. |
Definition at line 605 of file bridge_channel.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ao2_unlink, ast_bridge_channel_leave_bridge(), ast_bridge_channel_lock, ast_bridge_channel_unlock, AST_BRIDGE_HOOK_TYPE_HANGUP, ast_channel_name(), ast_debug, BRIDGE_CHANNEL_STATE_END, BRIDGE_CHANNEL_STATE_WAIT, ast_bridge_hook::callback, ast_bridge_channel::chan, channel_set_cause(), ast_bridge_channel::features, ast_bridge_hook::hook_pvt, ast_bridge_features::other_hooks, ast_bridge_channel::state, and ast_bridge_hook::type.
Referenced by ast_bridge_channel_feature_digit(), ast_bridge_channel_run_app(), bridge_channel_attended_transfer(), bridge_channel_blind_transfer(), bridge_channel_handle_action(), bridge_channel_internal_join(), bridge_handle_trip(), and kick_it().
void ast_bridge_channel_leave_bridge | ( | struct ast_bridge_channel * | bridge_channel, |
enum bridge_channel_state | new_state, | ||
int | cause | ||
) |
Set bridge channel state to leave bridge (if not leaving already).
bridge_channel | Channel to change the state on |
new_state | The new state to place the channel into |
cause | Cause of channel leaving bridge. If cause <= 0 then use cause on channel if cause still <= 0 use AST_CAUSE_NORMAL_CLEARING. |
Example usage:
This places the channel pointed to by bridge_channel into the state BRIDGE_CHANNEL_STATE_END if it was BRIDGE_CHANNEL_STATE_WAIT before.
Definition at line 314 of file bridge_channel.c.
References ast_bridge_channel_leave_bridge_nolock(), ast_bridge_channel_lock, and ast_bridge_channel_unlock.
Referenced by _ast_bridge_channel_unlock(), agent_connect_caller(), ast_bridge_channel_kick(), ast_bridge_depart(), ast_bridge_remove(), basic_hangup_hook(), bridge_agent_hold_heartbeat(), bridge_agent_hold_push(), bridge_channel_complete_join(), bridge_channel_dissolve_check(), bridge_channel_internal_push_full(), bridge_dissolve(), bridge_do_merge(), bridge_do_move(), bridge_features_duration_callback(), bridge_swap_attended_transfer(), bridgewait_timeout_callback(), caller_joined_bridge(), caller_safety_timeout(), feature_hangup(), parking_duration_callback(), say_parking_space(), set_softmix_bridge_data(), try_swap_optimize_out(), and user_timeout().
void ast_bridge_channel_leave_bridge_nolock | ( | struct ast_bridge_channel * | bridge_channel, |
enum bridge_channel_state | new_state, | ||
int | cause | ||
) |
Set bridge channel state to leave bridge (if not leaving already).
bridge_channel | Channel to change the state on |
new_state | The new state to place the channel into |
cause | Cause of channel leaving bridge. If cause <= 0 then use cause on channel if cause still <= 0 use AST_CAUSE_NORMAL_CLEARING. |
Example usage:
This places the channel pointed to by bridge_channel into the state BRIDGE_CHANNEL_STATE_END if it was BRIDGE_CHANNEL_STATE_WAIT before.
Definition at line 292 of file bridge_channel.c.
References ast_bridge_vars_set(), ast_channel_lock, ast_channel_name(), ast_channel_unlock, ast_debug, bridge_channel_poke(), BRIDGE_CHANNEL_STATE_WAIT, ast_bridge_channel::chan, channel_set_cause(), NULL, and ast_bridge_channel::state.
Referenced by _ast_bridge_channel_unlock(), ast_bridge_channel_leave_bridge(), bridge_do_merge(), and caller_abort_agent().
void ast_bridge_channel_lock_bridge | ( | struct ast_bridge_channel * | bridge_channel | ) |
Lock the bridge associated with the bridge channel.
bridge_channel | Channel that wants to lock the bridge. |
This is an upstream lock operation. The defined locking order is bridge then bridge_channel.
Definition at line 222 of file bridge_channel.c.
References ao2_ref, ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_bridge_lock, ast_bridge_unlock, and ast_bridge_channel::bridge.
Referenced by _ast_bridge_channel_unlock(), action_toggle_binaural(), agent_alert(), ast_bridge_channel_feature_digit(), ast_bridge_channel_merge_inhibit(), ast_bridge_notify_masquerade(), basic_hangup_hook(), bridge_channel_handle_control(), bridge_channel_internal_join(), bridge_channel_suspend(), bridge_channel_unsuspend(), bridge_channel_wait(), bridge_channel_write_frame(), bridge_handle_trip(), check_binaural_position_change(), deferred_action(), feature_automixmonitor(), feature_automonitor(), and parking_blind_transfer_park().
struct ast_bridge* ast_bridge_channel_merge_inhibit | ( | struct ast_bridge_channel * | bridge_channel, |
int | request | ||
) |
Adjust the bridge_channel's bridge merge inhibit request count.
bridge_channel | What to operate on. |
request | Inhibit request increment. (Positive to add requests. Negative to remove requests.) |
bridge | adjusted merge inhibit with reference count. |
Definition at line 369 of file bridge_channel.c.
References ao2_ref, ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_bridge_channel::bridge, and bridge_merge_inhibit_nolock().
Referenced by _ast_bridge_channel_unlock(), and feature_attended_transfer().
int ast_bridge_channel_notify_talking | ( | struct ast_bridge_channel * | bridge_channel, |
int | started_talking | ||
) |
Lets the bridging indicate when a bridge channel has stopped or started talking.
bridge_channel | The bridge channel that has either started or stopped talking. |
started_talking | set to 1 when this indicates the channel has started talking set to 0 when this indicates the channel has stopped talking. |
0 | on success. |
-1 | on error. |
Definition at line 244 of file bridge_channel.c.
References ast_bridge_channel_queue_frame(), AST_FRAME_BRIDGE_ACTION, BRIDGE_CHANNEL_ACTION_TALKING_START, BRIDGE_CHANNEL_ACTION_TALKING_STOP, and ast_frame::frametype.
Referenced by _ast_bridge_channel_unlock(), clear_talking(), and softmix_bridge_write_voice().
struct ast_bridge_channel* ast_bridge_channel_peer | ( | struct ast_bridge_channel * | bridge_channel | ) |
Get the peer bridge channel of a two party bridge.
bridge_channel | What to get the peer of. |
peer | on success. |
NULL | no peer channel. |
Definition at line 321 of file bridge_channel.c.
References AST_LIST_TRAVERSE, ast_bridge_channel::bridge, ast_bridge::channels, ast_bridge_channel::in_bridge, NULL, and ast_bridge::num_channels.
Referenced by _ast_bridge_channel_unlock(), bridge_reconfigured_connected_line_update(), bridge_swap_attended_transfer(), parking_blind_transfer_park(), and try_swap_optimize_out().
void ast_bridge_channel_playfile | ( | struct ast_bridge_channel * | bridge_channel, |
ast_bridge_custom_play_fn | custom_play, | ||
const char * | playfile, | ||
const char * | moh_class | ||
) |
Play a file on the bridge channel.
bridge_channel | Which channel to play the file on |
custom_play | Call this function to play the playfile. (NULL if normal sound file to play) |
playfile | Sound filename to play. |
moh_class | MOH class to request bridge peers to hear while file is played. NULL if no MOH. Empty if default MOH class. |
Definition at line 1321 of file bridge_channel.c.
References ast_bridge_channel_write_hold(), ast_bridge_channel_write_unhold(), ast_channel_flags(), ast_channel_latest_musicclass(), ast_channel_lock, ast_channel_unlock, AST_DIGIT_NONE, AST_FLAG_MOH, ast_moh_start(), ast_strdupa, ast_stream_and_wait(), ast_test_flag, ast_bridge_channel::chan, and NULL.
Referenced by bridge_channel_playfile().
int ast_bridge_channel_queue_app | ( | struct ast_bridge_channel * | bridge_channel, |
const char * | app_name, | ||
const char * | app_args, | ||
const char * | moh_class | ||
) |
Queue a bridge action run application frame onto the bridge channel.
bridge_channel | Which channel to put the frame onto |
app_name | Dialplan application name. |
app_args | Arguments for the application. (NULL or empty for no arguments) |
moh_class | MOH class to request bridge peers to hear while application is running. NULL if no MOH. Empty if default MOH class. |
0 | on success. |
-1 | on error. |
Definition at line 1315 of file bridge_channel.c.
References bridge_channel_queue_action_data(), and payload_helper_app().
Referenced by _ast_bridge_channel_unlock().
int ast_bridge_channel_queue_callback | ( | struct ast_bridge_channel * | bridge_channel, |
enum ast_bridge_channel_custom_callback_option | flags, | ||
ast_bridge_custom_callback_fn | callback, | ||
const void * | payload, | ||
size_t | payload_size | ||
) |
Queue a bridge action custom callback frame onto the bridge channel.
bridge_channel | Which channel to put the frame onto. |
flags | Custom callback option flags. |
callback | Custom callback run on a bridge channel. |
payload | Data to pass to the callback. (NULL if none). |
payload_size | Size of the payload if payload is non-NULL. A number otherwise. |
0 | on success. |
-1 | on error. |
Definition at line 1492 of file bridge_channel.c.
References bridge_channel_queue_action_data(), and payload_helper_cb().
Referenced by ast_bridge_kick(), defer_action(), handle_bridge_kick_channel(), and send_alert_to_agent().
int ast_bridge_channel_queue_control_data | ( | struct ast_bridge_channel * | bridge_channel, |
enum ast_control_frame_type | control, | ||
const void * | data, | ||
size_t | datalen | ||
) |
Queue a control frame onto the bridge channel with data.
bridge_channel | Which channel to queue the frame onto. |
control | Type of control frame. |
data | Frame payload data to pass. |
datalen | Frame payload data length to pass. |
0 | on success. |
-1 | on error. |
Definition at line 1143 of file bridge_channel.c.
References ast_bridge_channel_queue_frame(), AST_FRAME_CONTROL, ast_frame::datalen, and ast_frame::frametype.
Referenced by _ast_bridge_channel_unlock(), bridge_reconfigured_connected_line_update(), and send_colp_to_agent().
int ast_bridge_channel_queue_frame | ( | struct ast_bridge_channel * | bridge_channel, |
struct ast_frame * | fr | ||
) |
Write a frame to the specified bridge_channel.
bridge_channel | Channel to queue the frame. |
fr | Frame to write. |
0 | on success. |
-1 | on error. |
Definition at line 1044 of file bridge_channel.c.
References ast_bridge_channel::alert_pipe, ast_alertpipe_write(), ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_channel_name(), AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_IMAGE, AST_FRAME_NULL, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_TEXT_DATA, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frdup, ast_is_deferrable_frame(), AST_LIST_INSERT_TAIL, ast_log, AST_MSG_DATA_ATTR_BODY, AST_MSG_DATA_ATTR_FROM, AST_MSG_DATA_ATTR_TO, ast_msg_data_get_attribute(), AST_VECTOR_GET, AST_VECTOR_SIZE, BRIDGE_CHANNEL_STATE_WAIT, bridge_frame_free(), ast_bridge_channel::chan, ast_frame::data, ast_frame::datalen, DEBUG_ATLEAST, ast_bridge_channel::features, ast_frame::frametype, LOG_DEBUG, LOG_ERROR, ast_frame::ptr, ast_bridge_channel::state, ast_bridge_channel::stream_map, ast_frame::stream_num, ast_bridge_channel::suspended, ast_bridge_features::text_messaging, ast_bridge_channel::to_channel, and ast_bridge_channel::wr_queue.
Referenced by _ast_bridge_channel_unlock(), ast_bridge_channel_notify_talking(), ast_bridge_channel_queue_control_data(), ast_bridge_queue_everyone_else(), bridge_channel_queue_action_data(), bridge_channel_queue_action_data_sync(), remb_send_report(), send_message(), softmix_mixing_loop(), and softmix_pass_video_top_priority().
int ast_bridge_channel_queue_playfile | ( | struct ast_bridge_channel * | bridge_channel, |
ast_bridge_custom_play_fn | custom_play, | ||
const char * | playfile, | ||
const char * | moh_class | ||
) |
Queue a bridge action play file frame onto the bridge channel.
bridge_channel | Which channel to put the frame onto. |
custom_play | Call this function to play the playfile. (NULL if normal sound file to play) |
playfile | Sound filename to play. |
moh_class | MOH class to request bridge peers to hear while file is played. NULL if no MOH. Empty if default MOH class. |
0 | on success. |
-1 | on error. |
Definition at line 1404 of file bridge_channel.c.
References bridge_channel_queue_action_data(), and payload_helper_playfile().
Referenced by ast_bridge_add_channel(), bridge_parking_pull(), bridge_parking_push(), check_bridge_play_sound(), feature_automixmonitor(), feature_automonitor(), parker_parked_call_message_response(), play_sound(), start_automixmonitor(), start_automonitor(), stop_automixmonitor(), and stop_automonitor().
int ast_bridge_channel_queue_playfile_sync | ( | struct ast_bridge_channel * | bridge_channel, |
ast_bridge_custom_play_fn | custom_play, | ||
const char * | playfile, | ||
const char * | moh_class | ||
) |
Synchronously queue a bridge action play file frame onto the bridge channel.
bridge_channel | Which channel to put the frame onto. |
custom_play | Call this function to play the playfile. (NULL if normal sound file to play) |
playfile | Sound filename to play. |
moh_class | MOH class to request bridge peers to hear while file is played. NULL if no MOH. Empty if default MOH class. |
This function will block until the queued frame has been destroyed. This will happen either if an error occurs or if the queued playback finishes.
0 | The playback was successfully queued. |
-1 | The playback could not be queued. |
Definition at line 1410 of file bridge_channel.c.
References bridge_channel_queue_action_data_sync(), and payload_helper_playfile().
Referenced by parker_parked_call_message_response(), and play_uri().
void ast_bridge_channel_restore_formats | ( | struct ast_bridge_channel * | bridge_channel | ) |
Restore the formats of a bridge channel's channel to how they were before bridge_channel_internal_join.
bridge_channel | Channel to restore |
Definition at line 337 of file bridge_channel.c.
References ast_assert, ast_channel_lock, ast_channel_name(), ast_channel_readformat(), ast_channel_unlock, ast_channel_writeformat(), ast_debug, ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), ast_set_read_format(), ast_set_write_format(), ast_bridge_channel::chan, NULL, ast_bridge_channel::read_format, and ast_bridge_channel::write_format.
Referenced by _ast_bridge_channel_unlock(), bridge_channel_internal_join(), and participant_reaction_announcer_leave().
void ast_bridge_channel_run_app | ( | struct ast_bridge_channel * | bridge_channel, |
const char * | app_name, | ||
const char * | app_args, | ||
const char * | moh_class | ||
) |
Run an application on the bridge channel.
bridge_channel | Which channel to run the application on. |
app_name | Dialplan application name. |
app_args | Arguments for the application. (NULL tolerant) |
moh_class | MOH class to request bridge peers to hear while application is running. NULL if no MOH. Empty if default MOH class. |
Definition at line 1241 of file bridge_channel.c.
References ast_bridge_channel_kick(), ast_bridge_channel_write_hold(), ast_bridge_channel_write_unhold(), AST_CAUSE_NORMAL_CLEARING, ast_bridge_channel::chan, run_app_helper(), and S_OR.
Referenced by _ast_bridge_channel_unlock(), bridge_channel_run_app(), and dynamic_dtmf_hook_callback().
void ast_bridge_channel_stream_map | ( | struct ast_bridge_channel * | bridge_channel | ) |
Maps a channel's stream topology to and from the bridge.
When a channel joins a bridge or its associated stream topology is updated, each stream in the topology needs to be mapped according to its media type to the bridge. Calling this method creates a mapping of each stream on the channel indexed to the bridge's supported media types and vice versa (i.e. bridge's media types indexed to channel streams).
The first channel to join the bridge creates the initial order for the bridge's media types (e.g. a one to one mapping is made). Subsequently added channels are mapped to that order adding more media types if/when the newly added channel has more streams and/or media types specified by the bridge.
bridge_channel | Channel to map |
Definition at line 3174 of file bridge_channel.c.
References ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_channel_get_stream_topology(), ast_channel_lock, ast_channel_unlock, ast_stream_topology_map(), ast_bridge_channel::bridge, ast_bridge_channel::chan, ast_bridge::media_types, ast_bridge_channel::stream_map, ast_bridge_channel::to_bridge, and ast_bridge_channel::to_channel.
Referenced by bridge_channel_complete_join(), bridge_handle_trip(), native_rtp_stream_topology_changed(), simple_bridge_stream_topology_changed(), and softmix_bridge_stream_topology_changed().
void ast_bridge_channel_update_accountcodes | ( | struct ast_bridge_channel * | joining, |
struct ast_bridge_channel * | leaving | ||
) |
Definition at line 596 of file bridge_channel.c.
References bridge_channel_update_accountcodes_joining(), and bridge_channel_update_accountcodes_leaving().
Referenced by _ast_bridge_channel_unlock(), bridge_basic_pull(), bridge_basic_push(), bridge_stasis_pull(), and bridge_stasis_push().
void ast_bridge_channel_update_linkedids | ( | struct ast_bridge_channel * | bridge_channel, |
struct ast_bridge_channel * | swap | ||
) |
Definition at line 381 of file bridge_channel.c.
References ast_channel_internal_copy_linkedid(), ast_channel_internal_oldest_linkedid(), ast_channel_lock, ast_channel_unlock, AST_LIST_TRAVERSE, ast_bridge_channel::bridge, ast_bridge_channel::chan, and ast_bridge::channels.
Referenced by _ast_bridge_channel_unlock(), bridge_basic_push(), and bridge_stasis_push().
int ast_bridge_channel_write_app | ( | struct ast_bridge_channel * | bridge_channel, |
const char * | app_name, | ||
const char * | app_args, | ||
const char * | moh_class | ||
) |
Write a bridge action run application frame into the bridge.
bridge_channel | Which channel is putting the frame into the bridge |
app_name | Dialplan application name. |
app_args | Arguments for the application. (NULL or empty for no arguments) |
moh_class | MOH class to request bridge peers to hear while application is running. NULL if no MOH. Empty if default MOH class. |
0 | on success. |
-1 | on error. |
Definition at line 1309 of file bridge_channel.c.
References bridge_channel_write_action_data(), and payload_helper_app().
Referenced by _ast_bridge_channel_unlock().
int ast_bridge_channel_write_callback | ( | struct ast_bridge_channel * | bridge_channel, |
enum ast_bridge_channel_custom_callback_option | flags, | ||
ast_bridge_custom_callback_fn | callback, | ||
const void * | payload, | ||
size_t | payload_size | ||
) |
Write a bridge action custom callback frame into the bridge.
bridge_channel | Which channel is putting the frame into the bridge |
flags | Custom callback option flags. |
callback | Custom callback run on a bridge channel. |
payload | Data to pass to the callback. (NULL if none). |
payload_size | Size of the payload if payload is non-NULL. A number otherwise. |
0 | on success. |
-1 | on error. |
Definition at line 1484 of file bridge_channel.c.
References bridge_channel_write_action_data(), and payload_helper_cb().
Referenced by agent_connect_caller(), and dynamic_dtmf_hook_trip().
int ast_bridge_channel_write_control_data | ( | struct ast_bridge_channel * | bridge_channel, |
enum ast_control_frame_type | control, | ||
const void * | data, | ||
size_t | datalen | ||
) |
Write a control frame into the bridge with data.
bridge_channel | Which channel is putting the frame into the bridge. |
control | Type of control frame. |
data | Frame payload data to pass. |
datalen | Frame payload data length to pass. |
0 | on success. |
-1 | on error. |
Definition at line 1155 of file bridge_channel.c.
References AST_FRAME_CONTROL, bridge_channel_write_frame(), ast_frame::datalen, and ast_frame::frametype.
Referenced by _ast_bridge_channel_unlock(), agent_connect_caller(), ast_bridge_channel_write_hold(), ast_bridge_channel_write_unhold(), and ringing().
int ast_bridge_channel_write_hold | ( | struct ast_bridge_channel * | bridge_channel, |
const char * | moh_class | ||
) |
Write a hold frame into the bridge.
bridge_channel | Which channel is putting the hold into the bridge. |
moh_class | The suggested music class for the other end to use. |
0 | on success. |
-1 | on error. |
Definition at line 1167 of file bridge_channel.c.
References ast_bridge_channel_write_control_data(), ast_channel_hold_type(), ast_channel_publish_cached_blob(), AST_CONTROL_HOLD, ast_json_pack(), ast_json_unref(), ast_strlen_zero, ast_bridge_channel::chan, and NULL.
Referenced by _ast_bridge_channel_unlock(), ast_bridge_channel_playfile(), ast_bridge_channel_run_app(), feature_attended_transfer(), feature_blind_transfer(), and hold().
int ast_bridge_channel_write_park | ( | struct ast_bridge_channel * | bridge_channel, |
const char * | parkee_uuid, | ||
const char * | parker_uuid, | ||
const char * | app_data | ||
) |
Have a bridge channel park a channel in the bridge.
bridge_channel | Bridge channel performing the parking |
parkee_uuid | Unique id of the channel we want to park |
parker_uuid | Unique id of the channel parking the call |
app_data | string indicating data used for park application (NULL allowed) |
0 | on success. |
-1 | on error. |
Definition at line 1555 of file bridge_channel.c.
References bridge_channel_write_action_data(), and payload_helper_park().
Referenced by manager_park_bridged(), and parking_blind_transfer_park().
int ast_bridge_channel_write_playfile | ( | struct ast_bridge_channel * | bridge_channel, |
ast_bridge_custom_play_fn | custom_play, | ||
const char * | playfile, | ||
const char * | moh_class | ||
) |
Write a bridge action play file frame into the bridge.
bridge_channel | Which channel is putting the frame into the bridge |
custom_play | Call this function to play the playfile. (NULL if normal sound file to play) |
playfile | Sound filename to play. |
moh_class | MOH class to request bridge peers to hear while file is played. NULL if no MOH. Empty if default MOH class. |
0 | on success. |
-1 | on error. |
Definition at line 1398 of file bridge_channel.c.
References bridge_channel_write_action_data(), and payload_helper_playfile().
Referenced by ast_bridge_transfer_attended(), start_automixmonitor(), start_automonitor(), stop_automixmonitor(), and stop_automonitor().
int ast_bridge_channel_write_unhold | ( | struct ast_bridge_channel * | bridge_channel | ) |
Write an unhold frame into the bridge.
bridge_channel | Which channel is putting the hold into the bridge. |
0 | on success. |
-1 | on error. |
Definition at line 1193 of file bridge_channel.c.
References ao2_ref, ast_bridge_channel_get_chan(), ast_bridge_channel_write_control_data(), ast_channel_publish_cached_blob(), ast_channel_unhold_type(), AST_CONTROL_UNHOLD, and NULL.
Referenced by _ast_bridge_channel_unlock(), ast_bridge_channel_playfile(), ast_bridge_channel_run_app(), ast_bridge_transfer_attended(), ast_bridge_transfer_blind(), feature_attended_transfer(), feature_blind_transfer(), and unhold().
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.
bridge | What bridge to distribute frame. |
bridge_channel | Channel to optionally not pass frame to. (NULL to pass to everyone) |
frame | Frame to pass. |
0 | Frame written to at least one channel. |
-1 | Frame written to no channels. |
Definition at line 1122 of file bridge_channel.c.
References ast_bridge_channel_queue_frame(), AST_FRAME_NULL, AST_LIST_TRAVERSE, ast_bridge::channels, and ast_frame::frametype.
Referenced by bridge_hold(), bridge_ringing(), bridge_unhold(), holding_bridge_write(), native_bridge_write(), native_rtp_bridge_write(), simple_bridge_write(), softmix_bridge_write(), softmix_bridge_write_control(), softmix_bridge_write_text(), and softmix_bridge_write_video().
|
static |
Definition at line 2027 of file bridge_channel.c.
References after_bridge_move_channel(), after_bridge_move_channel_fail(), ao2_cleanup, ao2_ref, ast_assert, ast_bridge_channel_kick(), ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_bridge_set_after_callback(), AST_CAUSE_NORMAL_CLEARING, ast_channel_get_by_name(), ast_channel_ref, ast_channel_unref, ast_softhangup(), AST_SOFTHANGUP_DEV, ast_bridge_channel::chan, NULL, and RAII_VAR.
Referenced by bridge_channel_handle_action().
|
static |
Definition at line 2016 of file bridge_channel.c.
References ast_async_goto(), ast_bridge_channel_kick(), AST_CAUSE_NORMAL_CLEARING, ast_bridge_channel::chan, blind_transfer_data::context, and blind_transfer_data::exten.
Referenced by bridge_channel_handle_action().
|
static |
Definition at line 786 of file bridge_channel.c.
References ast_bridge_channel::dtmf_digit, ast_bridge_channel::owed, and ast_bridge_channel::t38_terminate.
Referenced by bridge_channel_internal_push_full().
|
static |
Definition at line 3117 of file bridge_channel.c.
References ast_bridge_channel::alert_pipe, ao2_cleanup, ao2_ref, ast_alertpipe_close(), ast_cond_destroy, ast_frfree, AST_LIST_REMOVE_HEAD, AST_VECTOR_FREE, ast_bridge_channel::bridge, bridge_frame_free(), ast_bridge_channel::callid, ast_bridge_channel::cond, ast_bridge_channel::deferred_queue, NULL, ast_bridge_channel::read_format, ast_bridge_channel::stream_map, ast_bridge_channel::to_bridge, ast_bridge_channel::to_channel, ast_bridge_channel::wr_queue, and ast_bridge_channel::write_format.
Referenced by bridge_channel_internal_alloc().
|
static |
Definition at line 2136 of file bridge_channel.c.
References AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP, ast_bridge_channel_leave_bridge(), AST_BRIDGE_FLAG_DISSOLVE_EMPTY, AST_BRIDGE_FLAG_DISSOLVE_HANGUP, ast_channel_hangupcause(), AST_LIST_FIRST, ast_test_flag, ast_bridge_channel::bridge, BRIDGE_CHANNEL_STATE_END, BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, bridge_dissolve(), ast_bridge_channel::chan, ast_bridge::channels, ast_bridge::dissolved, ast_bridge_features::feature_flags, ast_bridge::feature_flags, ast_bridge_channel::features, ast_bridge::num_channels, ast_bridge::num_lonely, ast_bridge_channel::state, and ast_bridge_features::usable.
Referenced by bridge_channel_internal_join(), and bridge_channel_internal_pull().
|
static |
Definition at line 1440 of file bridge_channel.c.
References AST_BRIDGE_CHANNEL_CB_OPTION_MEDIA, AST_CONTROL_SRCUPDATE, ast_indicate(), ast_test_flag, bridge_channel_suspend(), bridge_channel_unsuspend(), bridge_custom_callback::callback, ast_bridge_channel::chan, NULL, bridge_custom_callback::payload, bridge_custom_callback::payload_exists, and bridge_custom_callback::payload_size.
Referenced by bridge_channel_handle_action().
|
static |
Internal function that plays back DTMF on a bridge channel.
Definition at line 1926 of file bridge_channel.c.
References ast_channel_name(), ast_debug, ast_dtmf_stream(), ast_bridge_channel::chan, and NULL.
Referenced by bridge_channel_handle_action().
|
static |
Definition at line 2872 of file bridge_channel.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ao2_unlink, AST_CONTROL_SRCUPDATE, ast_indicate(), bridge_channel_suspend(), bridge_channel_unsuspend(), 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_channel_internal_join().
|
static |
Definition at line 1717 of file bridge_channel.c.
References ARRAY_LEN, ast_channel_name(), ast_debug, ast_bridge_channel::chan, ast_bridge_channel::collected, digit, and ast_bridge_channel::dtmf_hook_state.
Referenced by ast_bridge_channel_feature_digit(), and ast_bridge_channel_feature_digit_add().
|
static |
Definition at line 1733 of file bridge_channel.c.
References ao2_ref, ast_channel_lock, ast_channel_unlock, ast_get_chan_features_general_config(), ast_log, ast_bridge_channel::chan, ast_features_general_config::featuredigittimeout, and LOG_ERROR.
Referenced by ast_bridge_channel_feature_digit().
|
static |
Definition at line 2753 of file bridge_channel.c.
References ast_tvdiff_ms(), ast_tvnow(), ast_bridge_channel::collected, ast_bridge_channel::dtmf_hook_state, and ast_bridge_channel::interdigit_timeout.
Referenced by bridge_channel_next_timeout().
|
static |
Definition at line 2067 of file bridge_channel.c.
References ast_bridge_channel_kick(), ast_check_hangup_locked(), AST_CONTROL_SRCUPDATE, ast_indicate(), BRIDGE_CHANNEL_ACTION_ATTENDED_TRANSFER, BRIDGE_CHANNEL_ACTION_BLIND_TRANSFER, BRIDGE_CHANNEL_ACTION_CALLBACK, BRIDGE_CHANNEL_ACTION_DTMF_STREAM, BRIDGE_CHANNEL_ACTION_PARK, BRIDGE_CHANNEL_ACTION_PLAY_FILE, BRIDGE_CHANNEL_ACTION_RUN_APP, BRIDGE_CHANNEL_ACTION_TALKING_START, BRIDGE_CHANNEL_ACTION_TALKING_STOP, bridge_channel_attended_transfer(), bridge_channel_blind_transfer(), bridge_channel_do_callback(), bridge_channel_dtmf_stream(), bridge_channel_park(), bridge_channel_playfile(), bridge_channel_run_app(), bridge_channel_suspend(), bridge_channel_talking(), bridge_channel_unsuspend(), and ast_bridge_channel::chan.
Referenced by bridge_channel_handle_write().
|
static |
Definition at line 2330 of file bridge_channel.c.
References ast_answer(), ast_assert, ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_channel_connected_line_macro(), ast_channel_connected_line_sub(), ast_channel_flags(), ast_channel_redirecting_macro(), ast_channel_redirecting_sub(), ast_channel_setoption(), AST_CONTROL_ANSWER, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_MASQUERADE_NOTIFY, AST_CONTROL_OPTION, AST_CONTROL_REDIRECTING, AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_FLAG_OUTGOING, ast_indicate(), ast_indicate_data(), AST_OPTION_AUDIO_MODE, AST_OPTION_DIGIT_DETECT, AST_OPTION_FAX_DETECT, AST_OPTION_FLAG_REQUEST, AST_OPTION_RELAXDTMF, AST_OPTION_TDD, AST_OPTION_TONE_VERIFY, AST_STATE_UP, ast_test_flag, ast_bridge_channel::bridge, bridge_reconfigured(), ast_bridge_channel::chan, ast_frame::data, ast_option_header::data, ast_frame::datalen, ast_frame_subclass::integer, NULL, ast_frame::ptr, ast_bridge::reconfigured, and ast_frame::subclass.
Referenced by bridge_channel_handle_write().
|
static |
Definition at line 1883 of file bridge_channel.c.
References ast_bridge_channel_feature_digit(), ast_tvdiff_ms(), ast_tvnow(), ast_bridge_channel::collected, ast_bridge_channel::dtmf_hook_state, and ast_bridge_channel::interdigit_timeout.
Referenced by bridge_channel_wait().
|
static |
Definition at line 1570 of file bridge_channel.c.
References ao2_ref, ast_atomic_fetchadd_int(), AST_BRIDGE_HOOK_TIMER_OPTION_MEDIA, ast_channel_name(), AST_CONTROL_SRCUPDATE, ast_debug, ast_heap_peek(), ast_heap_push, ast_heap_remove(), ast_heap_unlock, ast_heap_wrlock, ast_indicate(), ast_samp2tv(), ast_test_flag, ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), bridge_channel_suspend(), bridge_channel_unsuspend(), ast_bridge_hook::callback, ast_bridge_channel::chan, ast_bridge_channel::features, ast_bridge_hook_timer::generic, ast_bridge_hook_timer_parms::heap_index, ast_bridge_hook::hook_pvt, ast_bridge_hook_timer_parms::interval, ast_bridge_features::interval_hooks, ast_bridge_features::interval_sequence, ast_bridge_hook_timer_parms::seqno, ast_bridge_hook_timer::timer, and ast_bridge_hook_timer_parms::trip_time.
Referenced by bridge_channel_wait().
|
static |
Definition at line 2444 of file bridge_channel.c.
References ast_bridge_channel::activity, ast_bridge_channel::alert_pipe, ast_alertpipe_read(), ast_assert, ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_channel_name(), ast_debug, AST_FRAME_BRIDGE_ACTION, AST_FRAME_BRIDGE_ACTION_SYNC, AST_FRAME_CONTROL, AST_FRAME_NULL, AST_FRAME_TEXT, AST_FRAME_TEXT_DATA, AST_LIST_EMPTY, AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_log, AST_MSG_DATA_ATTR_BODY, AST_MSG_DATA_ATTR_FROM, AST_MSG_DATA_ATTR_TO, ast_msg_data_get_attribute(), ast_sendtext_data(), AST_VECTOR_GET, AST_VECTOR_SIZE, ast_write_stream(), bridge_channel_handle_action(), bridge_channel_handle_control(), BRIDGE_CHANNEL_THREAD_SIMPLE, bridge_frame_free(), ast_bridge_channel::chan, ast_bridge_channel::collected, sync_payload::data, ast_frame::data, ast_frame::datalen, ast_bridge_channel::dtmf_hook_state, ast_frame::frametype, ast_frame_subclass::integer, LOG_WARNING, ast_frame::ptr, sendtext_safe(), ast_bridge_channel::stream_map, ast_frame::stream_num, ast_frame::subclass, ast_bridge_channel::to_channel, and ast_bridge_channel::wr_queue.
Referenced by bridge_channel_wait().
struct ast_bridge_channel* bridge_channel_internal_alloc | ( | struct ast_bridge * | bridge | ) |
Definition at line 3151 of file bridge_channel.c.
References ast_bridge_channel::alert_pipe, ao2_alloc, ao2_ref, ast_alertpipe_init(), ast_cond_init, ast_bridge_channel::bridge, bridge_channel_destroy(), ast_bridge_channel::cond, and NULL.
Referenced by ast_bridge_join(), and bridge_impart_internal().
int bridge_channel_internal_allows_optimization | ( | struct ast_bridge_channel * | bridge_channel | ) |
Definition at line 3110 of file bridge_channel.c.
References AST_LIST_EMPTY, ast_bridge_channel::in_bridge, and ast_bridge_channel::wr_queue.
Referenced by optimize_lock_chan_stack(), and optimize_lock_peer_stack().
int bridge_channel_internal_join | ( | struct ast_bridge_channel * | bridge_channel | ) |
Definition at line 2902 of file bridge_channel.c.
References ao2_bump, ao2_t_cleanup, AST_BRIDGE_CAPABILITY_MULTIMIX, ast_bridge_channel_feature_digit(), ast_bridge_channel_kick(), ast_bridge_channel_lock_bridge(), ast_bridge_channel_restore_formats(), ast_bridge_features_merge(), ast_bridge_features_remove(), AST_BRIDGE_HOOK_REMOVE_ON_PULL, AST_BRIDGE_HOOK_TYPE_JOIN, AST_BRIDGE_HOOK_TYPE_LEAVE, ast_bridge_lock, ast_bridge_remove_video_src(), ast_bridge_unlock, ast_channel_end_dtmf(), ast_channel_feature_hooks_get(), ast_channel_flags(), ast_channel_hold_state(), ast_channel_internal_bridge(), ast_channel_internal_bridge_set(), ast_channel_is_t38_active(), ast_channel_lock, ast_channel_name(), ast_channel_readformat(), ast_channel_sending_dtmf_digit(), ast_channel_sending_dtmf_tv(), ast_channel_unlock, ast_channel_writeformat(), AST_CONTROL_HOLD, AST_CONTROL_SRCCHANGE, AST_CONTROL_T38_PARAMETERS, AST_CONTROL_UNHOLD, ast_debug, AST_FLAG_BRIDGE_DUAL_REDIRECT_WAIT, AST_FLAG_ZOMBIE, ast_indicate(), ast_indicate_data(), ast_jb_enable_for_channel(), ast_read_threadstorage_callid(), AST_T38_TERMINATED, ast_test_flag, ast_bridge_channel::bridge, bridge_channel_dissolve_check(), bridge_channel_event_join_leave(), bridge_channel_impart_signal(), bridge_channel_internal_pull(), bridge_channel_internal_push(), bridge_channel_settle_owed_events(), BRIDGE_CHANNEL_STATE_WAIT, bridge_channel_wait(), bridge_reconfigured(), ast_bridge::callid, ast_bridge_technology::capabilities, ast_bridge::cause, ast_bridge_channel::chan, ast_bridge_channel::features, ast_bridge_channel::inhibit_colp, NULL, ast_bridge_channel::read_format, ast_control_t38_parameters::request_response, ast_bridge_channel::state, ast_bridge_channel::swap, ast_bridge::technology, ast_bridge::uniqueid, and ast_bridge_channel::write_format.
Referenced by ast_bridge_join(), bridge_channel_depart_thread(), and bridge_channel_ind_thread().
void bridge_channel_internal_pull | ( | struct ast_bridge_channel * | bridge_channel | ) |
Definition at line 2178 of file bridge_channel.c.
References ast_bridge_channel_clear_roles(), AST_BRIDGE_CHANNEL_FLAG_LONELY, ast_bridge_publish_leave(), ast_channel_clear_flag(), ast_channel_flags(), ast_channel_is_leaving_bridge(), ast_channel_name(), ast_debug, AST_FLAG_OUTGOING, AST_LIST_REMOVE, ast_test_flag, ast_verb, ast_bridge_channel::bridge, bridge_channel_dissolve_check(), BRIDGE_CHANNEL_STATE_WAIT, ast_bridge_channel::chan, ast_bridge::channels, ast_bridge_features::feature_flags, ast_bridge_channel::features, ast_bridge_channel::in_bridge, ast_bridge_channel::just_joined, ast_bridge_technology::leave, ast_bridge_technology::name, ast_bridge_methods::name, ast_bridge::num_active, ast_bridge::num_channels, ast_bridge::num_lonely, ast_bridge_methods::pull, ast_bridge::reconfigured, ast_bridge_channel::state, ast_bridge_channel::suspended, ast_bridge::technology, ast_bridge::uniqueid, and ast_bridge::v_table.
Referenced by bridge_channel_internal_join(), bridge_channel_internal_push_full(), bridge_do_merge(), and bridge_do_move().
int bridge_channel_internal_push | ( | struct ast_bridge_channel * | bridge_channel | ) |
Definition at line 2315 of file bridge_channel.c.
References bridge_channel_internal_push_full().
Referenced by bridge_channel_internal_join(), bridge_do_merge(), and bridge_do_move().
int bridge_channel_internal_push_full | ( | struct ast_bridge_channel * | bridge_channel, |
int | optimized | ||
) |
Definition at line 2235 of file bridge_channel.c.
References ast_assert, ast_bridge_channel_establish_roles(), AST_BRIDGE_CHANNEL_FLAG_LONELY, ast_bridge_channel_leave_bridge(), AST_BRIDGE_FLAG_DISSOLVE_EMPTY, ast_bridge_publish_enter(), ast_channel_name(), ast_clear_flag, ast_debug, AST_LIST_INSERT_TAIL, ast_null_frame, ast_queue_frame(), ast_set2_flag, ast_test_flag, ast_verb, ast_bridge_channel::bridge, bridge_channel_cancel_owed_events(), bridge_channel_internal_pull(), BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE, BRIDGE_CHANNEL_STATE_WAIT, bridge_find_channel(), ast_bridge_channel::chan, ast_bridge::channels, ast_bridge::dissolved, ast_bridge_features::feature_flags, ast_bridge::feature_flags, ast_bridge_channel::features, ast_bridge_channel::in_bridge, ast_bridge_channel::just_joined, ast_bridge_technology::name, ast_bridge_methods::name, NULL, ast_bridge::num_active, ast_bridge::num_channels, ast_bridge::num_lonely, pbx_builtin_setvar_helper(), ast_bridge_methods::push, ast_bridge::reconfigured, ast_bridge_channel::state, ast_bridge_channel::suspended, ast_bridge_channel::swap, ast_bridge::technology, ast_bridge::uniqueid, and ast_bridge::v_table.
Referenced by bridge_channel_internal_push(), and bridge_do_move().
int bridge_channel_internal_queue_attended_transfer | ( | struct ast_channel * | transferee, |
struct ast_channel * | unbridged_chan | ||
) |
Definition at line 3088 of file bridge_channel.c.
References ao2_cleanup, ast_channel_get_bridge_channel(), ast_channel_lock, AST_CHANNEL_NAME, ast_channel_name(), ast_channel_unlock, ast_copy_string(), BRIDGE_CHANNEL_ACTION_ATTENDED_TRANSFER, bridge_channel_queue_action_data(), NULL, and RAII_VAR.
Referenced by ast_bridge_transfer_attended().
int bridge_channel_internal_queue_blind_transfer | ( | struct ast_channel * | transferee, |
const char * | exten, | ||
const char * | context, | ||
transfer_channel_cb | new_channel_cb, | ||
void * | user_data | ||
) |
Definition at line 3062 of file bridge_channel.c.
References ao2_cleanup, AST_BRIDGE_TRANSFER_SINGLE_PARTY, ast_channel_get_bridge_channel(), ast_channel_lock, ast_channel_unlock, ast_copy_string(), BRIDGE_CHANNEL_ACTION_BLIND_TRANSFER, bridge_channel_queue_action_data(), blind_transfer_data::context, blind_transfer_data::exten, NULL, and RAII_VAR.
Referenced by ast_bridge_transfer_blind().
void bridge_channel_internal_suspend_nolock | ( | struct ast_bridge_channel * | bridge_channel | ) |
Definition at line 854 of file bridge_channel.c.
References ast_bridge_channel::bridge, ast_bridge_channel::in_bridge, ast_bridge::num_active, ast_bridge_technology::suspend, ast_bridge_channel::suspended, and ast_bridge::technology.
Referenced by ast_bridge_channel_feature_digit(), ast_bridge_suspend(), and bridge_channel_suspend().
void bridge_channel_internal_unsuspend_nolock | ( | struct ast_bridge_channel * | bridge_channel | ) |
Definition at line 892 of file bridge_channel.c.
References ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_cond_signal, ast_bridge_channel::bridge, ast_bridge_channel::cond, ast_bridge_channel::in_bridge, ast_bridge::num_active, ast_bridge_channel::suspended, ast_bridge::technology, and ast_bridge_technology::unsuspend.
Referenced by ast_bridge_unsuspend(), and bridge_channel_unsuspend().
|
static |
Definition at line 2720 of file bridge_channel.c.
References ast_heap_peek(), ast_heap_unlock, ast_heap_wrlock, ast_tvdiff_ms(), ast_tvnow(), ast_bridge_channel::features, ast_bridge_features::interval_hooks, ast_bridge_hook_timer::timer, and ast_bridge_hook_timer_parms::trip_time.
Referenced by bridge_channel_next_timeout().
|
static |
Definition at line 2782 of file bridge_channel.c.
References bridge_channel_feature_timeout(), and bridge_channel_next_interval().
Referenced by bridge_channel_wait().
|
static |
Definition at line 1511 of file bridge_channel.c.
References bridge_park::app_data_offset, ast_channel_name(), ast_log, AST_LOG_WARNING, ast_parking_park_bridge_channel(), ast_parking_provider_registered(), ast_bridge_channel::chan, NULL, bridge_park::parkee_uuid, and bridge_park::parker_uuid_offset.
Referenced by bridge_channel_handle_action().
|
static |
Definition at line 1368 of file bridge_channel.c.
References ast_bridge_channel_playfile(), bridge_playfile::custom_play, bridge_playfile::moh_offset, NULL, and bridge_playfile::playfile.
Referenced by bridge_channel_handle_action().
|
static |
Definition at line 259 of file bridge_channel.c.
References ast_null_frame, ast_queue_frame(), ast_bridge_channel::chan, and ast_bridge_channel::thread.
Referenced by ast_bridge_channel_leave_bridge_nolock().
|
static |
Definition at line 938 of file bridge_channel.c.
References ast_bridge_channel_queue_frame(), AST_FRAME_BRIDGE_ACTION, ast_frame::datalen, and ast_frame::frametype.
Referenced by ast_bridge_channel_queue_app(), ast_bridge_channel_queue_callback(), ast_bridge_channel_queue_playfile(), bridge_channel_internal_queue_attended_transfer(), and bridge_channel_internal_queue_blind_transfer().
|
static |
Definition at line 966 of file bridge_channel.c.
References ast_alloca, ast_assert, ast_atomic_fetchadd_int(), ast_bridge_channel_queue_frame(), AST_FRAME_BRIDGE_ACTION_SYNC, bridge_sync_cleanup(), bridge_sync_init(), bridge_sync_wait(), sync_payload::data, ast_frame::data, ast_frame::datalen, ast_frame::frametype, sync_payload::id, ast_frame::ptr, sync_ids, and ast_bridge_channel::thread.
Referenced by ast_bridge_channel_queue_playfile_sync().
void bridge_channel_queue_deferred_frames | ( | struct ast_bridge_channel * | bridge_channel | ) |
Definition at line 830 of file bridge_channel.c.
References ast_bridge_channel_lock, ast_bridge_channel_unlock, ast_channel_lock, ast_channel_unlock, ast_frfree, AST_LIST_REMOVE_HEAD, ast_queue_frame_head(), ast_bridge_channel::chan, and ast_bridge_channel::deferred_queue.
Referenced by bridge_complete_join().
|
static |
Definition at line 1274 of file bridge_channel.c.
References bridge_run_app::app_args_offset, bridge_run_app::app_name, ast_bridge_channel_run_app(), bridge_run_app::moh_offset, and NULL.
Referenced by bridge_channel_handle_action().
void bridge_channel_settle_owed_events | ( | struct ast_bridge * | orig_bridge, |
struct ast_bridge_channel * | bridge_channel | ||
) |
Definition at line 792 of file bridge_channel.c.
References ast_channel_name(), AST_CONTROL_T38_PARAMETERS, ast_debug, AST_FRAME_CONTROL, AST_FRAME_DTMF_END, ast_log, AST_T38_TERMINATED, ast_tvdiff_ms(), ast_tvnow(), ast_bridge_channel::chan, ast_bridge_channel::dtmf_digit, ast_bridge_channel::dtmf_tv, ast_frame::frametype, ast_frame::len, LOG_DTMF, NULL, option_dtmfminduration, ast_bridge_channel::owed, ast_control_t38_parameters::request_response, ast_frame::src, ast_bridge_channel::t38_terminate, ast_bridge::technology, ast_bridge::uniqueid, and ast_bridge_technology::write.
Referenced by bridge_channel_internal_join(), and bridge_do_move().
|
static |
Definition at line 875 of file bridge_channel.c.
References ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_bridge_channel::bridge, and bridge_channel_internal_suspend_nolock().
Referenced by bridge_channel_do_callback(), bridge_channel_event_join_leave(), bridge_channel_handle_action(), and bridge_channel_handle_interval().
|
static |
Definition at line 1899 of file bridge_channel.c.
References ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ao2_unlink, AST_BRIDGE_HOOK_TYPE_TALK, 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_channel_handle_action().
|
static |
Definition at line 918 of file bridge_channel.c.
References ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_bridge_channel::bridge, and bridge_channel_internal_unsuspend_nolock().
Referenced by ast_bridge_channel_feature_digit(), bridge_channel_do_callback(), bridge_channel_event_join_leave(), bridge_channel_handle_action(), and bridge_channel_handle_interval().
|
static |
Definition at line 529 of file bridge_channel.c.
References ast_assert, ast_channel_lock_both, ast_channel_unlock, AST_LIST_TRAVERSE, ast_bridge_channel::bridge, ast_bridge_channel::chan, channel_set_empty_accountcodes(), channel_update_peeraccounts(), ast_bridge::channels, and ast_bridge::num_channels.
Referenced by ast_bridge_channel_update_accountcodes().
|
static |
Definition at line 576 of file bridge_channel.c.
References ast_assert, ast_channel_lock_both, ast_channel_unlock, AST_LIST_FIRST, AST_LIST_LAST, ast_bridge_channel::bridge, ast_bridge_channel::chan, channel_set_empty_accountcodes(), channel_update_peeraccounts(), ast_bridge::channels, ast_bridge::dissolved, first, and ast_bridge::num_channels.
Referenced by ast_bridge_channel_update_accountcodes().
|
static |
Definition at line 2808 of file bridge_channel.c.
References ast_bridge_channel::activity, ast_bridge_channel::alert_pipe, ao2_object_get_lockaddr(), ast_bridge_channel_lock, ast_bridge_channel_lock_bridge(), ast_bridge_channel_unlock, ast_bridge_unlock, ast_channel_name(), ast_channel_set_unbridged(), ast_channel_unbridged(), ast_cond_wait, ast_debug, ast_waitfor_nandfds(), ast_bridge_channel::bridge, bridge_channel_handle_feature_timeout(), bridge_channel_handle_interval(), bridge_channel_handle_write(), bridge_channel_next_timeout(), BRIDGE_CHANNEL_STATE_WAIT, BRIDGE_CHANNEL_THREAD_FRAME, BRIDGE_CHANNEL_THREAD_IDLE, bridge_handle_trip(), bridge_reconfigured(), ast_bridge_channel::chan, ast_bridge_channel::cond, NULL, ast_bridge::reconfigured, ast_bridge_channel::state, ast_bridge_channel::suspended, and ast_bridge::uniqueid.
Referenced by bridge_channel_internal_join().
|
static |
Definition at line 1010 of file bridge_channel.c.
References AST_FRAME_BRIDGE_ACTION, bridge_channel_write_frame(), ast_frame::datalen, and ast_frame::frametype.
Referenced by ast_bridge_channel_write_app(), ast_bridge_channel_write_callback(), ast_bridge_channel_write_park(), ast_bridge_channel_write_playfile(), and bridge_channel_write_dtmf_stream().
|
static |
Definition at line 1659 of file bridge_channel.c.
References BRIDGE_CHANNEL_ACTION_DTMF_STREAM, and bridge_channel_write_action_data().
Referenced by ast_bridge_channel_feature_digit().
|
static |
Definition at line 650 of file bridge_channel.c.
References ast_assert, ast_bridge_channel_lock, ast_bridge_channel_lock_bridge(), ast_bridge_channel_unlock, ast_bridge_unlock, ast_channel_is_multistream(), AST_CONTROL_T38_PARAMETERS, AST_FRAME_BRIDGE_ACTION_SYNC, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_IMAGE, AST_FRAME_RTCP, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_frdup, AST_LIST_INSERT_HEAD, AST_T38_NEGOTIATED, AST_T38_REFUSED, AST_T38_REQUEST_NEGOTIATE, AST_T38_REQUEST_TERMINATE, AST_T38_TERMINATED, ast_tvnow(), AST_VECTOR_GET, AST_VECTOR_SIZE, ast_bridge_channel::bridge, ast_bridge_channel::chan, ast_frame::data, ast_bridge_channel::deferred_queue, ast_bridge_channel::dtmf_digit, ast_bridge_channel::dtmf_tv, ast_frame::frametype, ast_frame_subclass::integer, ast_bridge_channel::owed, ast_frame::ptr, ast_control_t38_parameters::request_response, ast_bridge_channel::stream_map, ast_frame::stream_num, ast_frame::subclass, ast_bridge_channel::t38_terminate, ast_bridge::technology, ast_bridge_channel::to_bridge, and ast_bridge_technology::write.
Referenced by ast_bridge_channel_write_control_data(), bridge_channel_write_action_data(), and bridge_handle_trip().
|
static |
Definition at line 1023 of file bridge_channel.c.
References AST_FRAME_BRIDGE_ACTION_SYNC, ast_frfree, AST_RWLIST_RDLOCK, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, bridge_sync_signal(), ast_frame::data, ast_frame::frametype, sync_payload::id, bridge_sync::id, bridge_sync::list, and ast_frame::ptr.
Referenced by ast_bridge_channel_queue_frame(), bridge_channel_destroy(), bridge_channel_handle_write(), bridge_handle_dtmf(), and bridge_handle_trip().
|
static |
Internal function to handle DTMF from a channel.
Definition at line 2548 of file bridge_channel.c.
References ao2_cleanup, ao2_find, ast_assert, ast_bridge_channel_feature_digit(), AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, ast_test_suite_event_notify, bridge_frame_free(), ast_bridge_channel::collected, ast_bridge_hook_dtmf::dtmf, ast_bridge_channel::dtmf_hook_state, ast_bridge_features::dtmf_hooks, ast_bridge_channel::features, ast_frame::frametype, ast_frame_subclass::integer, NULL, OBJ_SEARCH_PARTIAL_KEY, and ast_frame::subclass.
Referenced by bridge_handle_trip().
|
static |
Definition at line 2608 of file bridge_channel.c.
References ast_bridge_channel_kick(), ast_bridge_channel_lock_bridge(), ast_bridge_channel_stream_map(), ast_bridge_unlock, ast_channel_call_forward(), ast_channel_is_multistream(), ast_channel_publish_dial(), ast_channel_publish_dial_forward(), AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HANGUP, AST_CONTROL_PROCEEDING, AST_CONTROL_PROGRESS, AST_CONTROL_RINGING, AST_CONTROL_STREAM_TOPOLOGY_CHANGED, AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE, AST_FRAME_CONTROL, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, ast_read_stream(), ast_read_stream_noaudio(), ast_strlen_zero, ast_bridge_channel::bridge, bridge_channel_write_frame(), bridge_frame_free(), bridge_handle_dtmf(), ast_bridge_channel::chan, controls, ast_bridge_features::dtmf_passthrough, ast_bridge_channel::features, ast_frame::frametype, ast_frame_subclass::integer, ast_bridge_features::mute, NULL, ast_frame::stream_num, ast_bridge_technology::stream_topology_changed, ast_bridge_technology::stream_topology_request_change, ast_frame::subclass, and ast_bridge::technology.
Referenced by bridge_channel_wait().
|
static |
Clean up a syncrhonization bridge object.
This frees fields within the synchronization object and removes it from the list of active synchronization objects.
Since synchronization objects are stack-allocated, it is vital that this is called before the synchronization object goes out of scope.
sync_struct | Synchronization object to clean up. |
Definition at line 147 of file bridge_channel.c.
References AST_LIST_REMOVE_CURRENT, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_sem_destroy(), bridge_sync::id, bridge_sync::list, and bridge_sync::sem.
Referenced by bridge_channel_queue_action_data_sync().
|
static |
initialize a synchronous bridge object.
This both initializes the structure and adds it to the list of synchronization structures.
sync_struct | The synchronization object to initialize. |
id | ID to assign to the synchronization object. |
Definition at line 124 of file bridge_channel.c.
References AST_RWLIST_INSERT_TAIL, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_sem_init(), sync_payload::id, bridge_sync::id, and bridge_sync::sem.
Referenced by bridge_channel_queue_action_data_sync().
|
static |
Signal that waiting for a synchronous bridge action is no longer necessary.
This may occur for several reasons
sync_struct | Synchronization object corresponding to the bridge action. |
Definition at line 206 of file bridge_channel.c.
References ast_sem_post(), and bridge_sync::sem.
Referenced by bridge_frame_free().
|
static |
Wait for a synchronous bridge action to complete.
sync_struct | Synchronization object corresponding to the bridge action. |
Definition at line 185 of file bridge_channel.c.
References ast_samp2tv(), ast_sem_timedwait(), ast_tvadd(), ast_tvnow(), PLAYBACK_TIMEOUT, and bridge_sync::sem.
Referenced by bridge_channel_queue_action_data_sync().
|
static |
Definition at line 443 of file bridge_channel.c.
References ast_channel_accountcode(), ast_channel_name(), ast_channel_peeraccount(), ast_debug, and ast_strlen_zero.
Referenced by channel_set_empty_accountcodes().
|
static |
Definition at line 420 of file bridge_channel.c.
References ast_channel_accountcode(), ast_channel_name(), ast_channel_peeraccount(), ast_debug, and ast_strlen_zero.
Referenced by channel_set_empty_accountcodes().
|
static |
Definition at line 278 of file bridge_channel.c.
References AST_CAUSE_NORMAL_CLEARING, ast_channel_hangupcause(), ast_channel_hangupcause_set(), ast_channel_lock, and ast_channel_unlock.
Referenced by ast_bridge_channel_kick(), and ast_bridge_channel_leave_bridge_nolock().
|
static |
Definition at line 466 of file bridge_channel.c.
References channel_fill_empty_accountcode(), and channel_fill_empty_peeraccount().
Referenced by bridge_channel_update_accountcodes_joining(), and bridge_channel_update_accountcodes_leaving().
|
static |
Definition at line 489 of file bridge_channel.c.
References ast_channel_accountcode(), ast_channel_name(), ast_channel_peeraccount(), and ast_debug.
Referenced by channel_update_peeraccounts().
|
static |
Definition at line 511 of file bridge_channel.c.
References channel_update_peeraccount().
Referenced by bridge_channel_update_accountcodes_joining(), and bridge_channel_update_accountcodes_leaving().
|
static |
Definition at line 1285 of file bridge_channel.c.
References bridge_run_app::app_args_offset, bridge_run_app::app_name, ast_strlen_zero, BRIDGE_CHANNEL_ACTION_RUN_APP, and bridge_run_app::moh_offset.
Referenced by ast_bridge_channel_queue_app(), and ast_bridge_channel_write_app().
|
static |
Definition at line 1457 of file bridge_channel.c.
References ast_assert, BRIDGE_CHANNEL_ACTION_CALLBACK, bridge_custom_callback::callback, bridge_custom_callback::flags, bridge_custom_callback::payload, bridge_custom_callback::payload_exists, and bridge_custom_callback::payload_size.
Referenced by ast_bridge_channel_queue_callback(), and ast_bridge_channel_write_callback().
|
static |
Definition at line 1531 of file bridge_channel.c.
References bridge_park::app_data_offset, BRIDGE_CHANNEL_ACTION_PARK, bridge_park::parkee_uuid, and bridge_park::parker_uuid_offset.
Referenced by ast_bridge_channel_write_park().
|
static |
Definition at line 1378 of file bridge_channel.c.
References ast_alloca, BRIDGE_CHANNEL_ACTION_PLAY_FILE, bridge_playfile::custom_play, bridge_playfile::moh_offset, and bridge_playfile::playfile.
Referenced by ast_bridge_channel_queue_playfile(), ast_bridge_channel_queue_playfile_sync(), and ast_bridge_channel_write_playfile().
|
static |
Definition at line 1211 of file bridge_channel.c.
References app, ast_app_exec_macro(), ast_app_exec_sub(), ast_free, ast_log, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), LOG_WARNING, NULL, pbx_exec(), and pbx_findapp().
Referenced by ast_bridge_channel_run_app().
|
static |
Definition at line 2409 of file bridge_channel.c.
References ast_free, ast_sendtext(), ast_strndup, ast_frame::data, ast_frame::datalen, ast_frame::ptr, and text.
Referenced by bridge_channel_handle_write().
|
static |
Definition at line 1675 of file bridge_channel.c.
References ao2_cleanup, ast_channel_lock, ast_channel_unlock, ast_get_chan_featuremap_config(), ast_get_chan_features_xfer_config(), ast_test_suite_event_notify, ast_featuremap_config::atxfer, ast_features_xfer_config::atxferthreeway, ast_featuremap_config::automixmon, ast_featuremap_config::automon, ast_featuremap_config::blindxfer, ast_featuremap_config::disconnect, and ast_featuremap_config::parkcall.
Referenced by ast_bridge_channel_feature_digit().
|
static |
Definition at line 2593 of file bridge_channel.c.
Referenced by bridge_handle_trip().
|
static |
Counter used for assigning synchronous bridge action IDs.
Definition at line 78 of file bridge_channel.c.
Referenced by bridge_channel_queue_action_data_sync().
|
static |