127 memset(sync_struct, 0,
sizeof(*sync_struct));
128 sync_struct->
id =
id;
154 if (iter->
id == sync_struct->
id) {
179#define PLAYBACK_TIMEOUT (600 * 1000)
189 struct timespec timeout_spec = {
190 .tv_sec = timeout_val.tv_sec,
191 .tv_nsec = timeout_val.tv_usec * 1000,
230 bridge = bridge_channel->
bridge;
236 if (bridge == bridge_channel->
bridge) {
249 .subclass.integer = started_talking
262 if (!pthread_equal(pthread_self(), bridge_channel->
thread)) {
299 ast_debug(1,
"Setting %p(%s) state from:%u to:%u\n",
310 bridge_channel->
state = new_state;
329 if (other != bridge_channel) {
347 ast_debug(1,
"Bridge is returning %p(%s) to read format %s\n",
351 ast_debug(1,
"Bridge failed to return %p(%s) to read format %s\n",
357 ast_debug(1,
"Bridge is returning %p(%s) to write format %s\n",
361 ast_debug(1,
"Bridge failed to return %p(%s) to write format %s\n",
375 bridge = bridge_channel->
bridge;
393 oldest_linkedid_chan, other->
chan);
423 ast_debug(1,
"Setting channel %s peeraccount with channel %s accountcode '%s'.\n",
444 ast_debug(1,
"Setting channel %s accountcode with channel %s peeraccount '%s'.\n",
485 ast_debug(1,
"Changing channel %s peeraccount '%s' to match channel %s accountcode '%s'.\n",
522 unsigned int swap_in_bridge = 0;
523 unsigned int will_be_two_party;
546 if (will_be_two_party) {
615 ast_debug(1,
"Hangup hook %p is being removed from %p(%s)\n",
640 int unmapped_stream_num;
693 unmapped_stream_num = -1;
731 t38_parameters = frame->
data.
ptr;
783 .src =
"Bridge channel owed DTMF",
790 ast_log(
LOG_DTMF,
"DTMF end '%c' simulated to bridge %s because %s left. Duration %ld ms.\n",
803 .data.ptr = &t38_parameters,
804 .datalen =
sizeof(t38_parameters),
805 .
src =
"Bridge channel owed T.38 terminate",
808 ast_debug(1,
"T.38 terminate simulated to bridge %s because %s left.\n",
904 .subclass.integer = action,
906 .data.ptr = (
void *)
data,
931 int sync_payload_len =
sizeof(*sync_payload) + datalen;
935 .subclass.integer = action,
945 frame.
datalen = sync_payload_len;
976 .subclass.integer = action,
978 .data.ptr = (
void *)
data,
1076 ast_log(
LOG_ERROR,
"We couldn't write alert pipe for %p(%s)... something is VERY wrong\n",
1086 int not_written = -1;
1094 if (cur == bridge_channel) {
1108 .subclass.integer = control,
1110 .data.ptr = (
void *)
data,
1120 .subclass.integer = control,
1122 .data.ptr = (
void *)
data,
1135 datalen = strlen(moh_class) + 1;
1138 "musicclass", moh_class);
1148 moh_class, datalen);
1176 if (!strcasecmp(
"Gosub",
app_name)) {
1230 size_t len_name = strlen(
app_name) + 1;
1231 size_t len_args =
ast_strlen_zero(app_args) ? 0 : strlen(app_args) + 1;
1232 size_t len_moh = !moh_class ? 0 : strlen(moh_class) + 1;
1233 size_t len_data =
sizeof(*app_data) + len_name + len_args + len_moh;
1237 app_data->app_args_offset = len_args ? len_name : 0;
1238 app_data->moh_offset = len_moh ? len_name + len_args : 0;
1253 bridge_channel,
app_name, app_args, moh_class);
1259 bridge_channel,
app_name, app_args, moh_class);
1268 custom_play(bridge_channel, playfile);
1281 const char *latest_musicclass;
1321 size_t len_name = strlen(
playfile) + 1;
1322 size_t len_moh = !moh_class ? 0 : strlen(moh_class) + 1;
1323 size_t len_payload =
sizeof(*payload) + len_name + len_moh;
1328 payload->
moh_offset = len_moh ? len_name : 0;
1409 cb_data = alloca(len_data);
1470 const char *parkee_uuid,
1471 const char *parker_uuid,
1476 size_t len_parker_uuid = strlen(parker_uuid) + 1;
1478 size_t len_payload =
sizeof(*payload) + len_parker_uuid + len_parkee_uuid + len_app_data;
1480 payload = alloca(len_payload);
1481 payload->
app_data_offset = len_app_data ? len_parkee_uuid + len_parker_uuid : 0;
1509 struct timeval start;
1510 int chan_suspended = 0;
1517 unsigned int execution_time;
1520 ast_debug(1,
"Hook %p on %p(%s) wants to happen in the future, stopping our traversal\n",
1534 ast_debug(1,
"Executing hook %p on %p(%s)\n",
1548 ast_debug(1,
"Removed interval hook %p from %p(%s)\n",
1558 ast_debug(1,
"Updating interval hook %p with interval %u on %p(%s)\n",
1584 if (chan_suspended) {
1612#ifdef TEST_FRAMEWORK
1613 char *feature =
"unknown";
1623 if (!strcmp(dtmf, featuremap->
blindxfer)) {
1624 feature =
"blindxfer";
1625 }
else if (!strcmp(dtmf, featuremap->
atxfer)) {
1627 }
else if (!strcmp(dtmf, featuremap->
disconnect)) {
1628 feature =
"disconnect";
1629 }
else if (!strcmp(dtmf, featuremap->
automixmon)) {
1630 feature =
"automixmon";
1631 }
else if (!strcmp(dtmf, featuremap->
parkcall)) {
1632 feature =
"parkcall";
1637 feature =
"atxferthreeway";
1645 "Result: success\r\n"
1646 "Feature: %s", feature);
1658 ast_debug(1,
"DTMF feature string on %p(%s) is now '%s'\n",
1668 unsigned int digit_timeout;
1684 return digit_timeout;
1701 struct sanity_check_of_dtmf_size {
1706 if (!dtmf_len && !
digit) {
1720 ast_debug(1,
"No DTMF feature hooks on %p(%s) match '%s'\n",
1724 }
else if (dtmf_len != strlen(hook->
dtmf.
code)) {
1725 unsigned int digit_timeout;
1734 int already_suspended;
1736 ast_debug(1,
"DTMF feature hook %p matched DTMF string '%s' on %p(%s)\n",
1747 already_suspended = bridge_channel->
suspended;
1748 if (!already_suspended) {
1757 ast_debug(1,
"DTMF hook %p is being removed from %p(%s)\n",
1765 if (!already_suspended) {
1792 ast_debug(1,
"DTMF feature string collection on %p(%s) timed out\n",
1846 remove_me = talk_cb(bridge_channel, hook->
hook_pvt, talking);
1848 ast_debug(1,
"Talk detection hook %p is being removed from %p(%s)\n",
1862 ast_debug(1,
"Playing DTMF stream '%s' out to %p(%s)\n",
1881 unsigned char connected_line_data[1024];
1909 sizeof(connected_line_data), &connected_target,
NULL)) != -1) {
1962 const char *target_chan_name)
1975 chan_bridged = bridge_channel->
chan;
2081 switch (bridge_channel->
state) {
2117 ast_debug(1,
"Bridge %s: pulling %p(%s)\n",
2120 ast_verb(3,
"Channel %s left '%s' %s-bridge <%s>\n",
2128 ast_debug(1,
"Bridge %s: %p(%s) is leaving %s technology\n",
2176 ast_debug(1,
"Bridge %s: pushing %p(%s) by swapping with %p(%s)\n",
2180 ast_debug(1,
"Bridge %s: pushing %p(%s)\n",
2189 ast_debug(1,
"Bridge %s: pushing %p(%s) into bridge failed\n",
2222 ast_verb(3,
"Channel %s %s%s%s '%s' %s-bridge <%s>\n",
2224 swap ?
"swapped with " :
"joined",
2226 swap ?
" into" :
"",
2263 chan = bridge_channel->
chan;
2284 switch (ntohs(aoh->option)) {
2292 fr->
datalen -
sizeof(*aoh), 0);
2426 ast_debug(1,
"Sending TEXT frame to '%s': %*.s\n",
2432 ast_debug(1,
"Sending TEXT_DATA frame from '%s' to '%s:%s': %s\n",
2491 switch (frametype) {
2503#ifdef TEST_FRAMEWORK
2583 bridge_channel->
bridge, bridge_channel);
2602 bridge_channel->
bridge, bridge_channel);
2711 if (ms < 0 || (0 <= ms_interval && ms_interval < ms)) {
2739 ast_debug(1,
"Bridge %s: %p(%s) is going into a signal wait\n",
2763 }
else if (ms == 0) {
2767 }
else if (-1 < outfd) {
2823 uint8_t indicate_src_change = 0;
2828 ast_debug(1,
"Bridge %s: %p(%s) is joining\n",
2854 if (peer_bridge == bridge_channel->
bridge) {
2856 ast_debug(1,
"Bridge %s: %p(%s) denying Bridge join to prevent Local channel loop\n",
2874 ast_debug(1,
"Bridge %s: %p(%s) failed to join Bridge\n",
2884 if (channel_features) {
2897 swap = bridge_channel->
swap;
2920 indicate_src_change = 1;
2930 if (indicate_src_change) {
2958 ao2_t_cleanup(swap,
"Bridge push with swap failed or exited immediately");
2962 ast_debug(1,
"Channel %s simulating UNHOLD for bridge end.\n",
2980 ast_debug(1,
"Channel %s simulating T.38 terminate for bridge end.\n",
2983 &t38_parameters,
sizeof(t38_parameters));
3008 const char *exten,
const char *
context,
3018 if (!transferee_bridge_channel) {
3022 if (new_channel_cb) {
3043 if (!transferee_bridge_channel) {
3048 sizeof(unbridged_chan_name));
3052 sizeof(unbridged_chan_name));
3067 if (bridge_channel->
callid) {
3068 bridge_channel->
callid = 0;
3071 if (bridge_channel->
bridge) {
3101 if (!bridge_channel) {
3116 return bridge_channel;
void ast_jb_enable_for_channel(struct ast_channel *chan)
Sets a jitterbuffer frame hook on the channel based on the channel's stored jitterbuffer configuratio...
void ast_alertpipe_close(int alert_pipe[2])
Close an alert pipe.
ssize_t ast_alertpipe_write(int alert_pipe[2])
Write an event to an alert pipe.
int ast_alertpipe_init(int alert_pipe[2])
Initialize an alert pipe.
ast_alert_status_t ast_alertpipe_read(int alert_pipe[2])
Read an event from an alert pipe.
struct sla_ringing_trunk * first
Asterisk main include file. File version handling, generic pbx functions.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
#define ast_strndup(str, len)
A wrapper for strndup()
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ao2_iterator_next(iter)
#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_ref(o, delta)
Reference/unreference an object and return the old refcount.
#define ao2_t_cleanup(obj, tag)
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_PARTIAL_KEY
The arg parameter is a partial search key similar to OBJ_SEARCH_KEY.
#define ao2_alloc(data_size, destructor_fn)
void ast_bridge_features_remove(struct ast_bridge_features *features, enum ast_bridge_hook_remove_flags flags)
Remove marked bridge channel feature hooks.
#define ast_bridge_unlock(bridge)
Unlock the bridge.
void ast_bridge_vars_set(struct ast_channel *chan, const char *name, const char *pvtid)
Sets BRIDGECHANNEL and BRIDGEPVTCALLID for a channel.
@ AST_BRIDGE_CAPABILITY_MULTIMIX
@ AST_BRIDGE_TRANSFER_SINGLE_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.
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.
#define ast_bridge_lock(bridge)
Lock the bridge.
After Bridge Execution API.
ast_bridge_after_cb_reason
int ast_bridge_set_after_callback(struct ast_channel *chan, ast_bridge_after_cb callback, ast_bridge_after_cb_failed failed, void *data)
Setup an after bridge callback for when the channel leaves the bridging system.
const char * ast_bridge_after_cb_reason_string(enum ast_bridge_after_cb_reason reason)
Get a string representation of an after bridge callback reason.
void ast_bridge_channel_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
Play a file on the bridge channel.
static void bridge_handle_trip(struct ast_bridge_channel *bridge_channel)
int ast_bridge_channel_write_app(struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class)
Write a bridge action run application frame into the bridge.
static void bridge_sync_init(struct bridge_sync *sync_struct, unsigned int id)
Initialize a synchronous bridge object.
static struct ast_frame * bridge_handle_dtmf(struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
void ast_bridge_channel_run_app(struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class)
Run an application on the bridge channel.
static int bridge_channel_next_timeout(struct ast_bridge_channel *bridge_channel)
void bridge_channel_internal_unsuspend_nolock(struct ast_bridge_channel *bridge_channel)
void ast_bridge_channel_update_linkedids(struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
void ast_bridge_channel_feature_digit_add(struct ast_bridge_channel *bridge_channel, int digit)
Add a DTMF digit to the collected digits.
struct ast_channel * ast_bridge_channel_get_chan(struct ast_bridge_channel *bridge_channel)
Get a ref to the bridge_channel's ast_channel.
static void bridge_channel_cancel_owed_events(struct ast_bridge_channel *bridge_channel)
static void sendtext_safe(struct ast_channel *chan, const struct ast_frame *f)
static int channel_set_cause(struct ast_channel *chan, int cause)
static void bridge_channel_update_accountcodes_joining(struct ast_bridge_channel *joining, struct ast_bridge_channel *swap)
static void bridge_frame_free(struct ast_frame *frame)
static void channel_fill_empty_peeraccount(struct ast_channel *dest, struct ast_channel *src)
static void channel_update_peeraccount(struct ast_channel *dest, struct ast_channel *src)
static void testsuite_notify_feature_success(struct ast_channel *chan, const char *dtmf)
void bridge_channel_internal_suspend_nolock(struct ast_bridge_channel *bridge_channel)
static void channel_fill_empty_accountcode(struct ast_channel *dest, struct ast_channel *src)
void bridge_channel_settle_owed_events(struct ast_bridge *orig_bridge, struct ast_bridge_channel *bridge_channel)
int ast_bridge_channel_write_unhold(struct ast_bridge_channel *bridge_channel)
Write an unhold frame into the bridge.
static void bridge_channel_run_app(struct ast_bridge_channel *bridge_channel, struct bridge_run_app *data)
int ast_bridge_channel_queue_app(struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class)
Queue a bridge action run application frame onto the bridge channel.
int bridge_channel_internal_push_full(struct ast_bridge_channel *bridge_channel, int optimized)
void ast_bridge_channel_update_accountcodes(struct ast_bridge_channel *joining, struct ast_bridge_channel *leaving)
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 void bridge_channel_attended_transfer(struct ast_bridge_channel *bridge_channel, const char *target_chan_name)
static void bridge_channel_do_callback(struct ast_bridge_channel *bridge_channel, struct bridge_custom_callback *data)
static void channel_set_empty_accountcodes(struct ast_channel *c0, struct ast_channel *c1)
static void after_bridge_move_channel_fail(enum ast_bridge_after_cb_reason reason, void *data)
void ast_bridge_channel_feature_digit(struct ast_bridge_channel *bridge_channel, int digit)
Add a DTMF digit to the collected digits to match against DTMF features.
static const char * controls[]
static int bridge_channel_queue_action_data(struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen)
static void bridge_channel_wait(struct ast_bridge_channel *bridge_channel)
static void bridge_channel_destroy(void *obj)
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.
static int bridge_channel_queue_action_data_sync(struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen)
int ast_bridge_channel_notify_talking(struct ast_bridge_channel *bridge_channel, int started_talking)
Lets the bridging indicate when a bridge channel has stopped or started talking.
static void bridge_channel_handle_interval(struct ast_bridge_channel *bridge_channel)
static void bridge_channel_unsuspend(struct ast_bridge_channel *bridge_channel)
static int bridge_channel_feature_timeout(struct ast_bridge_channel *bridge_channel)
static void bridge_channel_poke(struct ast_bridge_channel *bridge_channel)
int bridge_channel_internal_push(struct ast_bridge_channel *bridge_channel)
static void bridge_channel_dissolve_check(struct ast_bridge_channel *bridge_channel)
static void bridge_channel_event_join_leave(struct ast_bridge_channel *bridge_channel, enum ast_bridge_hook_type type)
int ast_bridge_channel_write_control_data(struct ast_bridge_channel *bridge_channel, enum ast_control_frame_type control, const void *data, size_t datalen)
Write a control frame into the bridge with data.
static void bridge_channel_dtmf_stream(struct ast_bridge_channel *bridge_channel, const char *dtmf)
static void bridge_channel_handle_write(struct ast_bridge_channel *bridge_channel)
int bridge_channel_internal_allows_optimization(struct ast_bridge_channel *bridge_channel)
static int bridge_channel_write_frame(struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
void ast_bridge_channel_stream_map(struct ast_bridge_channel *bridge_channel)
Maps a channel's stream topology to and from the bridge.
static void bridge_channel_blind_transfer(struct ast_bridge_channel *bridge_channel, struct blind_transfer_data *blind_data)
int bridge_channel_internal_queue_attended_transfer(struct ast_channel *transferee, struct ast_channel *unbridged_chan)
static void bridge_channel_park(struct ast_bridge_channel *bridge_channel, struct bridge_park *payload)
static void bridge_sync_wait(struct bridge_sync *sync_struct)
Wait for a synchronous bridge action to complete.
struct ast_bridge_channel * bridge_channel_internal_alloc(struct ast_bridge *bridge)
struct ast_bridge * ast_bridge_channel_merge_inhibit(struct ast_bridge_channel *bridge_channel, int request)
Adjust the bridge_channel's bridge merge inhibit request count.
static void bridge_channel_handle_feature_timeout(struct ast_bridge_channel *bridge_channel)
static void bridge_sync_cleanup(struct bridge_sync *sync_struct)
Clean up a synchronization bridge object.
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).
static int bridge_channel_write_action_data(struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen)
int ast_bridge_channel_queue_frame(struct ast_bridge_channel *bridge_channel, struct ast_frame *fr)
Write a frame to the specified bridge_channel.
void bridge_channel_internal_pull(struct ast_bridge_channel *bridge_channel)
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 void after_bridge_move_channel(struct ast_channel *chan_bridged, void *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.
static void bridge_channel_update_accountcodes_leaving(struct ast_bridge_channel *leaving)
void ast_bridge_channel_restore_formats(struct ast_bridge_channel *bridge_channel)
Restore the formats of a bridge channel's channel to how they were before bridge_channel_internal_joi...
int ast_bridge_channel_queue_playfile_sync(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
Synchronously queue a bridge action play file frame onto the bridge channel.
int bridge_channel_internal_join(struct ast_bridge_channel *bridge_channel)
static int sync_ids
Counter used for assigning synchronous bridge action IDs.
static int payload_helper_app(ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class)
#define PLAYBACK_TIMEOUT
Failsafe for synchronous bridge action waiting.
static int payload_helper_playfile(ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
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.
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).
static void bridge_channel_playfile(struct ast_bridge_channel *bridge_channel, struct bridge_playfile *payload)
int ast_bridge_channel_write_hold(struct ast_bridge_channel *bridge_channel, const char *moh_class)
Write a hold frame into the bridge.
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.
static void bridge_channel_handle_control(struct ast_bridge_channel *bridge_channel, struct ast_frame *fr)
int ast_bridge_channel_write_callback(struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_custom_callback_option flags, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size)
Write a bridge action custom callback frame into the bridge.
static int run_app_helper(struct ast_channel *chan, const char *app_name, const char *app_args)
static void bridge_sync_signal(struct bridge_sync *sync_struct)
Signal that waiting for a synchronous bridge action is no longer necessary.
static void bridge_channel_talking(struct ast_bridge_channel *bridge_channel, int talking)
int(* ast_bridge_channel_post_action_data)(struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, const void *data, size_t datalen)
Used to queue an action frame onto a bridge channel and write an action frame into a bridge.
static void bridge_channel_suspend(struct ast_bridge_channel *bridge_channel)
static int bridge_channel_write_dtmf_stream(struct ast_bridge_channel *bridge_channel, const char *dtmf)
static unsigned int bridge_channel_feature_digit_timeout(struct ast_bridge_channel *bridge_channel)
static int payload_helper_park(ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, const char *parkee_uuid, const char *parker_uuid, const char *app_data)
static int bridge_channel_feature_digit_add(struct ast_bridge_channel *bridge_channel, int digit, size_t dtmf_len)
void bridge_channel_queue_deferred_frames(struct ast_bridge_channel *bridge_channel)
int ast_bridge_queue_everyone_else(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
Queue the given frame to everyone else.
static int bridge_channel_next_interval(struct ast_bridge_channel *bridge_channel)
static void bridge_channel_handle_action(struct ast_bridge_channel *bridge_channel, enum bridge_channel_action_type action, void *data)
int ast_bridge_channel_write_park(struct ast_bridge_channel *bridge_channel, const char *parkee_uuid, const char *parker_uuid, const char *app_data)
Have a bridge channel park a channel in the bridge.
static void channel_update_peeraccounts(struct ast_channel *c0, struct ast_channel *c1)
static int payload_helper_cb(ast_bridge_channel_post_action_data post_it, struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_custom_callback_option flags, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size)
ast_bridge_channel_custom_callback_option
@ AST_BRIDGE_CHANNEL_CB_OPTION_MEDIA
#define ast_bridge_channel_unlock(bridge_channel)
Unlock the bridge_channel.
void(* ast_bridge_custom_callback_fn)(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
Custom callback run on a bridge channel.
#define ast_bridge_channel_lock(bridge_channel)
Lock the bridge_channel.
bridge_channel_state
State information about a bridged channel.
@ BRIDGE_CHANNEL_STATE_END_NO_DISSOLVE
@ BRIDGE_CHANNEL_STATE_WAIT
@ BRIDGE_CHANNEL_STATE_END
@ BRIDGE_CHANNEL_THREAD_FRAME
@ BRIDGE_CHANNEL_THREAD_SIMPLE
@ BRIDGE_CHANNEL_THREAD_IDLE
void(* ast_bridge_custom_play_fn)(struct ast_bridge_channel *bridge_channel, const char *playfile)
Custom interpretation of the playfile name.
Private Bridging Channel API.
void bridge_channel_impart_signal(struct ast_channel *chan)
bridge_channel_action_type
@ BRIDGE_CHANNEL_ACTION_ATTENDED_TRANSFER
@ BRIDGE_CHANNEL_ACTION_DTMF_STREAM
@ BRIDGE_CHANNEL_ACTION_TALKING_STOP
@ BRIDGE_CHANNEL_ACTION_PLAY_FILE
@ BRIDGE_CHANNEL_ACTION_TALKING_START
@ BRIDGE_CHANNEL_ACTION_BLIND_TRANSFER
@ BRIDGE_CHANNEL_ACTION_CALLBACK
@ BRIDGE_CHANNEL_ACTION_RUN_APP
@ BRIDGE_CHANNEL_ACTION_PARK
@ AST_BRIDGE_HOOK_TYPE_JOIN
@ AST_BRIDGE_HOOK_TYPE_HANGUP
@ AST_BRIDGE_HOOK_TYPE_LEAVE
@ AST_BRIDGE_HOOK_TYPE_TALK
@ AST_BRIDGE_HOOK_REMOVE_ON_PULL
@ AST_BRIDGE_FLAG_DISSOLVE_EMPTY
@ AST_BRIDGE_FLAG_DISSOLVE_HANGUP
void ast_bridge_features_merge(struct ast_bridge_features *into, const struct ast_bridge_features *from)
Merge one ast_bridge_features into another.
@ AST_BRIDGE_HOOK_TIMER_OPTION_MEDIA
int(* ast_bridge_talking_indicate_callback)(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)
Talking indicator callback.
@ AST_BRIDGE_CHANNEL_FLAG_LONELY
@ AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP
void bridge_dissolve(struct ast_bridge *bridge, int cause)
void bridge_reconfigured(struct ast_bridge *bridge, unsigned int colp_update)
struct ast_bridge_channel * bridge_find_channel(struct ast_bridge *bridge, struct ast_channel *chan)
void bridge_merge_inhibit_nolock(struct ast_bridge *bridge, int request)
int ast_bridge_channel_establish_roles(struct ast_bridge_channel *bridge_channel)
Clone the roles from a bridge_channel's attached ast_channel onto the bridge_channel's role list.
void ast_bridge_channel_clear_roles(struct ast_bridge_channel *bridge_channel)
Clear all roles from a bridge_channel's role list.
Internal Asterisk hangup causes.
#define AST_CAUSE_NORMAL_CLEARING
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)
void ast_channel_end_dtmf(struct ast_channel *chan, char digit, struct timeval start, const char *why)
Simulate a DTMF end on a broken bridge channel.
void ast_channel_internal_copy_linkedid(struct ast_channel *dest, struct ast_channel *source)
Copy the full linkedid channel id structure from one channel to another.
struct ast_channel * ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds, int nfds, int *exception, int *outfd, int *ms)
Waits for activity on a group of channels.
void ast_channel_clear_flag(struct ast_channel *chan, unsigned int flag)
Clear a flag on a channel.
int ast_channel_connected_line_sub(struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const void *connected_info, int frame)
Run a connected line interception subroutine and update a channel's connected line information.
const char * ast_channel_latest_musicclass(const struct ast_channel *chan)
void ast_party_connected_line_free(struct ast_party_connected_line *doomed)
Destroy the connected line information contents.
int ast_sendtext_data(struct ast_channel *chan, struct ast_msg_data *msg)
Sends text to a channel in an ast_msg_data structure wrapper with ast_sendtext as fallback.
#define ast_channel_lock(chan)
struct timeval ast_channel_sending_dtmf_tv(const struct ast_channel *chan)
int ast_queue_frame_head(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to the head of a channel's frame queue.
void ast_party_connected_line_copy(struct ast_party_connected_line *dest, const struct ast_party_connected_line *src)
Copy the source connected line information to the destination connected line.
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.
struct ast_party_connected_line * ast_channel_connected(struct ast_channel *chan)
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
const char * ast_channel_accountcode(const struct ast_channel *chan)
int ast_check_hangup_locked(struct ast_channel *chan)
int ast_queue_control_data(struct ast_channel *chan, enum ast_control_frame_type control, const void *data, size_t datalen)
Queue a control frame with payload.
struct ast_bridge_features * ast_channel_feature_hooks_get(struct ast_channel *chan)
Gets the channel-attached features a channel has access to upon being bridged.
int ast_channel_move(struct ast_channel *dest, struct ast_channel *source)
Move a channel from its current location to a new location.
int ast_sendtext(struct ast_channel *chan, const char *text)
Sends text to a channel.
struct ast_frame * ast_read_stream(struct ast_channel *chan)
Reads a frame, but does not filter to just the default streams.
const char * ast_channel_peeraccount(const struct ast_channel *chan)
int ast_channel_redirecting_sub(struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const void *redirecting_info, int is_frame)
Run a redirecting interception subroutine and update a channel's redirecting information.
struct ast_frame * ast_read_stream_noaudio(struct ast_channel *chan)
Reads a frame, but does not filter to just the default streams, returning AST_FRAME_NULL frame if aud...
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
void ast_channel_internal_bridge_set(struct ast_channel *chan, struct ast_bridge *value)
struct ast_stream_topology * ast_channel_get_stream_topology(const struct ast_channel *chan)
Retrieve the topology of streams on a channel.
void ast_channel_set_unbridged(struct ast_channel *chan, int value)
Sets the unbridged flag and queues a NULL frame on the channel to trigger a check by bridge_channel_w...
int ast_channel_hangupcause(const struct ast_channel *chan)
int ast_indicate_data(struct ast_channel *chan, int condition, const void *data, size_t datalen)
Indicates condition of channel, with payload.
int ast_softhangup(struct ast_channel *chan, int cause)
Softly hangup up a channel.
void ast_party_id_reset(struct ast_party_id *id)
Destroy and initialize the given party id structure.
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.
struct ast_format * ast_channel_writeformat(struct ast_channel *chan)
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
int ast_channel_unbridged(struct ast_channel *chan)
This function will check if the bridge needs to be re-evaluated due to external changes.
void ast_party_connected_line_init(struct ast_party_connected_line *init)
Initialize the given connected line structure.
int ast_channel_is_leaving_bridge(struct ast_channel *chan)
Determine if a channel is leaving a bridge, but not hung up.
int ast_channel_hold_state(const struct ast_channel *chan)
struct ast_bridge_channel * ast_channel_get_bridge_channel(struct ast_channel *chan)
Get a reference to the channel's bridge pointer.
struct ast_party_connected_line * ast_channel_connected_indicated(struct ast_channel *chan)
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.
const char * ast_channel_call_forward(const struct ast_channel *chan)
@ AST_FLAG_BRIDGE_DUAL_REDIRECT_WAIT
int ast_channel_setoption(struct ast_channel *channel, int option, void *data, int datalen, int block)
Sets an option on a channel.
struct ast_party_caller * ast_channel_caller(struct ast_channel *chan)
void ast_channel_queue_connected_line_update(struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update)
Queue a connected line update frame on a channel.
char ast_channel_sending_dtmf_digit(const struct ast_channel *chan)
int ast_write_stream(struct ast_channel *chan, int stream_num, struct ast_frame *frame)
Write a frame to a stream This function writes the given frame to the indicated stream on the channel...
void ast_channel_hangupcause_set(struct ast_channel *chan, int value)
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
int ast_answer(struct ast_channel *chan)
Answer a channel.
int ast_channel_is_multistream(struct ast_channel *chan)
Determine if a channel is multi-stream capable.
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
int ast_is_deferrable_frame(const struct ast_frame *frame)
Should we keep this frame for later?
int ast_channel_is_t38_active(struct ast_channel *chan)
This function will check if T.38 is active on the channel.
#define ast_channel_unlock(chan)
#define AST_MAX_EXTENSION
struct ast_channel * ast_channel_internal_oldest_linkedid(struct ast_channel *a, struct ast_channel *b)
Determine which channel has an older linkedid.
struct ast_format * ast_channel_readformat(struct ast_channel *chan)
ast_channel_state
ast_channel states
Local proxy channel special access.
struct ast_channel * ast_local_get_peer(struct ast_channel *ast)
Get the other local channel in the pair.
int ast_stream_and_wait(struct ast_channel *chan, const char *file, const char *digits)
stream file until digit If the file name is non-empty, try to play it.
struct stasis_message_type * ast_channel_hold_type(void)
Message type for when a channel is placed on hold.
void ast_channel_publish_cached_blob(struct ast_channel *chan, struct stasis_message_type *type, struct ast_json *blob)
Publish a channel blob message using the latest snapshot from the cache.
void ast_channel_publish_dial(struct ast_channel *caller, struct ast_channel *peer, const char *dialstring, const char *dialstatus)
Publish in the ast_channel_topic or ast_channel_topic_all topics a stasis message for the channels in...
struct stasis_message_type * ast_channel_unhold_type(void)
Message type for when a channel is removed from hold.
void ast_channel_publish_dial_forward(struct ast_channel *caller, struct ast_channel *peer, struct ast_channel *forwarded, const char *dialstring, const char *dialstatus, const char *forward)
Publish in the ast_channel_topic or ast_channel_topic_all topics a stasis message for the channels in...
const char * ast_msg_data_get_attribute(struct ast_msg_data *msg, enum ast_msg_data_attribute_type attribute_type)
Get attribute from ast_msg_data.
unsigned int option_dtmfminduration
#define ast_heap_unlock(h)
void * ast_heap_remove(struct ast_heap *h, void *elm)
Remove a specific element from 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.
int ast_app_exec_sub(struct ast_channel *autoservice_chan, struct ast_channel *sub_chan, const char *sub_args, int ignore_hangup)
Run a subroutine on a channel, placing an optional second channel into autoservice.
int ast_dtmf_stream(struct ast_channel *chan, struct ast_channel *peer, const char *digits, int between, unsigned int duration)
Send a string of DTMF digits to a channel.
struct ast_features_general_config * ast_get_chan_features_general_config(struct ast_channel *chan)
Get the general configuration options for a channel.
struct ast_featuremap_config * ast_get_chan_featuremap_config(struct ast_channel *chan)
Get the featuremap configuration options for a channel.
struct ast_features_xfer_config * ast_get_chan_features_xfer_config(struct ast_channel *chan)
Get the transfer configuration options for a channel.
@ AST_T38_REQUEST_TERMINATE
@ AST_T38_REQUEST_NEGOTIATE
@ AST_FRAME_READ_ACTION_CONNECTED_LINE_MACRO
#define AST_OPTION_RELAXDTMF
#define AST_OPTION_TONE_VERIFY
#define ast_frdup(fr)
Copies a frame.
#define AST_OPTION_DIGIT_DETECT
#define AST_OPTION_FLAG_REQUEST
#define AST_OPTION_FAX_DETECT
ast_frame_type
Frame types.
@ AST_FRAME_BRIDGE_ACTION_SYNC
@ AST_FRAME_BRIDGE_ACTION
ast_control_frame_type
Internal control frame subtype field values.
@ AST_CONTROL_STREAM_TOPOLOGY_REQUEST_CHANGE
@ AST_CONTROL_REDIRECTING
@ AST_CONTROL_T38_PARAMETERS
@ AST_CONTROL_READ_ACTION
@ AST_CONTROL_STREAM_TOPOLOGY_CHANGED
@ AST_CONTROL_CONNECTED_LINE
@ AST_CONTROL_MASQUERADE_NOTIFY
#define AST_OPTION_AUDIO_MODE
struct ast_frame ast_null_frame
#define DEBUG_ATLEAST(level)
#define ast_debug(level,...)
Log a DEBUG message.
ast_callid ast_read_threadstorage_callid(void)
extracts the callerid from the thread
#define ast_verb(level,...)
void ast_json_unref(struct ast_json *value)
Decrease refcount on value. If refcount reaches zero, value is freed.
struct ast_json * ast_json_pack(char const *format,...)
Helper for creating complex JSON values.
#define AST_RWLIST_RDLOCK(head)
Read locks a list.
#define AST_LIST_LAST(head)
Returns the last entry contained in a list.
#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_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
#define AST_RWLIST_TRAVERSE
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define AST_LIST_REMOVE(head, elm, field)
Removes a specific entry from a list.
#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_LIST_FIRST(head)
Returns the first entry contained in a list.
#define ast_cond_destroy(cond)
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
int ast_atomic_fetchadd_int(volatile int *p, int v)
Atomically add v to *p and return the previous value of *p.
#define ast_cond_signal(cond)
Out-of-call text message support.
int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass)
Turn on music on hold on a given channel.
int ast_parking_park_bridge_channel(struct ast_bridge_channel *parkee, const char *parkee_uuid, const char *parker_uuid, const char *app_data)
Perform a direct park on a channel in a bridge.
int ast_parking_provider_registered(void)
Check whether a parking provider is registered.
Core PBX routines and definitions.
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.
int ast_pbx_exec_application(struct ast_channel *chan, const char *app_name, const char *app_args)
Execute an application.
int ast_async_goto(struct ast_channel *chan, const char *context, const char *exten, int priority)
Set the channel to next execute the specified dialplan location.
const char * app_name(struct ast_app *app)
int ast_sem_init(struct ast_sem *sem, int pshared, unsigned int value)
Initialize a semaphore.
int ast_sem_destroy(struct ast_sem *sem)
Destroy a semaphore.
int ast_sem_timedwait(struct ast_sem *sem, const struct timespec *abs_timeout)
Decrements the semaphore, waiting until abs_timeout.
int ast_sem_post(struct ast_sem *sem)
Increments the semaphore, unblocking a waiter if necessary.
void ast_bridge_publish_leave(struct ast_bridge *bridge, struct ast_channel *chan)
Publish a bridge channel leave event.
void ast_bridge_publish_enter(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap)
Publish a bridge channel enter event.
void ast_stream_topology_map(const struct ast_stream_topology *topology, struct ast_vector_int *types, struct ast_vector_int *v0, struct ast_vector_int *v1)
Map a given topology's streams to the given types.
#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_strlen_zero(const char *s)
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...
Structure that contains information regarding a channel in a bridge.
struct ast_vector_int to_bridge
struct ast_bridge_channel::@198 stream_map
struct ast_bridge_channel::@195 dtmf_hook_state
struct ast_channel * swap
struct ast_format * write_format
struct ast_bridge * bridge
Bridge this channel is participating in.
struct ast_bridge_channel::@194 owed
struct timeval interdigit_timeout
char collected[MAXIMUM_DTMF_FEATURE_STRING]
struct ast_bridge_features * features
struct ast_channel * chan
struct ast_format * read_format
enum bridge_channel_state state
struct ast_vector_int to_channel
unsigned int inhibit_colp
enum bridge_channel_thread_state activity
The bridge channel thread activity.
struct ast_bridge_channel::@192 wr_queue
struct ast_bridge_channel::@193 deferred_queue
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.
enum ast_bridge_hook_type type
ast_bridge_hook_callback callback
ast_bridge_push_channel_fn push
ast_bridge_pull_channel_fn pull
void(* unsuspend)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Unsuspend a channel on a bridging technology instance for a bridge.
int(* stream_topology_request_change)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Callback for when a request has been made to change a stream topology on a channel.
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.
void(* suspend)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Suspend a channel on a bridging technology instance for a bridge.
void(* leave)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
Remove a channel from a bridging technology instance for a bridge.
Structure that contains information about a bridge.
struct ast_vector_int media_types
const struct ast_bridge_methods * v_table
unsigned int reconfigured
const ast_string_field uniqueid
struct ast_bridge_channels_list channels
unsigned int num_channels
struct ast_bridge_technology * technology
struct ast_flags feature_flags
Main Channel structure associated with a channel.
struct ast_bridge_channel * bridge_channel
struct ast_bridge * bridge
enum ast_channel_state state
enum ast_frame_read_action action
enum ast_control_t38 request_response
Configuration for the builtin features.
const ast_string_field automixmon
const ast_string_field blindxfer
const ast_string_field parkcall
const ast_string_field disconnect
const ast_string_field atxfer
General features configuration items.
unsigned int featuredigittimeout
Feature configuration relating to transfers.
const ast_string_field atxferthreeway
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
enum ast_frame_type frametype
Abstract JSON element (object, array, string, int, ...).
Structure used to transport a message through the frame core.
Connected Line/Party information.
struct ast_party_id priv
Private connected party ID.
Data specifying where a blind transfer is going to.
char exten[AST_MAX_EXTENSION]
char context[AST_MAX_CONTEXT]
ast_bridge_custom_callback_fn callback
ast_bridge_custom_play_fn custom_play
Synchronous bridge action object.
struct bridge_sync::@314 list
Frame payload for synchronous bridge actions.
List holding active synchronous action objects.
#define ast_test_suite_event_notify(s, f,...)
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 ...
struct timeval ast_tvadd(struct timeval a, struct timeval b)
Returns the sum of two timevals a + b.
int64_t ast_tvdiff_ms(struct timeval end, struct timeval start)
Computes the difference (in milliseconds) between two struct timeval instances.
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_set2_flag(p, value, flag)
#define ast_clear_flag(p, flag)
#define AST_VECTOR_SIZE(vec)
Get the number of elements in a vector.
#define AST_VECTOR_FREE(vec)
Deallocates this vector.
#define AST_VECTOR_GET(vec, idx)
Get an element from a vector.