141#define BRIDGE_ARRAY_START 128
144#define BRIDGE_ARRAY_GROW 32
147#define BLINDTRANSFER "BLINDTRANSFER"
150#define ATTENDEDTRANSFER "ATTENDEDTRANSFER"
230 || !technology->
write) {
241 ast_log(
LOG_WARNING,
"A bridge technology of %s already claims to exist in our world.\n",
249 technology->
mod = module;
269 ast_verb(5,
"Registered bridge technology %s\n", technology->
name);
284 ast_verb(5,
"Unregistered bridge technology %s\n", technology->
name);
305 ast_debug(1,
"Bridge %s: queueing action type:%u sub:%d\n",
344 bridge->
cause = cause;
408 unsigned char data[1024];
411 if (!bridge_channel ||
455 ast_debug(1,
"Bridge %s: %p(%s) is joining %s technology\n",
461 ast_debug(1,
"Bridge %s: %p(%s) failed to join %s technology (Kicking it out)\n",
478 bridge_channel->
bridge, bridge_channel);
526 ast_debug(2,
"Bridge technology %s is suspended. Skipping.\n",
531 ast_debug(2,
"Bridge technology %s does not have any capabilities we want.\n",
536 ast_debug(2,
"Bridge technology %s has less preference than %s (%u <= %u). Skipping.\n",
541 ast_debug(2,
"Bridge technology %s is not compatible with properties of existing bridge.\n",
546 ast_debug(2,
"Bridge technology %s is not running, skipping.\n",
current->name);
586 .name = bridge->
name,
590 ast_debug(1,
"Bridge %s: calling %s technology destructor (deferred, dummy)\n",
610 int in_destructor = !
ao2_ref(bridge, 0);
678 ast_debug(1,
"Bridge %s: calling %s bridge destructor\n",
684 ast_debug(1,
"Bridge %s: calling %s technology stop\n",
691 ast_debug(1,
"Bridge %s: calling %s technology destructor\n",
760 ast_log(
LOG_ERROR,
"Virtual method table for bridge class %s not complete.\n",
833 ast_log(
LOG_WARNING,
"Bridge %s: Could not create class %s. No technology to support it.\n",
840 ast_debug(1,
"Bridge %s: calling %s technology constructor\n",
848 ast_debug(1,
"Bridge %s: calling %s technology start\n",
1043 uint32_t new_capabilities;
1052 .name = bridge->
name,
1057 ast_debug(1,
"Bridge %s is dissolved, not performing smart bridge operation.\n",
1069 if (!new_capabilities
1078 if (!new_technology) {
1079 int is_compatible = 0;
1082 is_compatible = old_technology->
compatible(bridge);
1090 if (is_compatible) {
1091 ast_debug(1,
"Bridge %s could not get a new technology, staying with old technology.\n",
1099 if (new_technology == old_technology) {
1100 ast_debug(1,
"Bridge %s is already using the new technology.\n",
1106 if (old_technology->
destroy) {
1114 .data.ptr = &deferred_tech_destroy,
1115 .datalen =
sizeof(deferred_tech_destroy),
1136 ast_verb(4,
"Bridge %s: switching from %s technology to %s\n",
1149 ast_debug(1,
"Bridge %s: calling %s technology constructor\n",
1151 if (new_technology->
create && new_technology->
create(bridge)) {
1167 ast_debug(1,
"Bridge %s: moving %p(%s) to dummy bridge temporarily\n",
1183 ast_debug(1,
"Bridge %s: %p(%s) is leaving %s technology (dummy)\n",
1185 old_technology->
name);
1186 if (old_technology->
leave) {
1187 old_technology->
leave(&dummy_bridge, bridge_channel);
1201 ast_debug(1,
"Bridge %s: calling %s technology stop\n",
1203 if (old_technology->
stop) {
1204 old_technology->
stop(&dummy_bridge);
1212 ast_debug(1,
"Bridge %s: calling %s technology start\n",
1214 if (new_technology->
start && new_technology->
start(bridge)) {
1224 if (old_technology->
destroy) {
1225 ast_debug(1,
"Bridge %s: deferring %s technology destructor\n",
1229 ast_debug(1,
"Bridge %s: calling %s technology destructor\n",
1302 const char *c0_name;
1303 const char *c1_name;
1304 const char *c0_pvtid =
NULL;
1305 const char *c1_pvtid =
NULL;
1306#define UPDATE_BRIDGE_VARS_GET(chan, name, pvtid) \
1308 name = ast_strdupa(ast_channel_name(chan)); \
1309 if (ast_channel_tech(chan)->get_pvt_uniqueid) { \
1310 pvtid = ast_strdupa(ast_channel_tech(chan)->get_pvt_uniqueid(chan)); \
1340 int need_separator = 0;
1346 for (idx = 0; idx < num_names; ++idx) {
1347 if (idx == cur_idx) {
1351 if (need_separator) {
1382#define MAX_BRIDGEPEER_CHANS (10 + 1)
1385 unsigned int num_names;
1393 names =
ast_alloca(num_names *
sizeof(*names));
1396 if (num_names <= idx) {
1406 for (idx = 0; idx < num_names; ++idx) {
1407 len += strlen(names[idx]);
1415 if (idx < num_names) {
1503 if (bridge_channel->
chan ==
chan) {
1508 return bridge_channel;
1520 if (!bridge_channel) {
1526 bridge = bridge_channel->
bridge;
1602 .
type =
"bridge-impart-ds",
1638 datastore->
data = ds_head;
1641 ds_head = datastore->
data;
1673 while (!
cond->done) {
1705 if (!bridge_channel) {
1729 bridge_channel->
thread = pthread_self();
1740 if (bridge_channel->
swap) {
1785 if (bridge_channel->
callid) {
1796 ao2_t_cleanup(bridge_channel->
swap,
"Bridge complete: Departable impart join failed");
1874 if (!bridge_channel) {
1901 if (bridge_channel->
swap) {
1983 departable = bridge_channel && bridge_channel->
depart_wait;
2007 ast_debug(1,
"Waiting for %p(%s) bridge thread to die.\n",
2024 ast_debug(1,
"Removing channel %s from bridge %s\n",
2083 old_bridge = bridge_channel->
bridge;
2084 bridge_channel->
bridge = new_bridge;
2107 remove_me = move_cb(bridge_channel, hook->
hook_pvt, src, dst);
2109 ast_debug(1,
"Move detection hook %p is being removed from %p(%s)\n",
2118 unsigned int optimized)
2123 ast_debug(1,
"Merging bridge %s into bridge %s\n",
2148 for (idx = 0; idx < num_kick; ++idx) {
2149 if (bridge_channel == kick_me[idx]) {
2184 for (idx = 0; idx < num_kick; ++idx) {
2185 bridge_channel = kick_me[idx];
2199 ast_debug(1,
"Merged bridge %s into bridge %s\n",
2225 int bridge1_priority;
2226 int bridge2_priority;
2236 bridge1_priority = bridge1->v_table->get_merge_priority(bridge1);
2237 bridge2_priority = bridge2->v_table->get_merge_priority(bridge2);
2238 if (bridge2_priority < bridge1_priority) {
2239 merge.
dest = bridge1;
2240 merge.
src = bridge2;
2241 }
else if (bridge1_priority < bridge2_priority) {
2242 merge.
dest = bridge2;
2243 merge.
src = bridge1;
2246 if (bridge2->num_channels <= bridge1->num_channels) {
2247 merge.
dest = bridge1;
2248 merge.
src = bridge2;
2250 merge.
dest = bridge2;
2251 merge.
src = bridge1;
2257 merge.
dest = bridge1;
2258 merge.
src = bridge2;
2262 merge.
dest = bridge2;
2263 merge.
src = bridge1;
2291 ast_assert(dst_bridge && src_bridge && dst_bridge != src_bridge && (!num_kick || kick_me));
2294 ast_debug(1,
"Can't merge bridges %s and %s, at least one bridge is dissolved.\n",
2300 ast_debug(1,
"Can't merge bridges %s and %s, masquerade only.\n",
2305 ast_debug(1,
"Can't merge bridges %s and %s, merging temporarily inhibited.\n",
2310 if (merge_best_direction) {
2313 merge.
dest = dst_bridge;
2314 merge.
src = src_bridge;
2320 ast_debug(1,
"Can't merge bridges %s and %s, merging inhibited.\n",
2330 ast_debug(1,
"Can't merge bridge %s into bridge %s, not enough channels in source bridge.\n",
2338 ast_debug(1,
"Can't merge bridge %s into bridge %s, multimix is needed and it cannot be acquired.\n",
2344 unsigned int num_to_kick = 0;
2347 kick_them =
ast_alloca(num_kick *
sizeof(*kick_them));
2348 for (idx = 0; idx < num_kick; ++idx) {
2350 if (!kick_them[num_to_kick]) {
2353 if (kick_them[num_to_kick]) {
2358 if (num_to_kick != num_kick) {
2359 ast_debug(1,
"Can't merge bridge %s into bridge %s, at least one kicked channel is not in either bridge.\n",
2377 res =
bridge_merge_locked(dst_bridge, src_bridge, merge_best_direction, kick_me, num_kick);
2384 unsigned int optimized)
2390 if (bridge_channel->
swap) {
2391 ast_debug(1,
"Moving %p(%s) into bridge %s swapping with %s\n",
2395 ast_debug(1,
"Moving %p(%s) into bridge %s\n",
2399 orig_bridge = bridge_channel->
bridge;
2400 was_in_bridge = bridge_channel->
in_bridge;
2426 if (attempt_recovery && was_in_bridge) {
2442 }
else if (!optimized) {
2473 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, at least one bridge is dissolved.\n",
2479 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, masquerade only.\n",
2484 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, temporarily inhibited.\n",
2490 if (!bridge_channel) {
2491 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, channel not in bridge.\n",
2496 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, channel leaving bridge.\n",
2502 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, channel immovable.\n",
2511 if (!bridge_channel_swap) {
2512 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, swap channel %s not in bridge.\n",
2518 ast_debug(1,
"Can't move channel %s from bridge %s into bridge %s, swap channel %s leaving bridge.\n",
2526 return bridge_do_move(dst_bridge, bridge_channel, attempt_recovery, 0);
2612 struct ast_channel *play_chan = yanked_chan ?: chan;
2619 if (!play_bridge_channel) {
2777 && chan_priority <= peer_priority) {
2780 && peer_priority <= chan_priority) {
2827 dst_bridge = chan_bridge;
2828 dst_bridge_channel = chan_bridge_channel;
2829 src_bridge_channel = peer_bridge_channel;
2832 dst_bridge = peer_bridge;
2833 dst_bridge_channel = peer_bridge_channel;
2834 src_bridge_channel = chan_bridge_channel;
2851 ast_verb(4,
"Move-swap optimizing %s <-- %s.\n",
2862 other->
swap = dst_bridge_channel->
chan;
2945 chan_bridge_channel,
2946 peer_bridge_channel,
2956 ast_debug(4,
"Can't optimize %s -- %s out, not enough channels in bridge %s.\n",
2962 ast_debug(4,
"Can't optimize %s -- %s out, multimix is needed and it cannot be acquired.\n",
2968 ast_verb(4,
"Merge optimizing %s -- %s out.\n",
3008 peer_bridge, peer_bridge_channel, pvt);
3011 peer_bridge, peer_bridge_channel, pvt);
3012 }
else if (0 < res) {
3053 if (merge.
dest == chan_bridge) {
3171 callback(bridge_channel, hook_pvt);
3263 hook_pvt, destructor, remove_flags);
3390 unsigned int interval,
3399 if (!features ||!interval || !callback) {
3405 hook_pvt, destructor, remove_flags);
3415 ast_debug(1,
"Putting interval hook %p with interval %u in the heap on features %p\n",
3431 return res ? -1 : 0;
3451 ast_debug(1,
"Failed to enable built in feature %u on %p, no DTMF string is available for it.\n",
3462 config, destructor, remove_flags);
3489 return callback(features,
limits, remove_flags);
3492 ast_log(
LOG_ERROR,
"Attempted to set limits without an AST_BRIDGE_BUILTIN_INTERVAL_LIMITS callback registered.\n");
3612 const char *right_key = obj_right;
3621 cmp = strcasecmp(hook_left->
dtmf.
code, right_key);
3624 cmp = strncasecmp(hook_left->
dtmf.
code, right_key, strlen(right_key));
3692 memset(features, 0,
sizeof(*features));
3823 if (video_src_chan) {
3825 ast_verb(5,
"Video source in bridge '%s' (%s) is now '%s' (%s)\n",
3909 ast_verb(5,
"Video source in bridge '%s' (%s) is now '%s' (%s)\n",
3917 }
else if (!data->
chan_vsrc && is_keyframe) {
3920 ast_verb(5,
"Video source in bridge '%s' (%s) is now '%s' (%s)\n",
4022 switch (video_mode) {
4045 const char *
name = obj;
4069 const char *right_name = arg;
4196 snprintf(chan_name,
sizeof(chan_name),
"%s@%s", exten,
context);
4219 if (new_channel_cb) {
4223 if (
ast_call(local, chan_name, 0)) {
4259 if (transferee != transferer) {
4294#define BRIDGE_LOCK_ONE_OR_BOTH(b1, b2) \
4297 ast_bridge_lock_both(b1, b2); \
4299 ast_bridge_lock(b1); \
4303 static const char *dest =
"_attended@transfer/m";
4349 if (
ast_call(local_chan, dest, 0)) {
4381 if (local_chan !=
locals[0]) {
4409 if (!transferer_bridge_channel) {
4456 const char *transferer_name;
4457 const char *transferer_bridgepeer;
4467 if (chan == transferer) {
4504 int do_bridge_transfer;
4505 int transfer_prohibited;
4509 if (!transfer_message) {
4513 ast_log(
LOG_ERROR,
"Unable to allocate memory for blind transfer publication from %s\n",
4527 if (!transfer_message->bridge) {
4535 if (!transfer_message->transferee) {
4544 if (!bridge_channel) {
4549 user_data_wrapper =
ao2_alloc(
sizeof(*user_data_wrapper),
NULL);
4550 if (!user_data_wrapper) {
4555 user_data_wrapper->data = user_data;
4560 transfer_result =
try_parking(transferer,
context, exten, new_channel_cb, user_data_wrapper);
4566 user_data_wrapper->completed = 1;
4587 if (transfer_prohibited) {
4594 if (do_bridge_transfer) {
4596 exten,
context, transferee, new_channel_cb, user_data_wrapper, transfer_message);
4608 new_channel_cb, user_data_wrapper)) {
4617 transfer_message->result = transfer_result;
4619 return transfer_result;
4643 if (bridged_to_source
4647 bridged_to_source->
swap = swap_channel;
4688 to_transferee_bridge_channel,
4689 to_target_bridge_channel,
4706 final_bridge = to_transferee_bridge;
4710 final_bridge = to_target_bridge;
4714 final_bridge = to_transferee_bridge;
4719 final_bridge = to_target_bridge;
4735 to_transferee_bridge, to_target_bridge, transfer_msg);
4759 int transfer_prohibited;
4760 int do_bridge_transfer;
4763 int hangup_target = 0;
4769 to_transfer_target, to_target_bridge,
NULL,
NULL);
4770 if (!transfer_msg) {
4771 ast_log(
LOG_ERROR,
"Unable to create Stasis publication for attended transfer from %s\n",
4777 if (!to_transferee_bridge && !to_target_bridge) {
4790 if (to_transferee_bridge_channel) {
4799 if (to_target_bridge_channel) {
4800 const char *target_complete_sound;
4812 "ATTENDED_TRANSFER_COMPLETE_SOUND");
4814 target_complete_sound =
ast_strdupa(target_complete_sound);
4816 target_complete_sound =
NULL;
4819 if (!target_complete_sound) {
4822 "ATTENDED_TRANSFER_COMPLETE_SOUND");
4824 target_complete_sound =
ast_strdupa(target_complete_sound);
4826 target_complete_sound =
NULL;
4830 if (target_complete_sound) {
4832 target_complete_sound,
NULL);
4837 if (to_transferee_bridge && to_target_bridge) {
4839 if (!to_transferee_bridge_channel || !to_target_bridge_channel) {
4846 to_transfer_target, to_target_bridge_channel,
4847 to_transferee_bridge, to_target_bridge, transfer_msg);
4855 the_bridge = to_transferee_bridge ?: to_target_bridge;
4856 chan_bridged = to_transferee_bridge ? to_transferee : to_transfer_target;
4857 chan_unbridged = to_transferee_bridge ? to_transfer_target : to_transferee;
4875 if (chan_count <= 1) {
4886 if (transfer_prohibited) {
4893 if (do_bridge_transfer) {
4898 hangup_target = chan_bridged == to_transfer_target;
4926 transfer_msg->result = res;
4961 while (!manager->
stop) {
4999 ast_debug(1,
"Waiting for bridge manager thread to die.\n");
5061 const struct ast_bridge *bridge_left = obj_left;
5062 const struct ast_bridge *bridge_right = obj_right;
5063 const char *right_key = obj_right;
5069 right_key = bridge_right->
uniqueid;
5072 cmp = strcmp(bridge_left->
uniqueid, right_key);
5075 cmp = strncmp(bridge_left->
uniqueid, right_key, strlen(right_key));
5107#define FORMAT_HDR "%-36s %-36s %5s %-15s %-15s %s\n"
5108#define FORMAT_ROW "%-36s %-36s %5u %-15s %-15s %s\n"
5115 e->
command =
"bridge show all";
5117 "Usage: bridge show all\n"
5118 " List all bridges\n";
5124 ast_cli(
a->fd,
FORMAT_HDR,
"Bridge-ID",
"Name",
"Chans",
"Type",
"Technology",
"Duration");
5129 char print_time[32];
5172 char print_time[32];
5178 "Usage: bridge show <bridge-id>\n"
5179 " Show information about the <bridge-id> bridge\n";
5194 ast_cli(
a->fd,
"Bridge '%s' not found\n",
a->argv[2]);
5210 ast_cli(
a->fd,
"Duration: %s\n", print_time);
5224 e->
command =
"bridge destroy";
5226 "Usage: bridge destroy <bridge-id>\n"
5227 " Destroy the <bridge-id> bridge\n";
5242 ast_cli(
a->fd,
"Bridge '%s' not found\n",
a->argv[2]);
5246 ast_cli(
a->fd,
"Destroying bridge '%s'\n",
a->argv[2]);
5264 wordlen = strlen(
word);
5283 static const char *
const completions[] = {
"all",
NULL };
5290 "Usage: bridge kick <bridge-id> <channel-name | all>\n"
5291 " Kick the <channel-name> channel out of the <bridge-id> bridge\n"
5292 " If all is specified as the channel name then all channels will be\n"
5293 " kicked out of the bridge.\n";
5312 ast_cli(
a->fd,
"Bridge '%s' not found\n",
a->argv[2]);
5316 if (!strcasecmp(
a->argv[3],
"all")) {
5319 ast_cli(
a->fd,
"Kicking all channels from bridge '%s'\n",
a->argv[2]);
5331 ast_cli(
a->fd,
"Channel '%s' not found\n",
a->argv[3]);
5336 ast_cli(
a->fd,
"Kicking channel '%s' from bridge '%s'\n",
5369#define FORMAT_HDR "%-20s %-20s %8s %s\n"
5370#define FORMAT_ROW "%-20s %-20s %8u %s\n"
5376 e->
command =
"bridge technology show";
5378 "Usage: bridge technology show\n"
5379 " List registered bridge technologies\n";
5407 wordlen = strlen(
word);
5410 if (!strncasecmp(cur->
name,
word, wordlen)) {
5429 e->
command =
"bridge technology {suspend|unsuspend}";
5431 "Usage: bridge technology {suspend|unsuspend} <technology-name>\n"
5432 " Suspend or unsuspend a bridge technology.\n";
5445 suspend = !strcasecmp(
a->argv[2],
"suspend");
5449 if (!strcasecmp(cur->
name,
a->argv[3])) {
5463 ast_cli(
a->fd,
"Suspended bridge technology '%s'\n",
a->argv[3]);
5465 ast_cli(
a->fd,
"Unsuspended bridge technology '%s'\n",
a->argv[3]);
5468 ast_cli(
a->fd,
"Bridge technology '%s' not found\n",
a->argv[3]);
5478 AST_CLI_DEFINE(handle_bridge_destroy_specific,
"Destroy a bridge"),
5500 if (!strcasecmp(cur->
name,
name)) {
5555 "Event: BridgeTechnologyListItem\r\n"
5556 "BridgeTechnology: %s\r\n"
5557 "BridgeType: %s\r\n"
5558 "BridgePriority: %u\r\n"
5559 "BridgeSuspended: %s\r\n"
5590 prnt(where,
"%s %s chans:%u",
Prototypes for public functions only of internal interest,.
static int play_file(struct ast_bridge_channel *bridge_channel, struct ast_channel *channel, const char *filename)
Playback the given filename and monitor for any dtmf interrupts.
Asterisk main include file. File version handling, generic pbx functions.
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
#define ast_strdup(str)
A wrapper for strdup()
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ast_calloc(num, len)
A wrapper for calloc()
#define ast_malloc(len)
A wrapper for malloc()
#define ao2_iterator_next(iter)
#define ao2_link(container, obj)
Add an object to a container.
@ AO2_ALLOC_OPT_LOCK_NOLOCK
@ AO2_ALLOC_OPT_LOCK_MUTEX
#define ao2_callback(c, flags, cb_fn, arg)
ao2_callback() is a generic function that applies cb_fn() to all objects in a container,...
void ao2_container_unregister(const char *name)
Unregister a container for CLI stats and integrity check.
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
#define ao2_unlink(container, obj)
Remove an object from a container.
#define ao2_find(container, arg, flags)
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
#define ao2_container_alloc_rbtree(ao2_options, container_options, sort_fn, cmp_fn)
Allocate and initialize a red-black tree container.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_t_bump(obj, tag)
#define ao2_alloc_options(data_size, destructor_fn, options)
#define ao2_t_cleanup(obj, tag)
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.
void * ao2_object_get_lockaddr(void *obj)
Return the mutex lock address of an object.
#define ao2_bump(obj)
Bump refcount on an AO2 object by one, returning the object.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
@ OBJ_SEARCH_KEY
The arg parameter is a search key, but is not an object.
#define ao2_container_alloc_list(ao2_options, container_options, sort_fn, cmp_fn)
Allocate and initialize a list container.
#define ao2_alloc(data_size, destructor_fn)
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
Allocate and initialize a hash container with the desired number of buckets.
void() ao2_prnt_fn(void *where, const char *fmt,...)
Print output.
@ AO2_CONTAINER_ALLOC_OPT_DUPS_REPLACE
Replace objects with duplicate keys in container.
int ast_bridge_depart(struct ast_channel *chan)
Depart a channel from a bridge.
void ast_bridge_set_transfer_variables(struct ast_channel *chan, const char *value, int attended)
Set the relevant transfer variables for a single channel.
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.
static struct ast_channel * get_transferee(struct ao2_container *channels, struct ast_channel *transferer)
struct ao2_container * ast_bridges(void)
Returns the global bridges container.
static struct bridge_manager_controller * bridge_manager
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.
int ast_bridging_init(void)
Initialize the bridging system.
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.
static void bridge_channel_complete_join(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
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)
static int bridge_base_push_peek(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
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 manager_bridge_tech_list(struct mansession *s, const struct message *m)
static void bridge_channel_impart_ds_head_signal(struct bridge_channel_impart_ds_head *ds_head)
static int channel_hash(const void *obj, int flags)
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.
void ast_bridge_set_binaural_active(struct ast_bridge *bridge, unsigned int binaural_active)
Activates the use of binaural signals in a conference bridge.
void ast_bridge_technology_unsuspend(struct ast_bridge_technology *technology)
Unsuspend a bridge technology.
static void hooks_remove_heap(struct ast_heap *hooks, enum ast_bridge_hook_remove_flags remove_flags)
struct ast_channel * ast_bridge_peer_nolock(struct ast_bridge *bridge, struct ast_channel *chan)
Get the channel's bridge peer only if the bridge is two-party.
int ast_bridge_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...
int ast_bridge_number_video_src(struct ast_bridge *bridge)
Returns the number of video sources currently active in the bridge.
struct ao2_container * ast_bridge_peers_nolock(struct ast_bridge *bridge)
Get a container of all channels in the bridge.
static void set_bridge_peer_vars_2party(struct ast_channel *c0, struct ast_channel *c1)
static char builtin_features_dtmf[AST_BRIDGE_BUILTIN_END][MAXIMUM_DTMF_FEATURE_STRING]
static void bridge_channel_impart_ds_head_fixup(void *data, struct ast_channel *old_chan, struct ast_channel *new_chan)
#define UPDATE_BRIDGE_VARS_GET(chan, name, pvtid)
int ast_bridge_features_init(struct ast_bridge_features *features)
Initialize bridge features structure.
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)
static void bridge_queue_action_nodup(struct ast_bridge *bridge, struct ast_frame *action)
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
static int manager_bridge_tech_suspend(struct mansession *s, const struct message *m)
static enum ast_transfer_result bridge_swap_attended_transfer(struct ast_bridge *dest_bridge, struct ast_bridge_channel *source_bridge_channel, struct ast_channel *swap_channel)
static void bridge_manager_service(struct ast_bridge *bridge)
int ast_bridge_features_unregister(enum ast_bridge_builtin_feature feature)
Unregister a handler for a built in feature.
static unsigned int optimization_id
static int bridge_other_hook(struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags, enum ast_bridge_hook_type type)
static void bridge_base_dissolving(struct ast_bridge *self)
int ast_bridge_features_limits_construct(struct ast_bridge_features_limits *limits)
Constructor function for ast_bridge_features_limits.
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.
static int hook_remove_match(void *obj, void *arg, int flags)
void bridge_dissolve(struct ast_bridge *bridge, int cause)
static int manager_bridge_tech_unsuspend(struct mansession *s, const struct message *m)
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.
static void bridge_channel_impart_wait(struct bridge_channel_impart_cond *cond)
static struct ast_cli_entry bridge_cli[]
static int interval_hook_time_cmp(void *a, void *b)
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.
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.
static const char * tech_capability2str(uint32_t capabilities)
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_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags remove_flags)
Remove marked bridge channel feature hooks.
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 void bridge_hook_destroy(void *vhook)
static int channel_cmp(void *obj, void *arg, int flags)
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)
int ast_bridge_queue_action(struct ast_bridge *bridge, struct ast_frame *action)
Put an action onto the specified bridge.
int ast_bridge_destroy(struct ast_bridge *bridge, int cause)
Destroy a bridge.
static int bridge_sort_cmp(const void *obj_left, const void *obj_right, int flags)
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.
static int handle_manager_bridge_tech_suspend(struct mansession *s, const struct message *m, int suspend)
static void bridge_manager_destroy(void *obj)
static int bridge_dtmf_hook_sort(const void *obj_left, const void *obj_right, int flags)
static void check_bridge_play_sounds(struct ast_bridge *bridge)
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)
void ast_bridge_features_set_flag(struct ast_bridge_features *features, unsigned int flag)
Set a flag on a bridge channel features structure.
struct ast_bridge_methods ast_bridge_base_v_table
Bridge base class virtual method table.
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.
void ast_brige_set_remb_behavior(struct ast_bridge *bridge, enum ast_bridge_video_sfu_remb_behavior behavior)
Set the REMB report generation behavior on a bridge.
static void * bridge_manager_thread(void *data)
struct ast_bridge * ast_bridge_transfer_acquire_bridge(struct ast_channel *chan)
Acquire the channel's bridge for transfer purposes.
int ast_bridge_join_hook(struct ast_bridge_features *features, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags)
Attach a bridge channel join hook to a bridge features structure.
static struct ast_bridge * optimize_lock_chan_stack(struct ast_channel *chan)
static int complete_bridge_live_search(void *obj, void *arg, int flags)
struct ast_bridge * bridge_register(struct ast_bridge *bridge)
Register the new bridge with the system.
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 enum bridge_allow_merge bridges_allow_merge_optimization(struct ast_bridge *chan_bridge, struct ast_bridge *peer_bridge, int num_kick_channels, struct merge_direction *merge)
static 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)
struct ast_bridge_features * ast_bridge_features_new(void)
Allocate a new bridge features struct.
static void bridge_channel_impart_ds_head_dtor(void *doomed)
int ast_bridge_remove(struct ast_bridge *bridge, struct ast_channel *chan)
Remove a channel from a bridge.
void ast_bridge_vars_set(struct ast_channel *chan, const char *name, const char *pvtid)
Sets BRIDGECHANNEL and BRIDGEPVTCALLID for a channel.
struct ast_bridge * 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_merge_inhibit(struct ast_bridge *bridge, int request)
Adjust the bridge merge inhibit request count.
static void fill_bridgepeer_buf(char *buf, unsigned int cur_idx, const char *names[], unsigned int num_names)
void bridge_reconfigured(struct ast_bridge *bridge, unsigned int colp_update)
static char * handle_bridge_technology_suspend(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
int ast_bridge_kick(struct ast_bridge *bridge, struct ast_channel *chan)
Kick a channel from a bridge.
static int smart_bridge_operation(struct ast_bridge *bridge)
void bridge_channel_impart_signal(struct ast_channel *chan)
static int bridge_base_push(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
static int bridge_base_get_merge_priority(struct ast_bridge *self)
static ast_bridge_builtin_set_limits_fn builtin_interval_handlers[AST_BRIDGE_BUILTIN_INTERVAL_END]
static ast_bridge_hook_callback builtin_features_handlers[AST_BRIDGE_BUILTIN_END]
static int merge_container_cb(void *obj, void *data, int flags)
Callback for merging hook ao2_containers.
static char * handle_bridge_technology_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
struct ast_bridge * ast_bridge_find_by_id(const char *bridge_id)
Find bridge by id.
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.
struct ast_bridge_channel * bridge_find_channel(struct ast_bridge *bridge, struct ast_channel *chan)
static char * handle_bridge_kick_channel(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
int ast_bridge_suspend(struct ast_bridge *bridge, struct ast_channel *chan)
Suspend a channel temporarily from a bridge.
static void bridge_prnt_obj(void *v_obj, void *where, ao2_prnt_fn *prnt)
static const struct ast_datastore_info bridge_channel_impart_ds_info
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.
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_bridge * optimize_lock_peer_stack(struct ast_channel *peer)
struct ao2_container * ast_bridge_peers(struct ast_bridge *bridge)
Get a container of all channels in the bridge.
#define MAX_BRIDGEPEER_CHANS
static void set_transfer_variables_all(struct ast_channel *transferer, struct ao2_container *channels, int is_attended)
static void bridge_base_destroy(struct ast_bridge *self)
void ast_bridge_features_merge(struct ast_bridge_features *into, const struct ast_bridge_features *from)
Merge one ast_bridge_features into another.
static int try_swap_optimize_out(struct ast_bridge *chan_bridge, struct ast_bridge_channel *chan_bridge_channel, struct ast_bridge *peer_bridge, struct ast_bridge_channel *peer_bridge_channel, struct ast_unreal_pvt *pvt)
static void wrap_hook(struct ast_bridge_features *features, struct ast_bridge_hook_timer *hook)
Wrap the provided interval hook and add it to features.
struct ast_bridge * bridge_alloc(size_t size, const struct ast_bridge_methods *v_table)
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.
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 void destroy_bridge(void *obj)
static int interval_wrapper_cb(struct ast_bridge_channel *bridge_channel, void *obj)
Wrapper for interval hooks that calls into the wrapped hook.
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 void hooks_remove_container(struct ao2_container *hooks, enum ast_bridge_hook_remove_flags remove_flags)
static void bridge_reconfigured_connected_line_update(struct ast_bridge *bridge)
static void cleanup_video_mode(struct ast_bridge *bridge)
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.
#define BRIDGE_LOCK_ONE_OR_BOTH(b1, b2)
static enum ast_transfer_result try_parking(struct ast_channel *transferer, const char *context, const char *exten, transfer_channel_cb new_channel_cb, struct transfer_channel_data *user_data_wrapper)
static struct ao2_container * bridges
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 ast_bridge_unsuspend(struct ast_bridge *bridge, struct ast_channel *chan)
Unsuspend a channel from a bridge.
void ast_bridge_set_send_sdp_label(struct ast_bridge *bridge, unsigned int send_sdp_label)
Controls whether to send a "label" attribute in each stream in an SDP.
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.
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.
static void set_bridge_peer_vars_multiparty(struct ast_bridge *bridge)
static char * complete_bridge_live(const char *word)
void ast_bridge_features_cleanup(struct ast_bridge_features *features)
Clean up the contents of a bridge features structure.
static void bridge_action_bridge(struct ast_bridge *bridge, struct ast_frame *action)
@ MERGE_NOT_ENOUGH_CHANNELS
static enum ast_transfer_result blind_transfer_bridge(int is_external, struct ast_channel *transferer, struct ast_bridge *bridge, const char *exten, const char *context, struct ast_channel *transferee, transfer_channel_cb new_channel_cb, struct transfer_channel_data *user_data_wrapper, struct ast_blind_transfer_message *transfer_message)
static 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)
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 bridge_cleanup(void)
static void bridge_channel_change_bridge(struct ast_bridge_channel *bridge_channel, struct ast_bridge *new_bridge)
static struct bridge_manager_controller * bridge_manager_create(void)
static char * handle_bridge_show_all(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
static void bridge_handle_actions(struct ast_bridge *bridge)
static int bridge_impart_internal(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags, struct bridge_channel_impart_cond *cond)
static void * bridge_channel_depart_thread(void *data)
Thread responsible for imparted bridged channels to be departed.
int ast_bridge_technology_unregister(struct ast_bridge_technology *technology)
Unregister a bridge technology from use.
static void bridge_complete_join(struct ast_bridge *bridge)
int ast_bridge_interval_unregister(enum ast_bridge_builtin_interval interval)
Unregisters a handler for a built in interval feature.
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.
static void kick_it(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
static char * complete_bridge_participant(const char *bridge_name, const char *word)
void ast_bridge_technology_suspend(struct ast_bridge_technology *technology)
Suspend a bridge technology from consideration.
int __ast_bridge_technology_register(struct ast_bridge_technology *technology, struct ast_module *module)
Register a bridge technology for use.
void ast_bridge_features_destroy(struct ast_bridge_features *features)
Destroy an allocated bridge features struct.
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.
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.
static void check_bridge_play_sound(struct ast_bridge_channel *bridge_channel)
int bridge_do_move(struct ast_bridge *dst_bridge, struct ast_bridge_channel *bridge_channel, int attempt_recovery, unsigned int optimized)
static void set_bridge_peer_vars(struct ast_bridge *bridge)
static int bridge_channel_impart_add(struct ast_channel *chan, struct bridge_channel_impart_cond *cond)
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.
static void bridge_channel_moving(struct ast_bridge_channel *bridge_channel, struct ast_bridge *src, struct ast_bridge *dst)
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.
static void bridge_manager_service_req(struct ast_bridge *bridge)
static char * complete_bridge_technology(const char *word)
void ast_bridge_features_limits_destroy(struct ast_bridge_features_limits *limits)
Destructor function for ast_bridge_features_limits.
void bridge_merge_inhibit_nolock(struct ast_bridge *bridge, int request)
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.
static struct merge_direction bridge_merge_determine_direction(struct ast_bridge *bridge1, struct ast_bridge *bridge2)
static void bridge_base_pull(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
static void bridge_dissolve_check_stolen(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
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.
static enum bridge_allow_swap bridges_allow_swap_optimization(struct ast_bridge *chan_bridge, struct ast_bridge *peer_bridge)
static char * handle_bridge_show_specific(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
void ast_bridge_notify_masquerade(struct ast_channel *chan)
Notify bridging that this channel was just masqueraded.
enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_transferee, struct ast_channel *to_transfer_target)
Attended transfer.
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.
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.
static void bridge_tech_deferred_destroy(struct ast_bridge *bridge, struct ast_frame *action)
static void bridge_base_notify_masquerade(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
static int bridge_allows_optimization(struct ast_bridge *bridge)
void ast_bridge_set_internal_sample_rate(struct ast_bridge *bridge, unsigned int sample_rate)
Adjust the internal mixing sample rate of a bridge used during multimix mode.
static ast_mutex_t bridge_init_lock
static void interval_wrapper_pvt_dtor(void *obj)
Destructor for the hook wrapper.
static void * bridge_channel_ind_thread(void *data)
Thread responsible for independent imparted bridged channels.
static void set_bridge_peer_vars_holding(struct ast_bridge *bridge)
#define ast_bridge_lock_both(bridge1, bridge2)
Lock two bridges.
#define ast_bridge_unlock(bridge)
Unlock the bridge.
ast_bridge_optimization
Tells, if optimization is allowed, how the optimization would be performed.
@ AST_BRIDGE_OPTIMIZE_PROHIBITED
@ AST_BRIDGE_OPTIMIZE_MERGE_TO_CHAN_BRIDGE
@ AST_BRIDGE_OPTIMIZE_SWAP_TO_PEER_BRIDGE
@ AST_BRIDGE_OPTIMIZE_MERGE_TO_PEER_BRIDGE
@ AST_BRIDGE_OPTIMIZE_SWAP_TO_CHAN_BRIDGE
ast_bridge_video_sfu_remb_behavior
REMB report behaviors.
#define ast_bridge_trylock(bridge)
Try locking the bridge.
@ AST_BRIDGE_CAPABILITY_EARLY
@ AST_BRIDGE_CAPABILITY_MULTIMIX
@ AST_BRIDGE_CAPABILITY_NATIVE
@ AST_BRIDGE_CAPABILITY_1TO1MIX
@ AST_BRIDGE_CAPABILITY_HOLDING
@ AST_BRIDGE_TRANSFER_MULTI_PARTY
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_TRANSFER_NOT_PERMITTED
@ AST_BRIDGE_TRANSFER_SUCCESS
@ AST_BRIDGE_TRANSFER_INVALID
@ AST_BRIDGE_TRANSFER_FAIL
ast_bridge_video_mode_type
Video source modes.
@ AST_BRIDGE_VIDEO_MODE_SINGLE_SRC
@ AST_BRIDGE_VIDEO_MODE_TALKER_SRC
@ AST_BRIDGE_VIDEO_MODE_NONE
@ AST_BRIDGE_VIDEO_MODE_SFU
#define ast_bridge_lock(bridge)
Lock the bridge.
@ AST_BRIDGE_IMPART_CHAN_DEPARTABLE
@ AST_BRIDGE_IMPART_CHAN_MASK
@ AST_BRIDGE_IMPART_INHIBIT_JOIN_COLP
@ AST_BRIDGE_IMPART_CHAN_INDEPENDENT
#define BRIDGE_PRINTF_VARS(bridge)
@ AST_BRIDGE_JOIN_INHIBIT_JOIN_COLP
@ AST_BRIDGE_JOIN_PASS_REFERENCE
#define BRIDGE_PRINTF_SPEC
After Bridge Execution API.
void ast_bridge_discard_after_callback(struct ast_channel *chan, enum ast_bridge_after_cb_reason reason)
Run discarding any after bridge callbacks.
@ AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED
@ AST_BRIDGE_AFTER_CB_REASON_DEPART
void ast_bridge_run_after_goto(struct ast_channel *chan)
Run a PBX on any after bridge goto location.
int ast_bridge_setup_after_goto(struct ast_channel *chan)
Setup any after bridge goto location to begin execution.
void ast_bridge_run_after_callback(struct ast_channel *chan)
Run any after bridge callback.
void ast_bridge_discard_after_goto(struct ast_channel *chan)
Discard channel after bridge goto location.
Basic bridge subclass API.
void ast_bridging_init_basic(void)
#define ast_bridge_channel_unlock(bridge_channel)
Unlock the bridge_channel.
int ast_bridge_channel_write_unhold(struct ast_bridge_channel *bridge_channel)
Write an unhold frame into the bridge.
void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
Lock the bridge associated with the bridge channel.
void ast_bridge_channel_kick(struct ast_bridge_channel *bridge_channel, int cause)
Kick the channel out of the bridge.
void ast_bridge_channel_stream_map(struct ast_bridge_channel *bridge_channel)
Maps a channel's stream topology to and from the bridge.
#define ast_bridge_channel_lock(bridge_channel)
Lock the bridge_channel.
#define ast_bridge_channel_trylock(bridge_channel)
Try locking the bridge_channel.
struct ast_bridge_channel * ast_bridge_channel_peer(struct ast_bridge_channel *bridge_channel)
Get the peer bridge channel of a two party bridge.
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_STATE_END_NO_DISSOLVE
@ BRIDGE_CHANNEL_STATE_WAIT
@ BRIDGE_CHANNEL_STATE_END
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.
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.
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_THREAD_SIMPLE
@ BRIDGE_CHANNEL_THREAD_IDLE
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).
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.
Private Bridging Channel API.
void bridge_channel_internal_unsuspend_nolock(struct ast_bridge_channel *bridge_channel)
void bridge_channel_internal_suspend_nolock(struct ast_bridge_channel *bridge_channel)
void bridge_channel_settle_owed_events(struct ast_bridge *orig_bridge, 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_blind_transfer(struct ast_channel *transferee, const char *exten, const char *context, transfer_channel_cb new_channel_cb, void *user_data)
int bridge_channel_internal_push(struct ast_bridge_channel *bridge_channel)
int bridge_channel_internal_allows_optimization(struct ast_bridge_channel *bridge_channel)
int bridge_channel_internal_queue_attended_transfer(struct ast_channel *transferee, struct ast_channel *unbridged_chan)
struct ast_bridge_channel * bridge_channel_internal_alloc(struct ast_bridge *bridge)
void bridge_channel_internal_pull(struct ast_bridge_channel *bridge_channel)
int bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel)
@ BRIDGE_CHANNEL_ACTION_DEFERRED_TECH_DESTROY
@ BRIDGE_CHANNEL_ACTION_DEFERRED_DISSOLVING
void bridge_channel_queue_deferred_frames(struct ast_bridge_channel *bridge_channel)
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.
@ AST_BRIDGE_HOOK_TYPE_JOIN
@ AST_BRIDGE_HOOK_TYPE_HANGUP
@ AST_BRIDGE_HOOK_TYPE_MOVE
@ AST_BRIDGE_HOOK_TYPE_DTMF
@ AST_BRIDGE_HOOK_TYPE_LEAVE
@ AST_BRIDGE_HOOK_TYPE_TALK
@ AST_BRIDGE_HOOK_TYPE_TIMER
ast_bridge_hook_remove_flags
@ AST_BRIDGE_HOOK_REMOVE_ON_PULL
ast_bridge_builtin_feature
Built in DTMF features.
@ AST_BRIDGE_FLAG_TRANSFER_BRIDGE_ONLY
@ AST_BRIDGE_FLAG_SWAP_INHIBIT_TO
@ AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM
@ AST_BRIDGE_FLAG_TRANSFER_PROHIBITED
@ AST_BRIDGE_FLAG_MERGE_INHIBIT_TO
@ AST_BRIDGE_FLAG_MASQUERADE_ONLY
@ AST_BRIDGE_FLAG_DISSOLVE_HANGUP
@ AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
@ AST_BRIDGE_FLAG_INVISIBLE
#define MAXIMUM_DTMF_FEATURE_STRING
Maximum length of a DTMF feature string.
ast_bridge_hook_timer_option
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.
int(* ast_bridge_talking_indicate_callback)(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)
Talking indicator callback.
@ AST_BRIDGE_CHANNEL_FLAG_IMMOVABLE
@ AST_BRIDGE_CHANNEL_FLAG_LONELY
@ AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP
int(* ast_bridge_hook_callback)(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
Hook callback type.
void(* ast_bridge_hook_pvt_destructor)(void *hook_pvt)
Hook pvt destructor callback.
ast_bridge_builtin_interval
@ AST_BRIDGE_BUILTIN_INTERVAL_LIMITS
@ AST_BRIDGE_BUILTIN_INTERVAL_END
static void deferred_action(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
Internal Asterisk hangup causes.
#define AST_CAUSE_NORMAL_CLEARING
static void suspend(struct cc_core_instance *core_instance)
static struct ast_timer * timer
static const char config[]
static int request(void *obj)
General Asterisk PBX channel definitions.
const char * ast_channel_name(const struct ast_channel *chan)
struct ast_bridge * ast_channel_internal_bridge(const struct ast_channel *chan)
int ast_call(struct ast_channel *chan, const char *addr, int timeout)
Make a call.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
@ AST_CHANNEL_REQUESTOR_REPLACEMENT
void ast_party_connected_line_free(struct ast_party_connected_line *doomed)
Destroy the connected line information contents.
void ast_channel_internal_bridge_channel_set(struct ast_channel *chan, struct ast_bridge_channel *value)
#define ast_channel_lock(chan)
struct ast_format_cap * ast_channel_nativeformats(const struct ast_channel *chan)
struct ast_channel * ast_channel_yank(struct ast_channel *yankee)
Gain control of a channel in the system.
struct ast_flags * ast_channel_flags(struct ast_channel *chan)
#define ast_channel_ref(c)
Increase channel reference count.
#define ast_channel_lock_both(chan1, chan2)
Lock two channels.
const char * ast_channel_uniqueid(const struct ast_channel *chan)
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().
int ast_check_hangup_locked(struct ast_channel *chan)
struct ast_channel * ast_channel_get_by_name_prefix(const char *name, size_t name_len)
Find a channel by a name prefix.
#define ast_channel_trylock(chan)
const char * ast_channel_appl(const struct ast_channel *chan)
struct ast_bridge_channel * ast_channel_internal_bridge_channel(const struct ast_channel *chan)
void ast_channel_internal_bridge_set(struct ast_channel *chan, struct ast_bridge *value)
struct ast_bridge * ast_channel_get_bridge(const struct ast_channel *chan)
Get the bridge associated with a channel.
int ast_softhangup(struct ast_channel *chan, int cause)
Softly hangup up a channel.
struct ast_readq_list * ast_channel_readq(struct ast_channel *chan)
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.
#define ast_channel_unref(c)
Decrease channel reference count.
void ast_party_connected_line_init(struct ast_party_connected_line *init)
Initialize the given connected line structure.
struct ast_bridge_channel * ast_channel_get_bridge_channel(struct ast_channel *chan)
Get a reference to the channel's bridge pointer.
const char * ast_cause2str(int cause) attribute_pure
Gives the string form of a given cause code.
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.
int ast_softhangup_nolock(struct ast_channel *chan, int cause)
Softly hangup up a channel (no channel lock)
struct ast_pbx * ast_channel_pbx(const struct ast_channel *chan)
int ast_channel_softhangup_internal_flag(struct ast_channel *chan)
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
#define ast_channel_cleanup(c)
Cleanup a channel reference.
int ast_answer(struct ast_channel *chan)
Answer a channel.
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
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.
#define ast_channel_unlock(chan)
#define AST_MAX_EXTENSION
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.
@ AST_SOFTHANGUP_ASYNCGOTO
int ast_channel_has_audio_frame_or_monitor(struct ast_channel *chan)
Check if the channel has active audiohooks, active framehooks, or a monitor.
ast_channel_state
ast_channel states
Standard Command Line Interface.
#define AST_CLI_YESNO(x)
Return Yes or No depending on the argument.
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define AST_CLI_DEFINE(fn, txt,...)
int ast_cli_completion_add(char *value)
Add a result to a request for completion options.
void ast_cli(int fd, const char *fmt,...)
char * ast_cli_complete(const char *word, const char *const choices[], int pos)
#define ast_cli_register_multiple(e, len)
Register multiple commands.
static struct channel_usage channels
static struct ao2_container * locals
Local proxy channel special access.
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...
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().
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 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().
Unreal channel derivative framework.
#define AST_UNREAL_OPTIMIZE_BEGUN
#define ast_datastore_alloc(info, uid)
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
Call Parking and Pickup API Includes code and algorithms from the Zapata library.
Generic File Format Support. Should be included by clients of the file handling routines....
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
void astman_send_listack(struct mansession *s, const struct message *m, char *msg, char *listflag)
Send ack in manager transaction to begin a list.
void astman_send_error(struct mansession *s, const struct message *m, char *error)
Send error in manager transaction.
void astman_send_list_complete_start(struct mansession *s, const struct message *m, const char *event_name, int count)
Start the list complete event.
void astman_send_ack(struct mansession *s, const struct message *m, char *msg)
Send ack in manager transaction.
const char * astman_get_header(const struct message *m, char *var)
Get header from manager transaction.
void astman_send_list_complete_end(struct mansession *s)
End the list complete event.
void astman_append(struct mansession *s, const char *fmt,...)
int ast_manager_unregister(const char *action)
Unregister a registered manager command.
#define SCOPE_TRACE(__level,...)
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,...
void ast_channel_stage_snapshot_done(struct ast_channel *chan)
Clear flag to indicate channel snapshot is being staged, and publish snapshot.
void ast_channel_stage_snapshot(struct ast_channel *chan)
Set flag to indicate channel snapshot is being staged.
struct ast_heap * ast_heap_destroy(struct ast_heap *h)
Destroy a max heap.
#define ast_heap_create(init_height, cmp_fn, index_offset)
Create a max heap.
#define ast_heap_unlock(h)
void * ast_heap_pop(struct ast_heap *h)
Pop the max element off of the heap.
void * ast_heap_remove(struct ast_heap *h, void *elm)
Remove a specific element from a heap.
size_t ast_heap_size(struct ast_heap *h)
Get the current size of a heap.
#define ast_heap_push(h, elm)
Push an element on to a heap.
#define ast_heap_wrlock(h)
void * ast_heap_peek(struct ast_heap *h, unsigned int index)
Peek at an element on a heap.
Application convenience functions, designed to give consistent look and feel to Asterisk apps.
#define ast_frdup(fr)
Copies a frame.
@ AST_FRAME_BRIDGE_ACTION
@ AST_CONTROL_CONNECTED_LINE
Support for logging to various files, console and syslog Configuration in file logger....
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...
#define ast_debug(level,...)
Log a DEBUG message.
ast_callid ast_read_threadstorage_callid(void)
extracts the callerid from the thread
int ast_callid_threadassoc_add(ast_callid callid)
Adds a known callid to thread storage of the calling thread.
#define ast_verb(level,...)
A set of macros to manage forward-linked lists.
#define AST_RWLIST_REMOVE_CURRENT
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
#define AST_LIST_HEAD_INIT_NOLOCK(head)
Initializes a list head structure.
#define AST_LIST_HEAD_NOLOCK(name, type)
Defines a structure to be used to hold a list of specified type (with no lock).
#define AST_LIST_LAST(head)
Returns the last entry contained in a list.
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN
#define AST_RWLIST_WRLOCK(head)
Write locks a list.
#define AST_RWLIST_UNLOCK(head)
Attempts to unlock a read/write based list.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_RWLIST_HEAD_STATIC(name, type)
Defines a structure to be used to hold a read/write list of specified type, statically initialized.
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
#define AST_RWLIST_TRAVERSE_SAFE_END
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
#define AST_RWLIST_TRAVERSE
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
#define AST_RWLIST_INSERT_TAIL
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
#define AST_RWLIST_INSERT_BEFORE_CURRENT
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
Asterisk locking-related definitions:
#define ast_cond_destroy(cond)
#define ast_cond_wait(cond, mutex)
#define AST_PTHREADT_NULL
#define ast_cond_init(cond, attr)
#define ast_mutex_init(pmutex)
#define ast_mutex_unlock(a)
int ast_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
#define SCOPED_LOCK(varname, lock, lockfunc, unlockfunc)
Scoped Locks.
pthread_cond_t ast_cond_t
#define SCOPED_MUTEX(varname, lock)
scoped lock specialization for mutexes
#define ast_mutex_destroy(a)
#define ast_mutex_lock(a)
#define AST_MUTEX_DEFINE_STATIC(mutex)
#define ast_cond_signal(cond)
#define ast_manager_register_xml_core(action, authority, func)
Register a manager callback using XML documentation to describe the manager.
Asterisk module definitions.
#define ast_module_unref(mod)
Release a reference to the module.
#define ast_module_running_ref(mod)
Hold a reference to the module if it is running.
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
Options provided by main asterisk program.
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.
int ast_parking_provider_registered(void)
Check whether a parking provider is registered.
Core PBX routines and definitions.
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
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.
Say numbers and dates (maybe words one day too)
void ast_bridge_publish_merge(struct ast_bridge *to, struct ast_bridge *from)
Publish a bridge merge.
void ast_bridge_publish_attended_transfer(struct ast_attended_transfer_message *transfer_msg)
Publish an attended transfer.
void ast_bridge_publish_blind_transfer(struct ast_blind_transfer_message *transfer_message)
Publish a blind transfer event.
int ast_bridge_topic_exists(const char *uniqueid)
Check if a stasis topic exists for a bridge uniqueid.
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.
struct ast_bridge_snapshot * ast_bridge_get_snapshot(struct ast_bridge *bridge)
Returns the current snapshot for the bridge.
int bridge_topics_init(struct ast_bridge *bridge)
struct ast_bridge_snapshot * ast_bridge_get_snapshot_by_uniqueid(const char *bridge_id)
Returns the current snapshot for the bridge.
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.
void ast_bridge_publish_state(struct ast_bridge *bridge)
Publish the state of a bridge.
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.
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_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.
struct stasis_topic * ast_bridge_topic(struct ast_bridge *bridge)
A topic which publishes the events for a particular bridge.
int ast_stasis_bridging_init(void)
void bridge_topics_destroy(struct ast_bridge *bridge)
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.
Caching pattern for Stasis Message Bus API topics.
#define ast_string_field_set(x, field, data)
Set a field to a simple string value.
#define ast_string_field_init(x, size)
Initialize a field pool and fields.
#define ast_string_field_free_memory(x)
free all memory - to be called before destroying the object
char * ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one.
static force_inline int attribute_pure ast_str_hash(const char *str)
Compute a hash value on a string.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define ast_str_create(init_len)
Create a malloc'ed dynamic length string.
int ast_str_set(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Set a dynamic string using variable arguments.
#define AST_YESNO(x)
return Yes or No depending on the argument.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Message representing attended transfer.
Message published during a blind transfer.
struct ast_channel_snapshot * replace_channel
Structure that contains information regarding a channel in a bridge.
struct ast_channel * swap
struct ast_bridge * bridge
Bridge this channel is participating in.
struct ast_bridge_channel::@193 entry
struct ast_bridge_features * features
struct ast_channel * chan
enum bridge_channel_state state
unsigned int inhibit_colp
enum bridge_channel_thread_state activity
The bridge channel thread activity.
struct ast_bridge_tech_optimizations tech_args
Structure that contains configuration information for the limits feature.
Structure that contains features information.
struct ao2_container * other_hooks
struct ao2_container * dtmf_hooks
unsigned int interval_sequence
unsigned int dtmf_passthrough
struct ast_heap * interval_hooks
unsigned int text_messaging
struct ast_flags feature_flags
char code[MAXIMUM_DTMF_FEATURE_STRING]
struct ast_bridge_hook generic
struct ast_bridge_hook_dtmf_parms dtmf
struct ast_bridge_hook generic
struct ast_bridge_hook_timer_parms timer
Structure that is the essence of a feature hook.
struct ast_flags remove_flags
ast_bridge_hook_pvt_destructor destructor
enum ast_bridge_hook_type type
ast_bridge_hook_callback callback
Bridge virtual methods table definition.
ast_bridge_dissolving_fn dissolving
ast_bridge_push_channel_fn push
ast_bridge_notify_masquerade_fn notify_masquerade
ast_bridge_destructor_fn destroy
ast_bridge_merge_priority_fn get_merge_priority
ast_bridge_pull_channel_fn pull
ast_bridge_push_channel_fn push_peek
Structure that contains a snapshot of information about a bridge.
enum ast_bridge_video_mode_type video_mode
struct timeval creationtime
const ast_string_field video_source_id
const ast_string_field creator
const ast_string_field uniqueid
unsigned int num_channels
const ast_string_field technology
const ast_string_field name
struct ao2_container * channels
const ast_string_field subclass
unsigned int send_sdp_label
unsigned int maximum_sample_rate
The maximum sample rate softmix uses to mix channels.
unsigned int internal_sample_rate
The internal sample rate softmix uses to mix channels.
unsigned int binaural_active
struct ast_bridge_video_mode video_mode
unsigned int internal_mixing_interval
The mixing interval indicates how quickly softmix mixing should occur to mix audio.
Structure specific to bridge technologies capable of performing talking optimizations.
Structure that is the essence of a bridge technology.
void(* destroy)(struct ast_bridge *bridge)
Destroy a bridging technology instance for a bridge.
int(* start)(struct ast_bridge *bridge)
Request a bridge technology instance start operations.
void(* stream_topology_changed)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Callback for when a stream topology changes on the channel.
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.
int(* compatible)(struct ast_bridge *bridge)
Check if a bridge is compatible with the bridging technology.
void(* stop)(struct ast_bridge *bridge)
Request a bridge technology instance stop in preparation for being destroyed.
int(* join)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Add a channel to a bridging technology instance for a bridge.
int(* create)(struct ast_bridge *bridge)
Create a bridge technology instance for a bridge.
enum ast_bridge_preference preference
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_video_single_src_data single_src_data
struct ast_bridge_video_talker_src_data talker_src_data
unsigned int video_update_discard
union ast_bridge_video_mode::@191 mode_data
enum ast_bridge_video_mode_type mode
struct ast_bridge_video_sfu_data sfu_data
unsigned int remb_send_interval
enum ast_bridge_video_sfu_remb_behavior remb_behavior
struct ast_channel * chan_vsrc
This is used for both SINGLE_SRC_TALKER mode to set what channel should be the current single video f...
struct ast_channel * chan_old_vsrc
int average_talking_energy
struct ast_channel * chan_vsrc
Structure that contains information about a bridge.
struct ast_bridge_softmix softmix
struct ast_vector_int media_types
struct timeval creationtime
const struct ast_bridge_methods * v_table
unsigned int reconfigured
const ast_string_field creator
const ast_string_field uniqueid
struct ast_bridge_channels_list channels
struct ast_bridge_snapshot * current_snapshot
unsigned int num_channels
struct ast_bridge_technology * technology
unsigned int construction_completed
const ast_string_field name
struct ast_bridge::@192 action_queue
unsigned int inhibit_merge
Count of the active temporary requests to inhibit bridge merges. Zero if merges are allowed.
struct ast_flags feature_flags
uint32_t allowed_capabilities
const ast_string_field name
Structure representing a snapshot of channel state.
struct ast_channel_snapshot_base * base
Main Channel structure associated with a channel.
struct ast_bridge_channel * bridge_channel
struct ast_bridge * bridge
char exten[AST_MAX_EXTENSION]
const struct ast_channel_tech * tech
descriptor for a cli entry.
Structure for a data store type.
Structure for a data store object.
Data structure associated with a single frame of data.
union ast_frame::@228 data
struct ast_frame_subclass subclass
enum ast_frame_type frametype
Structure for mutex and tracking information.
Connected Line/Party information.
Support for dynamic strings.
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(*const optimization_finished)(struct ast_unreal_pvt *p, int success, unsigned int id)
Called when an optimization attempt completed successfully.
The base pvt structure for local channel derivatives.
struct ast_unreal_pvt_callbacks * callbacks
struct ast_channel * owner
Internal bridge impart wait condition and associated conditional.
struct bridge_channel_impart_cond::@311 node
struct bridge_manager_controller::@310 service_requests
struct ast_bridge * bridge
struct bridge_manager_request::@309 node
In case you didn't read that giant block of text above the mansession_session struct,...
struct ast_bridge_technology * tech
AO2 object that wraps data for transfer_channel_cb.
static int hook_cb(struct ast_config *cfg)
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 ...
void ast_format_duration_hh_mm_ss(int duration, char *buf, size_t length)
Formats a duration into HH:MM:SS.
int ast_tvcmp(struct timeval _a, struct timeval _b)
Compress two struct timeval instances returning -1, 0, 1 if the first arg is smaller,...
struct timeval ast_tvadd(struct timeval a, struct timeval b)
Returns the sum of two timevals a + b.
struct timeval ast_tvnow(void)
Returns current timeval. Meant to replace calls to gettimeofday().
Timing source management.
#define ast_test_flag(p, flag)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
#define ast_pthread_create(a, b, c, d)
#define ast_pthread_create_detached(a, b, c, d)
#define ast_set_flag(p, flag)
char * ast_uuid_generate_str(char *buf, size_t size)
Generate a UUID string.
#define AST_VECTOR_FREE(vec)
Deallocates this vector.
#define AST_VECTOR_INIT(vec, size)
Initialize a vector.