130 #define BRIDGE_ARRAY_START 128 133 #define BRIDGE_ARRAY_GROW 32 136 #define BLINDTRANSFER "BLINDTRANSFER" 139 #define ATTENDEDTRANSFER "ATTENDEDTRANSFER" 193 if (bridge_manager->
stop) {
221 || !technology->
write) {
231 if ((!strcasecmp(current->
name, technology->
name)) || (current == technology)) {
232 ast_log(
LOG_WARNING,
"A bridge technology of %s already claims to exist in our world.\n",
240 technology->
mod = module;
260 ast_verb(2,
"Registered bridge technology %s\n", technology->
name);
273 if (current == technology) {
275 ast_verb(2,
"Unregistered bridge technology %s\n", technology->
name);
283 return current ? 0 : -1;
298 ast_debug(1,
"Bridge %s: queueing action type:%u sub:%d\n",
335 bridge->
cause = cause;
337 ast_debug(1,
"Bridge %s: dissolving bridge with cause %d(%s)\n",
397 unsigned char data[1024];
400 if (!bridge_channel ||
446 ast_debug(1,
"Bridge %s: %p(%s) is joining %s technology\n",
452 ast_debug(1,
"Bridge %s: %p(%s) failed to join %s technology (Kicking it out)\n",
469 bridge_channel->
bridge, bridge_channel);
519 ast_debug(1,
"Bridge technology %s is suspended. Skipping.\n",
524 ast_debug(1,
"Bridge technology %s does not have any capabilities we want.\n",
529 ast_debug(1,
"Bridge technology %s has less preference than %s (%u <= %u). Skipping.\n",
534 ast_debug(1,
"Bridge technology %s is not compatible with properties of existing bridge.\n",
539 ast_debug(1,
"Bridge technology %s is not running, skipping.\n", current->
name);
581 .name = bridge->
name,
585 ast_debug(1,
"Bridge %s: calling %s technology destructor (deferred, dummy)\n",
607 int in_destructor = !
ao2_ref(bridge, 0);
662 ast_debug(1,
"Bridge %s: actually destroying %s bridge, nobody wants it anymore\n",
677 ast_debug(1,
"Bridge %s: calling %s bridge destructor\n",
683 ast_debug(1,
"Bridge %s: calling %s technology stop\n",
690 ast_debug(1,
"Bridge %s: calling %s technology destructor\n",
737 ast_log(
LOG_ERROR,
"Virtual method table for bridge class %s not complete.\n",
738 v_table && v_table->
name ? v_table->
name :
"<unknown>");
780 self->allowed_capabilities = capabilities;
793 if (!self->technology) {
794 ast_log(
LOG_WARNING,
"Bridge %s: Could not create class %s. No technology to support it.\n",
795 self->uniqueid, self->v_table->name);
801 ast_debug(1,
"Bridge %s: calling %s technology constructor\n",
802 self->uniqueid, self->technology->name);
803 if (self->technology->create && self->technology->create(
self)) {
805 self->uniqueid, self->technology->name);
809 ast_debug(1,
"Bridge %s: calling %s technology start\n",
810 self->uniqueid, self->technology->name);
811 if (self->technology->start && self->technology->start(
self)) {
813 self->uniqueid, self->technology->name);
818 if (!(flags & AST_BRIDGE_FLAG_INVISIBLE)) {
910 self->reconfigured = 1;
972 ast_debug(1,
"Bridge %s: telling all channels to leave the party\n", bridge->
uniqueid);
1000 uint32_t new_capabilities;
1009 .name = bridge->
name,
1014 ast_debug(1,
"Bridge %s is dissolved, not performing smart bridge operation.\n",
1026 if (!new_capabilities
1035 if (!new_technology) {
1036 int is_compatible = 0;
1039 is_compatible = old_technology->
compatible(bridge);
1047 if (is_compatible) {
1048 ast_debug(1,
"Bridge %s could not get a new technology, staying with old technology.\n",
1056 if (new_technology == old_technology) {
1057 ast_debug(1,
"Bridge %s is already using the new technology.\n",
1063 if (old_technology->
destroy) {
1071 .data.ptr = &deferred_tech_destroy,
1072 .datalen =
sizeof(deferred_tech_destroy),
1080 if (!deferred_action) {
1085 deferred_action =
NULL;
1093 ast_verb(4,
"Bridge %s: switching from %s technology to %s\n",
1106 ast_debug(1,
"Bridge %s: calling %s technology constructor\n",
1108 if (new_technology->
create && new_technology->
create(bridge)) {
1124 ast_debug(1,
"Bridge %s: moving %p(%s) to dummy bridge temporarily\n",
1140 ast_debug(1,
"Bridge %s: %p(%s) is leaving %s technology (dummy)\n",
1142 old_technology->
name);
1143 if (old_technology->
leave) {
1144 old_technology->
leave(&dummy_bridge, bridge_channel);
1158 ast_debug(1,
"Bridge %s: calling %s technology stop\n",
1160 if (old_technology->
stop) {
1161 old_technology->
stop(&dummy_bridge);
1169 ast_debug(1,
"Bridge %s: calling %s technology start\n",
1171 if (new_technology->
start && new_technology->
start(bridge)) {
1181 if (old_technology->
destroy) {
1182 ast_debug(1,
"Bridge %s: deferring %s technology destructor\n",
1186 ast_debug(1,
"Bridge %s: calling %s technology destructor\n",
1265 const char *c0_name;
1266 const char *c1_name;
1267 const char *c0_pvtid =
NULL;
1268 const char *c1_pvtid =
NULL;
1269 #define UPDATE_BRIDGE_VARS_GET(chan, name, pvtid) \ 1271 name = ast_strdupa(ast_channel_name(chan)); \ 1272 if (ast_channel_tech(chan)->get_pvt_uniqueid) { \ 1273 pvtid = ast_strdupa(ast_channel_tech(chan)->get_pvt_uniqueid(chan)); \ 1305 int need_separator = 0;
1311 for (idx = 0; idx < num_names; ++idx) {
1312 if (idx == cur_idx) {
1316 if (need_separator) {
1349 #define MAX_BRIDGEPEER_CHANS (10 + 1) 1352 unsigned int num_names;
1360 names =
ast_alloca(num_names *
sizeof(*names));
1363 if (num_names <= idx) {
1373 for (idx = 0; idx < num_names; ++idx) {
1374 len += strlen(names[idx]);
1382 if (idx < num_names) {
1474 if (bridge_channel->
chan == chan) {
1479 return bridge_channel;
1491 if (!bridge_channel) {
1497 bridge = bridge_channel->
bridge;
1577 .
type =
"bridge-impart-ds",
1613 datastore->
data = ds_head;
1616 ds_head = datastore->
data;
1650 while (!cond->
done) {
1682 if (!bridge_channel) {
1683 ao2_t_cleanup(swap,
"Error exit: bridge_channel alloc failed");
1706 bridge_channel->
thread = pthread_self();
1717 if (bridge_channel->
swap) {
1762 if (bridge_channel->
callid) {
1773 ao2_t_cleanup(bridge_channel->
swap,
"Bridge complete: Departable impart join failed");
1793 if (bridge_channel->
callid) {
1798 chan = bridge_channel->
chan;
1809 ao2_t_cleanup(bridge_channel->
swap,
"Bridge complete: Independent impart join failed");
1851 if (!bridge_channel) {
1866 bridge_channel->
swap =
ao2_t_bump(swap,
"Setting up bridge impart");
1878 if (bridge_channel->
swap) {
1960 departable = bridge_channel && bridge_channel->
depart_wait;
1984 ast_debug(1,
"Waiting for %p(%s) bridge thread to die.\n",
2001 ast_debug(1,
"Removing channel %s from bridge %s\n",
2062 old_bridge = bridge_channel->
bridge;
2063 bridge_channel->
bridge = new_bridge;
2086 remove_me = move_cb(bridge_channel, hook->
hook_pvt, src, dst);
2088 ast_debug(1,
"Move detection hook %p is being removed from %p(%s)\n",
2097 unsigned int optimized)
2102 ast_debug(1,
"Merging bridge %s into bridge %s\n",
2127 for (idx = 0; idx < num_kick; ++idx) {
2128 if (bridge_channel == kick_me[idx]) {
2163 for (idx = 0; idx < num_kick; ++idx) {
2164 bridge_channel = kick_me[idx];
2178 ast_debug(1,
"Merged bridge %s into bridge %s\n",
2204 int bridge1_priority;
2205 int bridge2_priority;
2215 bridge1_priority = bridge1->v_table->get_merge_priority(bridge1);
2216 bridge2_priority = bridge2->v_table->get_merge_priority(bridge2);
2217 if (bridge2_priority < bridge1_priority) {
2218 merge.
dest = bridge1;
2219 merge.
src = bridge2;
2220 }
else if (bridge1_priority < bridge2_priority) {
2221 merge.
dest = bridge2;
2222 merge.
src = bridge1;
2225 if (bridge2->num_channels <= bridge1->num_channels) {
2226 merge.
dest = bridge1;
2227 merge.
src = bridge2;
2229 merge.
dest = bridge2;
2230 merge.
src = bridge1;
2236 merge.
dest = bridge1;
2237 merge.
src = bridge2;
2241 merge.
dest = bridge2;
2242 merge.
src = bridge1;
2270 ast_assert(dst_bridge && src_bridge && dst_bridge != src_bridge && (!num_kick || kick_me));
2273 ast_debug(1,
"Can't merge bridges %s and %s, at least one bridge is dissolved.\n",
2279 ast_debug(1,
"Can't merge bridges %s and %s, masquerade only.\n",
2284 ast_debug(1,
"Can't merge bridges %s and %s, merging temporarily inhibited.\n",
2289 if (merge_best_direction) {
2292 merge.
dest = dst_bridge;
2293 merge.
src = src_bridge;
2299 ast_debug(1,
"Can't merge bridges %s and %s, merging inhibited.\n",
2309 ast_debug(1,
"Can't merge bridge %s into bridge %s, not enough channels in source bridge.\n",
2317 ast_debug(1,
"Can't merge bridge %s into bridge %s, multimix is needed and it cannot be acquired.\n",
2323 unsigned int num_to_kick = 0;
2326 kick_them =
ast_alloca(num_kick *
sizeof(*kick_them));
2327 for (idx = 0; idx < num_kick; ++idx) {
2329 if (!kick_them[num_to_kick]) {
2332 if (kick_them[num_to_kick]) {
2337 if (num_to_kick != num_kick) {
2338 ast_debug(1,
"Can't merge bridge %s into bridge %s, at least one kicked channel is not in either bridge.\n",
2356 res =
bridge_merge_locked(dst_bridge, src_bridge, merge_best_direction, kick_me, num_kick);
2363 unsigned int optimized)
2369 if (bridge_channel->
swap) {
2370 ast_debug(1,
"Moving %p(%s) into bridge %s swapping with %s\n",
2374 ast_debug(1,
"Moving %p(%s) into bridge %s\n",
2378 orig_bridge = bridge_channel->
bridge;
2379 was_in_bridge = bridge_channel->
in_bridge;
2405 if (attempt_recovery && was_in_bridge) {
2421 }
else if (!optimized) {
2452 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, at least one bridge is dissolved.\n",
2458 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, masquerade only.\n",
2463 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, temporarily inhibited.\n",
2469 if (!bridge_channel) {
2470 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, channel not in bridge.\n",
2475 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, channel leaving bridge.\n",
2481 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, channel immovable.\n",
2490 if (!bridge_channel_swap) {
2491 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, swap channel %s not in bridge.\n",
2497 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, swap channel %s leaving bridge.\n",
2505 return bridge_do_move(dst_bridge, bridge_channel, attempt_recovery, 0);
2591 struct ast_channel *play_chan = yanked_chan ?: chan;
2598 if (!play_bridge_channel) {
2646 bridge = bridge_channel->
bridge;
2698 bridge = bridge_channel->
bridge;
2756 && chan_priority <= peer_priority) {
2759 && peer_priority <= chan_priority) {
2806 dst_bridge = chan_bridge;
2807 dst_bridge_channel = chan_bridge_channel;
2808 src_bridge_channel = peer_bridge_channel;
2811 dst_bridge = peer_bridge;
2812 dst_bridge_channel = peer_bridge_channel;
2813 src_bridge_channel = chan_bridge_channel;
2830 ast_verb(4,
"Move-swap optimizing %s <-- %s.\n",
2841 other->
swap = dst_bridge_channel->
chan;
2924 chan_bridge_channel,
2925 peer_bridge_channel,
2935 ast_debug(4,
"Can't optimize %s -- %s out, not enough channels in bridge %s.\n",
2941 ast_debug(4,
"Can't optimize %s -- %s out, multimix is needed and it cannot be acquired.\n",
2947 ast_verb(4,
"Merge optimizing %s -- %s out.\n",
2987 peer_bridge, peer_bridge_channel, pvt);
2990 peer_bridge, peer_bridge_channel, pvt);
2991 }
else if (0 < res) {
3032 if (merge.
dest == chan_bridge) {
3163 callback(bridge_channel, hook_pvt);
3257 hook_pvt, destructor, remove_flags);
3334 return bridge_other_hook(features, callback, hook_pvt, destructor, remove_flags,
3344 return bridge_other_hook(features, callback, hook_pvt, destructor, remove_flags,
3354 return bridge_other_hook(features, callback, hook_pvt, destructor, remove_flags,
3384 unsigned int interval,
3393 if (!features ||!interval || !callback) {
3399 hook_pvt, destructor, remove_flags);
3409 ast_debug(1,
"Putting interval hook %p with interval %u in the heap on features %p\n",
3425 return res ? -1 : 0;
3445 ast_debug(1,
"Failed to enable built in feature %u on %p, no DTMF string is available for it.\n",
3456 config, destructor, remove_flags);
3461 memset(limits, 0,
sizeof(*limits));
3483 return callback(features, limits, remove_flags);
3486 ast_log(
LOG_ERROR,
"Attempted to set limits without an AST_BRIDGE_BUILTIN_INTERVAL_LIMITS callback registered.\n");
3610 const char *right_key = obj_right;
3619 cmp = strcasecmp(hook_left->
dtmf.
code, right_key);
3622 cmp = strncasecmp(hook_left->
dtmf.
code, right_key, strlen(right_key));
3690 memset(features, 0,
sizeof(*features));
3821 if (video_src_chan) {
3823 ast_verb(5,
"Video source in bridge '%s' (%s) is now '%s' (%s)\n",
3907 ast_verb(5,
"Video source in bridge '%s' (%s) is now '%s' (%s)\n",
3915 }
else if (!data->
chan_vsrc && is_keyframe) {
3918 ast_verb(5,
"Video source in bridge '%s' (%s) is now '%s' (%s)\n",
4020 switch (video_mode) {
4043 const char *
name = obj;
4067 const char *right_name = arg;
4126 if (iter->
chan != chan) {
4132 if (in_bridge && peer) {
4189 snprintf(chan_name,
sizeof(chan_name),
"%s@%s", exten, context);
4209 if (new_channel_cb) {
4213 if (
ast_call(local, chan_name, 0)) {
4249 if (transferee != transferer) {
4284 #define BRIDGE_LOCK_ONE_OR_BOTH(b1, b2) \ 4287 ast_bridge_lock_both(b1, b2); \ 4289 ast_bridge_lock(b1); \ 4293 static const char *dest =
"_attended@transfer/m";
4332 if (
ast_call(local_chan, dest, 0)) {
4355 if (!locals[0] || !locals[1]) {
4364 if (local_chan != locals[0]) {
4365 SWAP(locals[0], locals[1]);
4392 if (!transferer_bridge_channel) {
4397 context, exten, new_channel_cb, user_data_wrapper)) {
4439 const char *transferer_name;
4440 const char *transferer_bridgepeer;
4450 if (chan == transferer) {
4487 int do_bridge_transfer;
4488 int transfer_prohibited;
4492 if (!transfer_message) {
4496 ast_log(
LOG_ERROR,
"Unable to allocate memory for blind transfer publication from %s\n",
4510 if (!transfer_message->bridge) {
4518 if (!transfer_message->transferee) {
4527 if (!bridge_channel) {
4532 user_data_wrapper =
ao2_alloc(
sizeof(*user_data_wrapper),
NULL);
4533 if (!user_data_wrapper) {
4538 user_data_wrapper->data = user_data;
4543 transfer_result =
try_parking(transferer, context, exten, new_channel_cb, user_data_wrapper);
4549 user_data_wrapper->completed = 1;
4570 if (transfer_prohibited) {
4577 if (do_bridge_transfer) {
4579 exten, context, transferee, new_channel_cb, user_data_wrapper, transfer_message);
4591 new_channel_cb, user_data_wrapper)) {
4600 transfer_message->result = transfer_result;
4602 return transfer_result;
4626 if (bridged_to_source
4630 bridged_to_source->
swap = swap_channel;
4671 to_transferee_bridge_channel,
4672 to_target_bridge_channel,
4689 final_bridge = to_transferee_bridge;
4693 final_bridge = to_target_bridge;
4697 final_bridge = to_transferee_bridge;
4702 final_bridge = to_target_bridge;
4718 to_transferee_bridge, to_target_bridge, transfer_msg);
4742 int transfer_prohibited;
4743 int do_bridge_transfer;
4746 int hangup_target = 0;
4752 to_transfer_target, to_target_bridge,
NULL,
NULL);
4753 if (!transfer_msg) {
4754 ast_log(
LOG_ERROR,
"Unable to create Stasis publication for attended transfer from %s\n",
4760 if (!to_transferee_bridge && !to_target_bridge) {
4773 if (to_transferee_bridge_channel) {
4782 if (to_target_bridge_channel) {
4783 const char *target_complete_sound;
4795 "ATTENDED_TRANSFER_COMPLETE_SOUND");
4797 target_complete_sound =
ast_strdupa(target_complete_sound);
4799 target_complete_sound =
NULL;
4802 if (!target_complete_sound) {
4805 "ATTENDED_TRANSFER_COMPLETE_SOUND");
4807 target_complete_sound =
ast_strdupa(target_complete_sound);
4809 target_complete_sound =
NULL;
4813 if (target_complete_sound) {
4815 target_complete_sound,
NULL);
4820 if (to_transferee_bridge && to_target_bridge) {
4822 if (!to_transferee_bridge_channel || !to_target_bridge_channel) {
4829 to_transfer_target, to_target_bridge_channel,
4830 to_transferee_bridge, to_target_bridge, transfer_msg);
4838 the_bridge = to_transferee_bridge ?: to_target_bridge;
4839 chan_bridged = to_transferee_bridge ? to_transferee : to_transfer_target;
4840 chan_unbridged = to_transferee_bridge ? to_transfer_target : to_transferee;
4858 if (chan_count <= 1) {
4869 if (transfer_prohibited) {
4876 if (do_bridge_transfer) {
4881 hangup_target = chan_bridged == to_transfer_target;
4909 transfer_msg->result = res;
4948 while (!manager->
stop) {
4988 ast_debug(1,
"Waiting for bridge manager thread to die.\n");
5050 const struct ast_bridge *bridge_left = obj_left;
5051 const struct ast_bridge *bridge_right = obj_right;
5052 const char *right_key = obj_right;
5058 right_key = bridge_right->
uniqueid;
5061 cmp = strcmp(bridge_left->
uniqueid, right_key);
5064 cmp = strncmp(bridge_left->
uniqueid, right_key, strlen(right_key));
5096 #define FORMAT_HDR "%-36s %5s %-15s %-15s %s\n" 5097 #define FORMAT_ROW "%-36s %5u %-15s %-15s %s\n" 5104 e->
command =
"bridge show all";
5106 "Usage: bridge show all\n" 5107 " List all bridges\n";
5118 char print_time[32];
5160 char print_time[32];
5166 "Usage: bridge show <bridge-id>\n" 5167 " Show information about the <bridge-id> bridge\n";
5198 ast_cli(a->
fd,
"Duration: %s\n", print_time);
5212 e->
command =
"bridge destroy";
5214 "Usage: bridge destroy <bridge-id>\n" 5215 " Destroy the <bridge-id> bridge\n";
5252 wordlen = strlen(word);
5271 static const char *
const completions[] = {
"all",
NULL };
5278 "Usage: bridge kick <bridge-id> <channel-name | all>\n" 5279 " Kick the <channel-name> channel out of the <bridge-id> bridge\n" 5280 " If all is specified as the channel name then all channels will be\n" 5281 " kicked out of the bridge.\n";
5304 if (!strcasecmp(a->
argv[3],
"all")) {
5307 ast_cli(a->
fd,
"Kicking all channels from bridge '%s'\n", a->
argv[2]);
5324 ast_cli(a->
fd,
"Kicking channel '%s' from bridge '%s'\n",
5357 #define FORMAT_HDR "%-20s %-20s %8s %s\n" 5358 #define FORMAT_ROW "%-20s %-20s %8u %s\n" 5364 e->
command =
"bridge technology show";
5366 "Usage: bridge technology show\n" 5367 " List registered bridge technologies\n";
5395 wordlen = strlen(word);
5398 if (!strncasecmp(cur->
name, word, wordlen)) {
5417 e->
command =
"bridge technology {suspend|unsuspend}";
5419 "Usage: bridge technology {suspend|unsuspend} <technology-name>\n" 5420 " Suspend or unsuspend a bridge technology.\n";
5433 suspend = !strcasecmp(a->
argv[2],
"suspend");
5437 if (!strcasecmp(cur->
name, a->
argv[3])) {
5451 ast_cli(a->
fd,
"Suspended bridge technology '%s'\n", a->
argv[3]);
5453 ast_cli(a->
fd,
"Unsuspended bridge technology '%s'\n", a->
argv[3]);
5456 ast_cli(a->
fd,
"Bridge technology '%s' not found\n", a->
argv[3]);
5488 if (!strcasecmp(cur->
name, name)) {
5504 astman_send_ack(s, m, (suspend ?
"Suspended bridge technology" :
"Unsuspended bridge technology"));
5543 "Event: BridgeTechnologyListItem\r\n" 5544 "BridgeTechnology: %s\r\n" 5545 "BridgeType: %s\r\n" 5546 "BridgePriority: %u\r\n" 5547 "BridgeSuspended: %s\r\n" 5580 prnt(where,
"%s %s chans:%u",
5602 bridge_manager =
NULL;
5614 if (!bridge_manager) {
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
#define AST_VECTOR_FREE(vec)
Deallocates this vector.
Internal bridge impart wait condition and associated conditional.
void ast_channel_internal_bridge_channel_set(struct ast_channel *chan, struct ast_bridge_channel *value)
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.
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.
struct ast_bridge * bridge_alloc(size_t size, const struct ast_bridge_methods *v_table)
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)
void ast_party_connected_line_init(struct ast_party_connected_line *init)
Initialize the given connected line structure.
#define ast_channel_lock(chan)
struct ao2_container * channels
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
Local proxy channel special access.
enum bridge_channel_thread_state activity
The bridge channel thread activity.
#define AST_CLI_DEFINE(fn, txt,...)
static char * handle_bridge_show_specific(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
Caching pattern for Stasis Message Bus API topics.
int ast_connected_line_build_data(unsigned char *data, size_t datalen, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update)
Build the connected line information data frame.
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.
#define ast_frdup(fr)
Copies a frame.
static void bridge_channel_impart_ds_head_signal(struct bridge_channel_impart_ds_head *ds_head)
#define ao2_t_cleanup(obj, tag)
struct ast_bridge_methods ast_bridge_base_v_table
Bridge base class virtual method table.
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.
void ast_bridge_run_after_goto(struct ast_channel *chan)
Run a PBX on any after bridge goto location.
struct timeval creationtime
struct ast_channel_snapshot_base * base
Asterisk locking-related definitions:
void astman_append(struct mansession *s, const char *fmt,...)
#define ast_bridge_lock_both(bridge1, bridge2)
Lock two bridges.
Asterisk main include file. File version handling, generic pbx functions.
struct ast_flags feature_flags
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
struct ast_blind_transfer_message * ast_blind_transfer_message_create(int is_external, struct ast_channel *transferer, const char *exten, const char *context)
Create a blind transfer message to be published.
const ast_string_field uniqueid
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
struct ast_bridge_features * features
int ast_bridging_init(void)
Initialize the bridging system.
int(* ast_bridge_talking_indicate_callback)(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)
Talking indicator callback.
ast_bridge_video_mode_type
Video source modes.
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.
static void bridge_channel_change_bridge(struct ast_bridge_channel *bridge_channel, struct ast_bridge *new_bridge)
void bridge_channel_internal_suspend_nolock(struct ast_bridge_channel *bridge_channel)
#define AST_RWLIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a read/write list of specified type, statically initialized...
static void bridge_cleanup(void)
#define AST_UNREAL_OPTIMIZE_BEGUN
struct ast_bridge * ast_bridge_transfer_acquire_bridge(struct ast_channel *chan)
Acquire the channel's bridge for transfer purposes.
static char * handle_bridge_destroy_specific(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
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.
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)
Message representing attended transfer.
static char * handle_bridge_kick_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
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)
struct ast_bridge * bridge_register(struct ast_bridge *bridge)
Register the new bridge with the system.
static void check_bridge_play_sounds(struct ast_bridge *bridge)
#define ast_pthread_create_detached(a, b, c, d)
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).
unsigned int remb_send_interval
int(* ast_bridge_move_indicate_callback)(struct ast_bridge_channel *bridge_channel, void *hook_pvt, struct ast_bridge *src, struct ast_bridge *dst)
Move indicator callback.
static const struct ast_datastore_info bridge_channel_impart_ds_info
Structure that contains features information.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define ast_channel_unref(c)
Decrease channel reference count.
int ast_bridge_features_limits_construct(struct ast_bridge_features_limits *limits)
Constructor function for ast_bridge_features_limits.
The arg parameter is a search key, but is not an object.
#define ast_test_flag(p, flag)
void ast_bridge_publish_attended_transfer(struct ast_attended_transfer_message *transfer_msg)
Publish an attended transfer.
void ast_bridge_channel_kick(struct ast_bridge_channel *bridge_channel, int cause)
Kick the channel out of the bridge.
struct bridge_manager_request::@347 node
Message published during a blind transfer.
static void bridge_manager_service(struct ast_bridge *bridge)
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
struct ast_unreal_pvt_callbacks * callbacks
static void destroy_bridge(void *obj)
ast_bridge_hook_remove_flags
#define ast_heap_unlock(h)
struct ast_bridge_channel * ast_bridge_channel_peer(struct ast_bridge_channel *bridge_channel)
Get the peer bridge channel of a two party bridge.
static int manager_bridge_tech_suspend(struct mansession *s, const struct message *m)
unsigned int internal_mixing_interval
The mixing interval indicates how quickly softmix mixing should occur to mix audio.
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)
int ast_attended_transfer_message_add_app(struct ast_attended_transfer_message *transfer_msg, const char *app, struct ast_channel *replace_channel)
Add details for an attended transfer to an application.
#define AST_RWLIST_WRLOCK(head)
Write locks a list.
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 void bridge_manager_destroy(void *obj)
#define ast_set_flag(p, flag)
int ast_check_hangup_locked(struct ast_channel *chan)
void astman_send_list_complete_start(struct mansession *s, const struct message *m, const char *event_name, int count)
Start the list complete event.
descriptor for a cli entry.
#define MAX_BRIDGEPEER_CHANS
struct ast_bridge_features * ast_bridge_features_new(void)
Allocate a new bridge features struct.
struct ao2_container * ast_bridges(void)
Returns the global bridges container.
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
void bridge_channel_impart_signal(struct ast_channel *chan)
Signal imparting threads to wake up.
static ast_bridge_hook_callback builtin_features_handlers[AST_BRIDGE_BUILTIN_END]
struct ast_bridge_channel * bridge_find_channel(struct ast_bridge *bridge, struct ast_channel *chan)
static void kick_it(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
#define ao2_callback(c, flags, cb_fn, arg)
Structure that contains a snapshot of information about a bridge.
void ast_local_lock_all(struct ast_channel *chan, void **tech_pvt, struct ast_channel **base_chan, struct ast_channel **base_owner)
Add a reference to the local channel's private tech, lock the local channel's private base...
int(* start)(struct ast_bridge *bridge)
Request a bridge technology instance start operations.
int ast_callid_threadassoc_change(ast_callid callid)
Sets what is stored in the thread storage to the given callid if it does not match what is already th...
static void bridge_hook_destroy(void *vhook)
unsigned int reconfigured
struct ast_bridge_video_mode video_mode
int bridge_topics_init(struct ast_bridge *bridge)
const ast_string_field name
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
struct ast_channel * chan_old_vsrc
#define ao2_container_alloc_list(ao2_options, container_options, sort_fn, cmp_fn)
const ast_string_field video_source_id
struct ast_channel * owner
static struct merge_direction bridge_merge_determine_direction(struct ast_bridge *bridge1, struct ast_bridge *bridge2)
int ast_call(struct ast_channel *chan, const char *addr, int timeout)
Make a call.
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 int bridge_dtmf_hook_sort(const void *obj_left, const void *obj_right, int flags)
static void bridge_channel_impart_ds_head_dtor(void *doomed)
Structure representing a snapshot of channel state.
struct ast_channel * chan_vsrc
enum bridge_channel_state state
struct ast_bridge_hook generic
static void bridge_channel_complete_join(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
This is used for both SINGLE_SRC_TALKER mode to set what channel should be the current single video f...
static void set_bridge_peer_vars_multiparty(struct ast_bridge *bridge)
static void bridge_manager_service_req(struct ast_bridge *bridge)
ast_bridge_builtin_interval
static int channel_cmp(void *obj, void *arg, int flags)
static void bridge_prnt_obj(void *v_obj, void *where, ao2_prnt_fn *prnt)
static int interval_wrapper_cb(struct ast_bridge_channel *bridge_channel, void *obj)
Wrapper for interval hooks that calls into the wrapped hook.
Structure for a data store type.
ast_channel_state
ast_channel states
struct ast_heap * ast_heap_destroy(struct ast_heap *h)
Destroy a max heap.
int ast_bridge_features_unregister(enum ast_bridge_builtin_feature feature)
Unregister a handler for a built in feature.
void(* stream_topology_changed)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Callback for when a stream topology changes on the channel.
static int hook_remove_match(void *obj, void *arg, int flags)
static char * handle_bridge_show_all(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
ast_bridge_hook_pvt_destructor destructor
static void bridge_queue_action_nodup(struct ast_bridge *bridge, struct ast_frame *action)
struct ao2_container * dtmf_hooks
ast_bridge_dissolving_fn dissolving
int(* ast_bridge_hook_callback)(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
Hook callback type.
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
static void set_bridge_peer_vars(struct ast_bridge *bridge)
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
static void bridge_base_notify_masquerade(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
int ast_parking_blind_transfer_park(struct ast_bridge_channel *parker, const char *context, const char *exten, transfer_channel_cb parked_channel_cb, struct transfer_channel_data *parked_channel_data)
Perform a blind transfer to a parking extension.
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
static void bridge_base_pull(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
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_channel * ast_channel_yank(struct ast_channel *yankee)
Gain control of a channel in the system.
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.
struct ast_bridge * ast_channel_internal_bridge(const struct ast_channel *chan)
static struct ast_bridge * optimize_lock_peer_stack(struct ast_channel *peer)
int ast_bridge_number_video_src(struct ast_bridge *bridge)
Returns the number of video sources currently active in the bridge.
unsigned int inhibit_merge
Count of the active temporary requests to inhibit bridge merges. Zero if merges are allowed...
static void bridge_base_destroy(struct ast_bridge *self)
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
#define ao2_alloc_options(data_size, destructor_fn, options)
void astman_send_ack(struct mansession *s, const struct message *m, char *msg)
Send ack in manager transaction.
#define ast_mutex_lock(a)
static void set_bridge_peer_vars_2party(struct ast_channel *c0, struct ast_channel *c1)
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.
#define ast_strdup(str)
A wrapper for strdup()
Structure for a data store object.
void ast_party_connected_line_free(struct ast_party_connected_line *doomed)
Destroy the connected line information contents.
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
static struct bridge_manager_controller * bridge_manager
static void bridge_dissolve_check_stolen(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
void bridge_channel_internal_unsuspend_nolock(struct ast_bridge_channel *bridge_channel)
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 char builtin_features_dtmf[AST_BRIDGE_BUILTIN_END][MAXIMUM_DTMF_FEATURE_STRING]
static void cleanup_video_mode(struct ast_bridge *bridge)
#define ast_manager_register_xml_core(action, authority, func)
Register a manager callback using XML documentation to describe the manager.
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)
void * ast_heap_pop(struct ast_heap *h)
Pop the max element off of the heap.
static int manager_bridge_tech_unsuspend(struct mansession *s, const struct message *m)
void ast_cli(int fd, const char *fmt,...)
void bridge_channel_settle_owed_events(struct ast_bridge *orig_bridge, struct ast_bridge_channel *bridge_channel)
static int complete_bridge_live_search(void *obj, void *arg, int flags)
int ast_bridge_depart(struct ast_channel *chan)
Depart a channel from a bridge.
void bridge_merge_inhibit_nolock(struct ast_bridge *bridge, int request)
#define UPDATE_BRIDGE_VARS_GET(chan, name, pvtid)
void(*const optimization_finished)(struct ast_unreal_pvt *p, int success, unsigned int id)
Called when an optimization attempt completed successfully.
int(* ast_bridge_builtin_set_limits_fn)(struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, enum ast_bridge_hook_remove_flags remove_flags)
Attach interval hooks to a bridge features structure.
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
static int bridge_allows_optimization(struct ast_bridge *bridge)
#define ast_cond_signal(cond)
struct ast_bridge_softmix softmix
union ast_bridge_video_mode::@227 mode_data
static ast_bridge_builtin_set_limits_fn builtin_interval_handlers[AST_BRIDGE_BUILTIN_INTERVAL_END]
#define ast_verb(level,...)
int ast_bridge_queue_action(struct ast_bridge *bridge, struct ast_frame *action)
Put an action onto the specified bridge.
int ast_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
int bridge_do_move(struct ast_bridge *dst_bridge, struct ast_bridge_channel *bridge_channel, int attempt_recovery, unsigned int optimized)
const ast_string_field creator
void ast_bridge_discard_after_callback(struct ast_channel *chan, enum ast_bridge_after_cb_reason reason)
Run discarding any after bridge callbacks.
enum ast_bridge_video_sfu_remb_behavior remb_behavior
static struct bridge_manager_controller * bridge_manager_create(void)
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
struct ast_bridge * bridge
Bridge this channel is participating in.
struct ast_frame_subclass subclass
ast_callid ast_read_threadstorage_callid(void)
extracts the callerid from the thread
struct ast_channel * ast_channel_get_by_name_prefix(const char *name, size_t name_len)
Find a channel by a name prefix.
const char * astman_get_header(const struct message *m, char *var)
Get header from mananger transaction.
void() ao2_prnt_fn(void *where, const char *fmt,...)
Print output.
#define ast_module_unref(mod)
Release a reference to the module.
pthread_cond_t ast_cond_t
#define ast_strlen_zero(foo)
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)
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.
struct ast_channel * ast_request(const char *type, struct ast_format_cap *request_cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *addr, int *cause)
Requests a channel.
static char * complete_bridge_live(const char *word)
char * ast_cli_complete(const char *word, const char *const choices[], int pos)
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.
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.
int ast_bridge_destroy(struct ast_bridge *bridge, int cause)
Destroy a bridge.
void ast_bridge_features_merge(struct ast_bridge_features *into, const struct ast_bridge_features *from)
Merge one ast_bridge_features into another.
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...
const struct ast_channel_tech * tech
int __ast_bridge_technology_register(struct ast_bridge_technology *technology, struct ast_module *module)
Register a bridge technology for use.
void bridge_dissolve(struct ast_bridge *bridge, int cause)
int ast_callid_threadassoc_add(ast_callid callid)
Adds a known callid to thread storage of the calling thread.
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
void * ao2_object_get_lockaddr(void *obj)
Return the mutex lock address of an object.
void bridge_topics_destroy(struct ast_bridge *bridge)
struct ast_bridge_technology * technology
static int merge_container_cb(void *obj, void *data, int flags)
Callback for merging hook ao2_containers.
struct ast_flags feature_flags
static void hooks_remove_heap(struct ast_heap *hooks, enum ast_bridge_hook_remove_flags remove_flags)
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
void ao2_container_unregister(const char *name)
Unregister a container for CLI stats and integrity check.
unsigned int text_messaging
struct ast_readq_list * ast_channel_readq(struct ast_channel *chan)
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.
static int bridge_base_get_merge_priority(struct ast_bridge *self)
int ao2_container_register(const char *name, struct ao2_container *self, ao2_prnt_obj_fn *prnt_obj)
Register a container for CLI stats and integrity check.
#define ast_debug(level,...)
Log a DEBUG message.
void(* leave)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Remove a channel from a bridging technology instance for a bridge.
struct ast_bridge * ast_channel_get_bridge(const struct ast_channel *chan)
Get the bridge associated with a channel.
void ast_bridge_merge_inhibit(struct ast_bridge *bridge, int request)
Adjust the bridge merge inhibit request count.
static char * complete_bridge_technology(const char *word)
int ast_stasis_bridging_init(void)
#define ast_heap_push(h, elm)
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.
int(* compatible)(struct ast_bridge *bridge)
Check if a bridge is compatible with the bridging technology.
const ast_string_field technology
#define ast_bridge_channel_lock(bridge_channel)
Lock the bridge_channel.
#define AST_VECTOR_INIT(vec, size)
Initialize a vector.
struct ast_bridge * ast_bridge_find_by_id(const char *bridge_id)
Find bridge by id.
struct ao2_container * ast_bridge_peers(struct ast_bridge *bridge)
Get a container of all channels in the bridge.
enum ast_bridge_hook_type type
void bridge_channel_queue_deferred_frames(struct ast_bridge_channel *bridge_channel)
static void set_transfer_variables_all(struct ast_channel *transferer, struct ao2_container *channels, int is_attended)
ast_bridge_notify_masquerade_fn notify_masquerade
struct ast_bridge_snapshot * ast_bridge_get_snapshot(struct ast_bridge *bridge)
Returns the current snapshot for the bridge.
General Asterisk PBX channel definitions.
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)
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.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
void(*const optimization_started)(struct ast_unreal_pvt *p, struct ast_channel *source, enum ast_unreal_channel_indicator dest, unsigned int id)
Called when an optimization attempt has started.
void astman_send_list_complete_end(struct mansession *s)
End the list complete event.
int bridge_channel_internal_allows_optimization(struct ast_bridge_channel *bridge_channel)
struct ast_bridge::@228 action_queue
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
void ast_channel_internal_bridge_set(struct ast_channel *chan, struct ast_bridge *value)
int(* write)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
Write a frame into the bridging technology instance for a bridge.
#define ast_string_field_init(x, size)
Initialize a field pool and fields.
void ast_channel_stage_snapshot_done(struct ast_channel *chan)
Clear flag to indicate channel snapshot is being staged, and publish snapshot.
#define AST_PTHREADT_NULL
static void bridge_reconfigured_connected_line_update(struct ast_bridge *bridge)
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
int ast_attended_transfer_message_add_merge(struct ast_attended_transfer_message *transfer_msg, struct ast_bridge *final_bridge)
Add details for a bridge merge to an attended transfer message.
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.
enum ast_bridge_preference preference
void ast_bridge_features_set_flag(struct ast_bridge_features *features, unsigned int flag)
Set a flag on a bridge channel features structure.
#define AST_MAX_EXTENSION
#define AST_RWLIST_TRAVERSE
#define AST_CAUSE_NORMAL_CLEARING
static void fill_bridgepeer_buf(char *buf, unsigned int cur_idx, const char *names[], unsigned int num_names)
int ast_bridge_technology_unregister(struct ast_bridge_technology *technology)
Unregister a bridge technology from use.
struct ast_bridge_video_talker_src_data talker_src_data
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
#define ast_channel_cleanup(c)
Cleanup a channel reference.
#define ao2_ref(o, delta)
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.
int ast_softhangup(struct ast_channel *chan, int reason)
Softly hangup up a channel.
In case you didn't read that giant block of text above the mansession_session struct, the struct mansession is named this solely to keep the API the same in Asterisk. This structure really represents data that is different from Manager action to Manager action. The mansession_session pointer contained within points to session-specific data.
static enum bridge_allow_swap bridges_allow_swap_optimization(struct ast_bridge *chan_bridge, struct ast_bridge *peer_bridge)
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.
struct timeval ast_samp2tv(unsigned int _nsamp, unsigned int _rate)
Returns a timeval corresponding to the duration of n samples at rate r. Useful to convert samples to ...
Private Bridging Channel API.
struct ast_bridge_hook_dtmf_parms dtmf
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.
#define AST_RWLIST_REMOVE_CURRENT
#define ast_strdupa(s)
duplicate a string in memory from the stack
void ast_bridge_publish_state(struct ast_bridge *bridge)
Publish the state of a bridge.
int ast_bridge_unsuspend(struct ast_bridge *bridge, struct ast_channel *chan)
Unsuspend a channel from a bridge.
struct ast_bridge_channel * ast_channel_internal_bridge_channel(const struct ast_channel *chan)
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.
#define SCOPED_LOCK(varname, lock, lockfunc, unlockfunc)
Scoped Locks.
A set of macros to manage forward-linked lists.
#define ast_malloc(len)
A wrapper for malloc()
#define MAXIMUM_DTMF_FEATURE_STRING
Maximum length of a DTMF feature string.
struct ast_bridge_technology * tech
void ast_bridge_discard_after_goto(struct ast_channel *chan)
Discard channel after bridge goto location.
static struct channel_usage channels
#define AST_RWLIST_INSERT_BEFORE_CURRENT
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
struct ast_bridge_video_single_src_data single_src_data
AST_LIST_HEAD_NOLOCK(contactliststruct, contact)
static void bridge_channel_impart_wait(struct bridge_channel_impart_cond *cond)
static void hooks_remove_container(struct ao2_container *hooks, enum ast_bridge_hook_remove_flags remove_flags)
void(* ast_bridge_hook_pvt_destructor)(void *hook_pvt)
Hook pvt destructor callback.
void ast_channel_req_accountcodes(struct ast_channel *chan, const struct ast_channel *requestor, enum ast_channel_requestor_relationship relationship)
Setup new channel accountcodes from the requestor channel after ast_request().
Core PBX routines and definitions.
int ast_bridge_interval_unregister(enum ast_bridge_builtin_interval interval)
struct ast_heap * interval_hooks
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN
static int channel_hash(const void *obj, int flags)
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
const char * ast_channel_uniqueid(const struct ast_channel *chan)
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.
#define ast_bridge_channel_unlock(bridge_channel)
Unlock the bridge_channel.
const struct ast_bridge_methods * v_table
static void bridge_channel_moving(struct ast_bridge_channel *bridge_channel, struct ast_bridge *src, struct ast_bridge *dst)
unsigned int dtmf_passthrough
int ast_manager_unregister(const char *action)
Unregister a registered manager command.
void ast_channel_stage_snapshot(struct ast_channel *chan)
Set flag to indicate channel snapshot is being staged.
static void * bridge_channel_ind_thread(void *data)
Thread responsible for independent imparted bridged channels.
struct ast_bridge_snapshot * current_snapshot
Structure that contains information about a bridge.
void(* destroy)(struct ast_bridge *bridge)
Destroy a bridging technology instance for a bridge.
static void set_bridge_peer_vars_holding(struct ast_bridge *bridge)
int ast_tvcmp(struct timeval _a, struct timeval _b)
Compres two struct timeval instances returning -1, 0, 1 if the first arg is smaller, equal or greater to the second.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
struct ast_bridge * bridge
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
const ast_string_field name
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.
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)
struct ast_bridge_video_sfu_data sfu_data
Structure that contains configuration information for the limits feature.
#define ao2_unlink(container, obj)
static int interval_hook_time_cmp(void *a, void *b)
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)
static int smart_bridge_operation(struct ast_bridge *bridge)
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)
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)
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.
int bridge_channel_internal_push_full(struct ast_bridge_channel *bridge_channel, int optimized)
enum ast_bridge_video_mode_type video_mode
struct ast_bridge_tech_optimizations tech_args
ast_bridge_hook_callback callback
static char * complete_bridge_participant(const char *bridge_name, const char *word)
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
struct timeval ast_tvadd(struct timeval a, struct timeval b)
Returns the sum of two timevals a + b.
Connected Line/Party information.
The base pvt structure for local channel derivatives.
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)
void ast_bridge_features_limits_destroy(struct ast_bridge_features_limits *limits)
Destructor function for ast_bridge_features_limits.
void bridge_reconfigured(struct ast_bridge *bridge, unsigned int colp_update)
#define ao2_iterator_next(iter)
#define ast_cond_destroy(cond)
struct ast_bridge_snapshot * ast_bridge_snapshot_create(struct ast_bridge *bridge)
Generate a snapshot of the bridge state. This is an ao2 object, so ao2_cleanup() to deallocate...
#define ao2_alloc(data_size, destructor_fn)
#define AST_LIST_LAST(head)
Returns the last entry contained in a list.
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).
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.
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.
const char * ast_channel_appl(const struct ast_channel *chan)
int ast_softhangup_nolock(struct ast_channel *chan, int reason)
Softly hangup up a channel (no channel lock)
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.
int(* join)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Add a channel to a bridging technology instance for a bridge.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
static struct ao2_container * bridges
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.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
void ast_bridge_set_transfer_variables(struct ast_channel *chan, const char *value, int attended)
Set the relevant transfer variables for a single channel.
int ast_parking_provider_registered(void)
Check whether a parking provider is registered.
int ast_bridge_features_init(struct ast_bridge_features *features)
Initialize bridge features structure.
ast_bridge_builtin_feature
Built in DTMF features.
Bridge virtual methods table definition.
static void * bridge_manager_thread(void *data)
#define ast_channel_unlock(chan)
#define ast_bridge_unlock(bridge)
Unlock the bridge.
const char * ast_cause2str(int state) attribute_pure
Gives the string form of a given cause code.
void ast_bridge_technology_suspend(struct ast_bridge_technology *technology)
Suspend a bridge technology from consideration.
#define ast_calloc(num, len)
A wrapper for calloc()
#define ast_pthread_create(a, b, c, d)
void ast_bridge_features_destroy(struct ast_bridge_features *features)
Destroy an allocated bridge features struct.
void ast_bridge_run_after_callback(struct ast_channel *chan)
Run any after bridge callback.
static char * handle_bridge_technology_suspend(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
unsigned int inhibit_colp
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 tim...
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_publish_blind_transfer(struct ast_blind_transfer_message *transfer_message)
Publish a blind transfer event.
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.
struct ast_bridge_hook_timer_parms timer
static struct ast_bridge * optimize_lock_chan_stack(struct ast_channel *chan)
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
ast_bridge_merge_priority_fn get_merge_priority
void ast_bridging_init_basic(void)
char * ast_uuid_generate_str(char *buf, size_t size)
Generate a UUID string.
#define ast_bridge_channel_trylock(bridge_channel)
Try locking the bridge_channel.
static void suspend(struct cc_core_instance *core_instance)
unsigned int video_update_discard
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.
Prototypes for public functions only of internal interest,.
#define ao2_find(container, arg, flags)
const ast_string_field uniqueid
static int request(void *obj)
struct ast_channel * swap
Basic bridge subclass API.
int ast_bridge_kick(struct ast_bridge *bridge, struct ast_channel *chan)
Kick a channel from a bridge.
unsigned int num_channels
void ast_bridge_features_cleanup(struct ast_bridge_features *features)
Clean up the contents of a bridge features structure.
static void interval_wrapper_pvt_dtor(void *obj)
Destructor for the hook wrapper.
struct ao2_container * ast_bridge_peers_nolock(struct ast_bridge *bridge)
Get a container of all channels in the bridge.
struct ast_bridge_hook generic
Support for logging to various files, console and syslog Configuration in file logger.conf.
#define ast_heap_create(init_height, cmp_fn, index_offset)
struct ast_bridge_channel * ast_channel_get_bridge_channel(struct ast_channel *chan)
Get a reference to the channel's bridge pointer.
enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_transferee, struct ast_channel *to_transfer_target)
Attended transfer.
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)
struct ast_format_cap * ast_channel_nativeformats(const struct ast_channel *chan)
int ast_bridge_suspend(struct ast_bridge *bridge, struct ast_channel *chan)
Suspend a channel temporarily from a bridge.
unsigned int send_sdp_label
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
static int bridge_channel_impart_add(struct ast_channel *chan, struct bridge_channel_impart_cond *cond)
void ast_bridge_set_binaural_active(struct ast_bridge *bridge, unsigned int binaural_active)
Activates the use of binaural signals in a conference bridge.
#define ast_module_running_ref(mod)
Hold a reference to the module if it is running.
#define ast_bridge_lock(bridge)
Lock the bridge.
int average_talking_energy
#define ao2_t_bump(obj, tag)
Bump refcount on an AO2 object by one, returning the object.
#define ast_channel_lock_both(chan1, chan2)
Lock two channels.
int bridge_channel_internal_push(struct ast_bridge_channel *bridge_channel)
#define AST_YESNO(x)
return Yes or No depending on the argument.
static int bridge_base_push(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
struct bridge_manager_controller::@348 service_requests
int ast_channel_softhangup_internal_flag(struct ast_channel *chan)
struct ast_bridge_channels_list channels
#define AST_RWLIST_INSERT_TAIL
static int bridge_sort_cmp(const void *obj_left, const void *obj_right, int flags)
#define AST_LIST_HEAD_INIT_NOLOCK(head)
Initializes a list head structure.
struct ast_channel * chan
void * ast_heap_remove(struct ast_heap *h, void *elm)
Remove a specific element from a heap.
Replace objects with duplicate keys in container.
Structure that contains information regarding a channel in a bridge.
After Bridge Execution API.
#define ast_channel_ref(c)
Increase channel reference count.
ast_bridge_push_channel_fn push_peek
struct ast_channel_snapshot * ast_channel_snapshot_get_latest(const char *uniqueid)
Obtain the latest ast_channel_snapshot from the Stasis Message Bus API cache. This is an ao2 object...
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Standard Command Line Interface.
#define SCOPE_TRACE(level,...)
Print a trace message with details when a scope is entered or existed.
void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
Lock the bridge associated with the bridge channel.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
void ast_connected_line_copy_from_caller(struct ast_party_connected_line *dest, const struct ast_party_caller *src)
Copy the caller information to the connected line information.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
struct ao2_container * other_hooks
size_t ast_heap_size(struct ast_heap *h)
Get the current size of a heap.
struct ast_bridge_channel * bridge_channel_internal_alloc(struct ast_bridge *bridge)
const char * ast_channel_name(const struct ast_channel *chan)
void ast_local_unlock_all(void *tech_pvt, struct ast_channel *base_chan, struct ast_channel *base_owner)
Remove a reference to the given local channel's private tech, unlock the given local channel's privat...
void ast_bridge_technology_unsuspend(struct ast_bridge_technology *technology)
Unsuspend a bridge technology.
ast_bridge_video_sfu_remb_behavior
REMB report behaviors.
Structure that is the essence of a bridge technology.
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.
void ast_bridge_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags remove_flags)
Remove marked bridge channel feature hooks.
struct ast_channel * chan_vsrc
static struct ast_channel * get_transferee(struct ao2_container *channels, struct ast_channel *transferer)
int ast_answer(struct ast_channel *chan)
Answer a channel.
void ast_bridge_notify_masquerade(struct ast_channel *chan)
Notify bridging that this channel was just masqueraded.
struct ast_vector_int media_types
int bridge_channel_internal_queue_attended_transfer(struct ast_channel *transferee, struct ast_channel *unbridged_chan)
AO2 object that wraps data for transfer_channel_cb.
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.
void * ast_heap_peek(struct ast_heap *h, unsigned int index)
Peek at an element on a heap.
void ast_bridge_channel_stream_map(struct ast_bridge_channel *bridge_channel)
Maps a channel's stream topology to and from the bridge.
Data structure associated with a single frame of data.
Internal Asterisk hangup causes.
int bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel)
struct ast_flags remove_flags
Options provided by main asterisk program.
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...
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
static void bridge_action_bridge(struct ast_bridge *bridge, struct ast_frame *action)
#define ao2_container_alloc_rbtree(ao2_options, container_options, sort_fn, cmp_fn)
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.
static int play_file(struct ast_bridge_channel *bridge_channel, struct ast_channel *channel, const char *filename)
ast_bridge_destructor_fn destroy
#define ast_datastore_alloc(info, uid)
ast_bridge_push_channel_fn push
union ast_frame::@263 data
unsigned int interval_sequence
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
enum ast_frame_type frametype
static void check_bridge_play_sound(struct ast_bridge_channel *bridge_channel)
static int bridge_base_push_peek(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
#define ast_mutex_init(pmutex)
#define AST_CLI_YESNO(x)
Return Yes or No depending on the argument.
#define ast_channel_trylock(chan)
static void bridge_tech_deferred_destroy(struct ast_bridge *bridge, struct ast_frame *action)
void ast_format_duration_hh_mm_ss(int duration, char *buf, size_t length)
Formats a duration into HH:MM:SS.
struct stasis_topic * ast_bridge_topic(struct ast_bridge *bridge)
A topic which publishes the events for a particular bridge.
static char context[AST_MAX_CONTEXT]
Call Parking and Pickup API Includes code and algorithms from the Zapata library. ...
struct ast_flags * ast_channel_flags(struct ast_channel *chan)
int(* create)(struct ast_bridge *bridge)
Create a bridge technology instance for a bridge.
#define ast_mutex_destroy(a)
static char * handle_bridge_technology_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static int manager_bridge_tech_list(struct mansession *s, const struct message *m)
static struct ao2_container * locals
int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan)
Remove a channel from a bridge.
const ast_string_field creator
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 ast_cli_completion_add(char *value)
Add a result to a request for completion options.
static void bridge_handle_actions(struct ast_bridge *bridge)
int ast_attended_transfer_message_add_link(struct ast_attended_transfer_message *transfer_msg, struct ast_channel *locals[2])
Add details for an attended transfer that has a link between bridges.
int ast_bridge_channel_write_unhold(struct ast_bridge_channel *bridge_channel)
Write an unhold frame into the bridge.
Say numbers and dates (maybe words one day too)
struct ast_attended_transfer_message * ast_attended_transfer_message_create(int is_external, struct ast_channel *to_transferee, struct ast_bridge *transferee_bridge, struct ast_channel *to_transfer_target, struct ast_bridge *target_bridge, struct ast_channel *transferee, struct ast_channel *transfer_target)
Create an Attended transfer message to be published.
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.
static struct ast_timer * timer
void(* stop)(struct ast_bridge *bridge)
Request a bridge technology instance stop in preparation for being destroyed.
static int hook_cb(struct ast_config *cfg)
void astman_send_error(struct mansession *s, const struct message *m, char *error)
Send error in manager transaction.
Asterisk module definitions.
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)
#define BRIDGE_LOCK_ONE_OR_BOTH(b1, b2)
const ast_string_field subclass
unsigned int internal_sample_rate
The internal sample rate softmix uses to mix channels.
ast_bridge_optimization
Tells, if optimization is allowed, how the optimization would be performed.
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.
static struct ast_cli_entry bridge_cli[]
static void bridge_channel_impart_ds_head_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
Structure specific to bridge technologies capable of performing talking optimizations.
#define ast_string_field_free_memory(x)
free all memory - to be called before destroying the object
int ast_local_setup_masquerade(struct ast_channel *ast, struct ast_channel *masq)
Setup the outgoing local channel to masquerade into a channel on ast_call().
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
int ast_channel_has_audio_frame_or_monitor(struct ast_channel *chan)
Check if the channel has active audiohooks, active framehooks, or a monitor.
void bridge_channel_internal_pull(struct ast_bridge_channel *bridge_channel)
void ast_bridge_publish_merge(struct ast_bridge *to, struct ast_bridge *from)
Publish a bridge merge.
char code[MAXIMUM_DTMF_FEATURE_STRING]
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
uint32_t allowed_capabilities
unsigned int maximum_sample_rate
The maximum sample rate softmix uses to mix channels.
Structure that is the essence of a feature hook.
static void bridge_base_dissolving(struct ast_bridge *self)
unsigned int num_channels
int ast_bridge_setup_after_goto(struct ast_channel *chan)
Setup any after bridge goto location to begin execution.
#define AST_RWLIST_TRAVERSE_SAFE_END
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.
enum ast_bridge_video_mode_type mode
Timing source management.
ast_bridge_hook_timer_option
#define ast_heap_wrlock(h)
static const char * tech_capability2str(uint32_t capabilities)
static int handle_manager_bridge_tech_suspend(struct mansession *s, const struct message *m, int suspend)
Structure for mutex and tracking information.
static unsigned int optimization_id
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.
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.
void ast_bridge_vars_set(struct ast_channel *chan, const char *name, const char *pvtid)
Sets BRIDGECHANNEL and BRIDGEPVTCALLID for a channel.
const ast_string_field name
static void * bridge_channel_depart_thread(void *data)
Thread responsible for imparted bridged channels to be departed.
struct ast_bridge_snapshot * ast_bridge_get_snapshot_by_uniqueid(const char *bridge_id)
Returns the current snapshot for the bridge.
struct ast_channel_snapshot * replace_channel
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
#define ast_bridge_trylock(bridge)
Try locking the bridge.
#define ast_mutex_unlock(a)
unsigned int construction_completed
static force_inline int attribute_pure ast_str_hash(const char *str)
Compute a hash value on a string.
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.
static void deferred_action(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
int ast_local_setup_bridge(struct ast_channel *ast, struct ast_bridge *bridge, struct ast_channel *swap, struct ast_bridge_features *features)
Setup the outgoing local channel to join a bridge on ast_call().
#define ast_string_field_set(x, field, data)
Set a field to a simple string value.
static void bridge_complete_join(struct ast_bridge *bridge)
unsigned int binaural_active
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
Send ack in manager transaction to begin a list.
#define ao2_link(container, obj)
Unreal channel derivative framework.