212 if ((res =
rule->check_rule(control))) {
277 command_fn = command_fn ? :
noop_cb;
290 if (can_exec_fn && (
retval = can_exec_fn(control))) {
402 if (!(continue_data =
ast_calloc(1,
sizeof(*continue_data)))) {
437 while ((token = strtok_r(move_data->
app_args,
",", &move_data->
app_args))) {
465 size =
sizeof(*move_data) + strlen(
app_name) + 1;
475 move_data->
app_name = (
char *)move_data +
sizeof(*move_data);
493 char *endpoint = data;
513 if (!endpoint_data) {
533 usleep(dtmf_data->
before * 1000);
538 if (dtmf_data->
after) {
539 usleep(dtmf_data->
after * 1000);
551 if (dtmf_data->
after) {
578 if (!(dtmf_data =
ast_calloc(1,
sizeof(*dtmf_data) + strlen(
dtmf) + 1))) {
644 if (!(mute_data =
ast_calloc(1,
sizeof(*mute_data)))) {
672 if (!(mute_data =
ast_calloc(1,
sizeof(*mute_data)))) {
778 char *moh_class = data;
828 ast_debug(3,
"%s: Starting silence generator\n",
834 "%s: Failed to start silence generator.\n",
849 ast_debug(3,
"%s: Stopping silence generator\n",
1059 control->
bridge = bridge;
1103 if (bridge_channel != data) {
1104 ast_debug(3,
"%s: Channel is no longer in departable state\n",
1109 ast_debug(3,
"%s: Channel departing bridge\n",
1202 .
type =
"ARI dial timeout",
1266 struct timeval *hangup_time;
1275 hangup_time = datastore->
data;
1279 if (!bridge_channel) {
1299 if (!control || !bridge) {
1303 ast_debug(3,
"%s: Adding to bridge %s\n",
1337 if (!control->
pbx) {
1354 control->
bridge = bridge;
1395 ast_debug(3,
"%s: Sending channel add_to_bridge command\n",
1414 ast_debug(3,
"%s: Departing bridge %s\n",
1432 ast_debug(3,
"%s: Sending channel remove_from_bridge command\n",
1555 if (!command_queue) {
1574 return control->
app;
1615 struct timeval *hangup_time;
1617 hangup_time =
ast_malloc(
sizeof(
struct timeval));
1624 datastore->
data = hangup_time;
Asterisk main include file. File version handling, generic pbx functions.
#define ast_strdup(str)
A wrapper for strdup()
void ast_free_ptr(void *ptr)
free() wrapper
#define ast_calloc(num, len)
A wrapper for calloc()
#define ast_malloc(len)
A wrapper for malloc()
#define ao2_iterator_next(iter)
@ AO2_ALLOC_OPT_LOCK_MUTEX
int ao2_container_count(struct ao2_container *c)
Returns the number of elements in a container.
#define ao2_link_flags(container, obj, flags)
Add an object to a container.
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.
void __ao2_cleanup(void *obj)
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_NOLOCK
Assume that the ao2_container is already locked.
#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)
int ast_bridge_depart(struct ast_channel *chan)
Depart a channel from a bridge.
int ast_bridge_destroy(struct ast_bridge *bridge, int cause)
Destroy a bridge.
int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags) attribute_warn_unused_result
Impart a channel to a bridge (non-blocking)
@ AST_BRIDGE_IMPART_CHAN_DEPARTABLE
@ AST_BRIDGE_IMPART_INHIBIT_JOIN_COLP
After Bridge Execution API.
ast_bridge_after_cb_reason
@ AST_BRIDGE_AFTER_CB_REASON_IMPART_FAILED
@ AST_BRIDGE_AFTER_CB_REASON_DEPART
int ast_bridge_setup_after_goto(struct ast_channel *chan)
Setup any after bridge goto location to begin execution.
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.
Basic bridge subclass API.
int ast_bridge_interval_hook(struct ast_bridge_features *features, enum ast_bridge_hook_timer_option flags, unsigned int interval, ast_bridge_hook_callback callback, void *hook_pvt, ast_bridge_hook_pvt_destructor destructor, enum ast_bridge_hook_remove_flags remove_flags)
Attach an interval hook to a bridge features structure.
struct ast_bridge_features * ast_bridge_features_new(void)
Allocate a new bridge features struct.
void ast_bridge_features_destroy(struct ast_bridge_features *features)
Destroy an allocated bridge features struct.
int ast_channel_add_bridge_role(struct ast_channel *chan, const char *role_name)
Adds a bridge role to a channel.
void ast_channel_clear_bridge_roles(struct ast_channel *chan)
Removes all bridge roles currently on a channel.
const char * ast_channel_name(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.
int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore *datastore)
Remove a datastore from a channel.
struct stasis_topic * ast_channel_topic(struct ast_channel *chan)
A topic which publishes the events for a particular channel.
#define ast_channel_lock(chan)
struct ast_silence_generator * ast_channel_start_silence_generator(struct ast_channel *chan)
Starts a silence generator on the given channel.
int ast_queue_control(struct ast_channel *chan, enum ast_control_frame_type control)
Queue a control frame without payload.
void ast_channel_stop_silence_generator(struct ast_channel *chan, struct ast_silence_generator *state)
Stops a previously-started silence generator on the given channel.
#define ast_channel_ref(c)
Increase channel reference count.
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_uniqueid(const struct ast_channel *chan)
int ast_channel_suppress(struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype)
Suppress passing of a frame type on a channel.
struct ast_bridge_channel * ast_channel_internal_bridge_channel(const struct ast_channel *chan)
int ast_check_hangup(struct ast_channel *chan)
Check to see if a channel is needing hang up.
int ast_channel_hangupcause(const struct ast_channel *chan)
int ast_channel_is_bridged(const struct ast_channel *chan)
Determine if a channel is in a bridge.
int ast_softhangup(struct ast_channel *chan, int cause)
Softly hangup up a channel.
@ AST_SOFTHANGUP_ASYNCGOTO
@ AST_SOFTHANGUP_EXPLICIT
struct ast_bridge_channel * ast_channel_get_bridge_channel(struct ast_channel *chan)
Get a reference to the channel's bridge pointer.
int ast_transfer(struct ast_channel *chan, char *dest)
Transfer a channel (if supported).
int ast_channel_unsuppress(struct ast_channel *chan, unsigned int direction, enum ast_frame_type frametype)
Stop suppressing of a frame type on a channel.
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)
#define ast_channel_cleanup(c)
Cleanup a channel reference.
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
int ast_safe_sleep(struct ast_channel *chan, int ms)
Wait for a specified amount of time, looking for hangups.
#define ast_channel_unlock(chan)
#define AST_MAX_EXTENSION
void ast_channel_pbx_set(struct ast_channel *chan, struct ast_pbx *value)
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_channel_state
ast_channel states
struct ao2_container * command_prestart_get_container(struct ast_channel *chan)
Get the Stasis() prestart commands for a channel.
struct stasis_app_command * command_create(stasis_app_command_cb callback, void *data, command_data_destructor_fn data_destructor)
void command_invoke(struct stasis_app_command *command, struct stasis_app_control *control, struct ast_channel *chan)
void command_complete(struct stasis_app_command *command, int retval)
int command_join(struct stasis_app_command *command)
Internal API for the Stasis application commands.
void stasis_app_control_mute_in_bridge(struct stasis_app_control *control, int mute)
Set whether audio from the channel is muted instead of passing through to the bridge.
static void app_control_unregister_rule(struct stasis_app_control *control, struct app_control_rules *list, struct stasis_app_control_rule *obj)
void stasis_app_control_register_remove_rule(struct stasis_app_control *control, struct stasis_app_control_rule *rule)
Registers a remove channel from bridge rule.
static void set_interval_hook(struct ast_channel *chan)
Set a dial timeout interval hook on the channel.
static int app_control_ring(struct stasis_app_control *control, struct ast_channel *chan, void *data)
struct stasis_app_control * control_create(struct ast_channel *channel, struct stasis_app *app)
Create a control object.
static void dtmf_no_bridge(struct ast_channel *chan, struct stasis_app_control_dtmf_data *dtmf_data)
void stasis_app_control_moh_start(struct stasis_app_control *control, const char *moh_class)
Play music on hold to a channel (does not affect hold status)
const char * stasis_app_control_get_channel_id(const struct stasis_app_control *control)
Returns the uniqueid of the channel associated with this control.
static int app_control_continue(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static int set_timeout(struct ast_channel *chan, unsigned int timeout)
Set dial timeout on a channel to be dialed.
static int add_to_dial_bridge(struct stasis_app_control *control, struct ast_channel *chan)
Add a channel to the singleton dial bridge.
int stasis_app_control_queue_control(struct stasis_app_control *control, enum ast_control_frame_type frame_type)
Queue a control frame without payload.
static int app_control_set_channel_var(struct stasis_app_control *control, struct ast_channel *chan, void *data)
int control_prestart_dispatch_all(struct stasis_app_control *control, struct ast_channel *chan)
Dispatch all queued prestart commands.
static int app_control_clear_roles(struct stasis_app_control *control, struct ast_channel *chan, void *data)
void stasis_app_control_unregister_remove_rule(struct stasis_app_control *control, struct stasis_app_control_rule *rule)
Unregisters a remove channel from bridge rule.
int control_swap_channel_in_bridge(struct stasis_app_control *control, struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap)
Command for swapping a channel in a bridge.
int stasis_app_control_unmute(struct stasis_app_control *control, unsigned int direction, enum ast_frame_type frametype)
Unmute the channel associated with this control.
void stasis_app_control_unhold(struct stasis_app_control *control)
Remove the channel associated with the control from hold.
static struct stasis_app_command * exec_command_on_condition(struct stasis_app_control *control, stasis_app_command_cb command_fn, void *data, command_data_destructor_fn data_destructor, app_command_can_exec_cb can_exec_fn)
int stasis_app_control_add_channel_to_bridge(struct stasis_app_control *control, struct ast_bridge *bridge)
Add a channel to the bridge.
void control_wait(struct stasis_app_control *control)
Blocks until control's command queue has a command available.
char ** control_next_app_args(struct stasis_app_control *control)
Returns the list of arguments to pass to the application we are moving to.
static void bridge_after_cb(struct ast_channel *chan, void *data)
int stasis_app_send_command(struct stasis_app_control *control, stasis_app_command_cb command_fn, void *data, command_data_destructor_fn data_destructor)
Invokes a command on a control's channel.
void stasis_app_control_silence_start(struct stasis_app_control *control)
Start playing silence to a channel.
void stasis_app_control_silence_stop(struct stasis_app_control *control)
Stop playing silence to a channel.
int control_add_channel_to_bridge(struct stasis_app_control *control, struct ast_channel *chan, void *data)
Command callback for adding a channel to a bridge.
static void dial_bridge_after_cb(struct ast_channel *chan, void *data)
after bridge callback for the dial bridge
void stasis_app_control_clear_roles(struct stasis_app_control *control)
Clear bridge roles currently applied to a channel controlled by a stasis app control.
int stasis_app_control_continue(struct stasis_app_control *control, const char *context, const char *extension, int priority)
Exit res_stasis and continue execution in the dialplan.
static int app_control_ring_stop(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static int app_control_hold(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static enum stasis_app_control_channel_result app_control_check_rules(const struct stasis_app_control *control, struct app_control_rules *list)
static int app_control_unhold(struct stasis_app_control *control, struct ast_channel *chan, void *data)
int control_is_done(struct stasis_app_control *control)
Returns true if control_continue() has been called on this control.
static void free_chanvar(void *data)
void stasis_app_control_publish(struct stasis_app_control *control, struct stasis_message *message)
Publish a message to the control's channel's topic.
int stasis_app_control_redirect(struct stasis_app_control *control, const char *endpoint)
Redirect a channel in res_stasis to a particular endpoint.
static int app_control_remove_channel_from_bridge(struct stasis_app_control *control, struct ast_channel *chan, void *data)
void stasis_app_control_moh_stop(struct stasis_app_control *control)
Stop playing music on hold to a channel (does not affect hold status)
static struct control_dial_args * control_dial_args_alloc(const char *dialstring, unsigned int timeout)
int stasis_app_control_move(struct stasis_app_control *control, const char *app_name, const char *app_args)
Exit res_stasis and move to another Stasis application.
int stasis_app_control_mute(struct stasis_app_control *control, unsigned int direction, enum ast_frame_type frametype)
Mute the channel associated with this control.
static struct ast_bridge * dial_bridge
Singleton dial bridge.
void stasis_app_control_absorb_dtmf_in_bridge(struct stasis_app_control *control, int absorb)
Set whether DTMF from the channel is absorbed instead of passing through to the bridge.
struct ast_datastore_info timeout_datastore
Dial timeout datastore.
static int app_control_moh_stop(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static void bridge_after_cb_failed(enum ast_bridge_after_cb_reason reason, void *data)
int(* app_command_can_exec_cb)(struct stasis_app_control *control)
static int noop_cb(struct stasis_app_control *control, struct ast_channel *chan, void *data)
int stasis_app_control_dtmf(struct stasis_app_control *control, const char *dtmf, int before, int between, unsigned int duration, int after)
Send DTMF to the channel associated with this control.
static int shutting_down
Indicates if the Stasis app internals are being shut down.
void control_flush_queue(struct stasis_app_control *control)
Flush the control command queue.
int stasis_app_control_add_role(struct stasis_app_control *control, const char *role)
Apply a bridge role to a channel controlled by a stasis app control.
static int app_control_add_role(struct stasis_app_control *control, struct ast_channel *chan, void *data)
void stasis_app_control_inhibit_colp_in_bridge(struct stasis_app_control *control, int inhibit_colp)
Set whether COLP frames should be generated when joining the bridge.
static int app_send_command_on_condition(struct stasis_app_control *control, stasis_app_command_cb command_fn, void *data, command_data_destructor_fn data_destructor, app_command_can_exec_cb can_exec_fn)
int stasis_app_control_remove_channel_from_bridge(struct stasis_app_control *control, struct ast_bridge *bridge)
Remove a channel from the bridge.
struct ast_bridge * stasis_app_get_bridge(struct stasis_app_control *control)
Gets the bridge currently associated with a control object.
int stasis_app_send_command_async(struct stasis_app_control *control, stasis_app_command_cb command_fn, void *data, command_data_destructor_fn data_destructor)
Asynchronous version of stasis_app_send_command().
int stasis_app_control_bridge_features_init(struct stasis_app_control *control)
Initialize bridge features into a channel control.
static int app_control_move(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static int hangup_channel(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static int depart_channel(struct stasis_app_control *control, struct ast_channel *chan)
Depart a channel from a bridge, and potentially add it back to the dial bridge.
void stasis_app_control_hold(struct stasis_app_control *control)
Place the channel associated with the control on hold.
int control_dispatch_all(struct stasis_app_control *control, struct ast_channel *chan)
Dispatch all commands enqueued to this control.
int control_next_app_args_size(struct stasis_app_control *control)
Returns the number of arguments to be passed to the application we are moving to.
void stasis_app_control_unregister_add_rule(struct stasis_app_control *control, struct stasis_app_control_rule *rule)
UnRegister an add channel to bridge rule.
void control_set_app(struct stasis_app_control *control, struct stasis_app *app)
Set the application the control object belongs to.
static void dtmf_in_bridge(struct ast_channel *chan, struct stasis_app_control_dtmf_data *dtmf_data)
static int app_control_unmute(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static void app_control_register_rule(struct stasis_app_control *control, struct app_control_rules *list, struct stasis_app_control_rule *obj)
int stasis_app_control_ring_stop(struct stasis_app_control *control)
Stop locally generated ringing on the channel associated with this control.
static int app_control_redirect(struct stasis_app_control *control, struct ast_channel *chan, void *data)
int stasis_app_control_dial(struct stasis_app_control *control, const char *dialstring, unsigned int timeout)
Dial a channel.
static int bridge_timeout(struct ast_bridge_channel *bridge_channel, void *ignore)
Dial timeout.
struct ast_channel_snapshot * stasis_app_control_get_snapshot(const struct stasis_app_control *control)
Returns the most recent snapshot for the associated channel.
int control_command_count(struct stasis_app_control *control)
Returns the count of items in a control's command queue.
static int app_control_can_remove_channel_from_bridge(struct stasis_app_control *control)
static void control_dial_args_destroy(void *data)
void stasis_app_control_register_add_rule(struct stasis_app_control *control, struct stasis_app_control_rule *rule)
Registers an add channel to bridge rule.
void control_silence_stop_now(struct stasis_app_control *control)
Stop playing silence to a channel right now.
static int app_control_silence_start(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static int app_control_can_add_channel_to_bridge(struct stasis_app_control *control)
static struct stasis_app_command * exec_command(struct stasis_app_control *control, stasis_app_command_cb command_fn, void *data, command_data_destructor_fn data_destructor)
static int app_control_dial(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static int app_control_moh_start(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static ast_mutex_t dial_bridge_lock
static int bridge_channel_depart(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static struct ast_bridge * get_dial_bridge(void)
Retrieve a reference to the dial bridge.
char * control_next_app(struct stasis_app_control *control)
Returns the name of the application we are moving to.
static void internal_bridge_after_cb(struct ast_channel *chan, void *data, enum ast_bridge_after_cb_reason reason)
static int app_control_dtmf(struct stasis_app_control *control, struct ast_channel *chan, void *data)
struct stasis_app * control_app(struct stasis_app_control *control)
Returns the pointer (non-reffed) to the app associated with this control.
int stasis_app_control_set_channel_var(struct stasis_app_control *control, const char *variable, const char *value)
Set a variable on the channel associated with this control to value.
static int app_control_silence_stop(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static int app_control_mute(struct stasis_app_control *control, struct ast_channel *chan, void *data)
static void dial_bridge_after_cb_failed(enum ast_bridge_after_cb_reason reason, void *data)
int stasis_app_control_ring(struct stasis_app_control *control)
Indicate ringing to the channel associated with this control.
void control_move_cleanup(struct stasis_app_control *control)
Free any memory that was allocated for switching applications via /channels/{channelId}/move.
void stasis_app_control_shutdown(void)
Let Stasis app internals shut down.
static void control_dtor(void *obj)
void control_mark_done(struct stasis_app_control *control)
Internal API for the Stasis application controller.
#define ast_datastore_alloc(info, uid)
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
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_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...
Application convenience functions, designed to give consistent look and feel to Asterisk apps.
void ast_dtmf_stream_external(struct ast_channel *chan, const char *digits, int between, unsigned int duration)
Send a string of DTMF digits to a channel from an external thread.
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.
Asterisk internal frame definitions.
ast_frame_type
Frame types.
ast_control_frame_type
Internal control frame subtype field values.
struct ast_frame ast_null_frame
#define ast_debug(level,...)
Log a DEBUG message.
#define AST_RWLIST_REMOVE_CURRENT
#define AST_RWLIST_TRAVERSE_SAFE_BEGIN
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_HEAD_DESTROY(head)
Destroys a list head structure.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_RWLIST_TRAVERSE_SAFE_END
#define AST_LIST_HEAD_INIT(head)
Initializes a list head structure.
#define AST_LIST_HEAD(name, type)
Defines a structure to be used to hold a list of specified type.
#define ast_cond_destroy(cond)
#define ast_cond_wait(cond, mutex)
#define ast_cond_init(cond, attr)
#define ast_mutex_unlock(a)
pthread_cond_t ast_cond_t
#define ast_mutex_lock(a)
#define AST_MUTEX_DEFINE_STATIC(mutex)
#define ast_cond_signal(cond)
int ast_moh_start(struct ast_channel *chan, const char *mclass, const char *interpclass)
Turn on music on hold on a given channel.
void ast_moh_stop(struct ast_channel *chan)
Turn off music on hold on a given channel.
def ignore(key=None, val=None, section=None, pjsip=None, nmapped=None, type='endpoint')
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_explicit_goto(struct ast_channel *chan, const char *context, const char *exten, int priority)
const char * app_name(struct ast_app *app)
int app_subscribe_bridge(struct stasis_app *app, struct ast_bridge *bridge)
Add a bridge subscription to an existing channel subscription.
int app_unsubscribe_bridge(struct stasis_app *app, struct ast_bridge *bridge)
Cancel the bridge subscription for an application.
Internal API for the Stasis application controller.
void stasis_publish(struct stasis_topic *topic, struct stasis_message *message)
Publish a message to a topic's subscribers.
Stasis Application API. See Stasis Application API for detailed documentation.
struct ast_bridge * stasis_app_bridge_create_invisible(const char *type, const char *name, const char *id)
Create an invisible bridge of the specified type.
stasis_app_control_channel_result
Result codes used when adding/removing channels to/from bridges.
int stasis_app_channel_is_stasis_end_published(struct ast_channel *chan)
Has this channel had a StasisEnd published on it?
struct stasis_app_control * stasis_app_control_find_by_channel(const struct ast_channel *chan)
Returns the handler for the given channel.
void(* command_data_destructor_fn)(void *data)
Typedef for data destructor for stasis app commands.
int(* stasis_app_command_cb)(struct stasis_app_control *control, struct ast_channel *chan, void *data)
#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_channel * swap
struct ast_bridge * bridge
Bridge this channel is participating in.
struct ast_bridge_features * features
struct ast_channel * chan
Structure that contains features information.
unsigned int dtmf_passthrough
unsigned int inhibit_colp
Structure that contains information about a bridge.
const ast_string_field uniqueid
Structure representing a snapshot of channel state.
Main Channel structure associated with a channel.
Structure for a data store type.
Structure for a data store object.
structure for queuing ARI channel variable setting
structure to hold extensions
command_data_destructor_fn data_destructor
char extension[AST_MAX_EXTENSION]
char context[AST_MAX_CONTEXT]
enum ast_frame_type frametype
Rule to check to see if an operation is allowed.
struct stasis_app_control_rule * next
struct ast_bridge_features * bridge_features
struct ast_channel * channel
struct ast_bridge * bridge
struct ao2_container * command_queue
struct stasis_app_control::@489 next_app_args
struct app_control_rules remove_rules
struct ast_silence_generator * silgen
struct app_control_rules add_rules
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().
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
#define AST_VECTOR_RESET(vec, cleanup)
Reset vector.
#define AST_VECTOR_SIZE(vec)
Get the number of elements in a vector.
#define AST_VECTOR_STEAL_ELEMENTS(vec)
Steal the elements from a vector and reinitialize.
#define AST_VECTOR_INIT(vec, size)
Initialize a vector.
#define AST_VECTOR_APPEND(vec, elem)
Append an element to a vector, growing the vector if needed.
#define AST_VECTOR(name, type)
Define a vector structure.