198 ast_debug(1,
"Bridge %s: pushing non-stasis %p(%s) setup to come back in under stasis\n",
205 "Failed to set after bridge callback for bridge %s non-stasis push of %s\n",
256 chan = bridge_channel->
chan;
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.
void ast_bridge_set_sfu_video_mode(struct ast_bridge *bridge)
Set the bridge to be a selective forwarding unit.
int app_set_replace_channel_app(struct ast_channel *chan, const char *replace_app)
Set the app that the replacement channel will be controlled by.
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
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 command_prestart_queue_command(struct ast_channel *chan, stasis_app_command_cb command_fn, void *data, command_data_destructor_fn data_destructor)
Queue a Stasis() prestart command for a channel.
Asterisk main include file. File version handling, generic pbx functions.
struct ast_bridge_features * features
ast_bridge_video_mode_type
Video source modes.
struct ast_bridge * bridge_register(struct ast_bridge *bridge)
Register the new bridge with the system.
int pbx_exec(struct ast_channel *c, struct ast_app *app, const char *data)
Execute an application.
Internal API for the Stasis application commands.
static void defer_bridge_add_dtor(void *obj)
#define ast_test_flag(p, flag)
struct ast_bridge * bridge
int ast_check_hangup_locked(struct ast_channel *chan)
void __ao2_cleanup(void *obj)
Structure representing a snapshot of channel state.
int app_set_replace_channel_snapshot(struct ast_channel *chan, struct ast_channel_snapshot *replace_snapshot)
Set the snapshot of the channel that this channel will replace.
#define ao2_alloc_options(data_size, destructor_fn, options)
int ast_channel_add_bridge_role(struct ast_channel *chan, const char *role_name)
Adds a bridge role to a channel.
static struct ast_bridge_methods bridge_stasis_v_table
struct stasis_app * control_app(struct stasis_app_control *control)
Returns the pointer (non-reffed) to the app associated with this control.
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.
static int bridge_stasis_push_peek(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
void stasis_app_channel_set_stasis_end_published(struct ast_channel *chan)
Indicate that this channel has had a StasisEnd published for it.
struct ast_bridge_methods ast_bridge_base_v_table
Bridge base class virtual method table.
int app_send_end_msg(struct stasis_app *app, struct ast_channel *chan)
Send StasisEnd message to the listening app.
int ast_channel_set_bridge_role_option(struct ast_channel *channel, const char *role_name, const char *option, const char *value)
Set a role option on a channel.
#define ast_debug(level,...)
Log a DEBUG message.
static int bridge_stasis_moving(struct ast_bridge_channel *bridge_channel, void *hook_pvt, struct ast_bridge *src, struct ast_bridge *dst)
void ast_bridge_channel_update_linkedids(struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
const char * stasis_app_name(const struct stasis_app *app)
Retrieve an application's name.
#define ast_channel_cleanup(c)
Cleanup a channel reference.
#define ao2_ref(o, delta)
static void bridge_stasis_run_cb(struct ast_channel *chan, void *data)
struct ast_bridge * bridge_alloc(size_t size, const struct ast_bridge_methods *v_table)
Internal API for the Stasis application controller.
Core PBX routines and definitions.
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...
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.
const char * ast_channel_uniqueid(const struct ast_channel *chan)
const struct ast_bridge_methods * v_table
int ast_channel_has_role(struct ast_channel *channel, const char *role_name)
Check if a role exists on a channel.
Structure that contains information about a bridge.
static int bridge_stasis_push(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
Internal API for the Stasis bridge subclass.
static int defer_bridge_add(struct stasis_app_control *control, struct ast_channel *chan, void *obj)
const char * app_name(struct ast_app *app)
Bridge virtual methods table definition.
#define ast_channel_unlock(chan)
#define STASIS_BRIDGE_MIXING_CAPABILITIES
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...
struct ast_channel * swap
Channel to swap with in the bridge. (has ref)
void ast_bridge_set_single_src_video_mode(struct ast_bridge *bridge, struct ast_channel *video_src_chan)
Set a bridge to feed a single video source to all participants.
int stasis_app_channel_is_internal(struct ast_channel *chan)
Is this channel internal to Stasis?
void ast_channel_clear_bridge_roles(struct ast_channel *chan)
Removes all bridge roles currently on a channel.
void ast_bridge_channel_update_accountcodes(struct ast_bridge_channel *joining, struct ast_bridge_channel *leaving)
struct ast_channel * chan
Structure that contains information regarding a channel in a bridge.
After Bridge Execution API.
#define ast_channel_ref(c)
Increase channel reference count.
ast_bridge_push_channel_fn push_peek
struct ast_channel_snapshot * ast_channel_snapshot_get_latest(const char *uniqueid)
Obtain the latest ast_channel_snapshot from the Stasis Message Bus API cache. This is an ao2 object...
Internal API for the Stasis application controller.
ast_app: A registered application
const char * ast_channel_name(const struct ast_channel *chan)
static void bridge_stasis_pull(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel)
ast_bridge_pull_channel_fn pull
ast_bridge_push_channel_fn push
void bridge_stasis_init(void)
Stasis Application API. See Stasis Application API for detailed documentation.
struct ast_app * pbx_findapp(const char *app)
Look up an application.
static void bridge_stasis_queue_join_action(struct ast_bridge *self, struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *swap)
char * app_get_replace_channel_app(struct ast_channel *chan)
Get the app that the replacement channel will be controlled by.
struct ast_bridge * bridge_stasis_new(uint32_t capabilities, unsigned int flags, const char *name, const char *id, enum ast_bridge_video_mode_type video_mode)
struct stasis_app_control * stasis_app_control_find_by_channel(const struct ast_channel *chan)
Returns the handler for the given channel.