19 #ifndef _STASIS_BRIDGING_H
20 #define _STASIS_BRIDGING_H
22 #if defined(__cplusplus) || defined(c_plusplus)
294 enum ast_attended_transfer_dest_type {
296 AST_ATTENDED_TRANSFER_DEST_FAIL,
298 AST_ATTENDED_TRANSFER_DEST_BRIDGE_MERGE,
300 AST_ATTENDED_TRANSFER_DEST_APP,
302 AST_ATTENDED_TRANSFER_DEST_LOCAL_APP,
304 AST_ATTENDED_TRANSFER_DEST_LINK,
306 AST_ATTENDED_TRANSFER_DEST_THREEWAY,
459 const char *bridge_id);
480 int bridge_topics_init(
struct ast_bridge *bridge);
489 void bridge_topics_destroy(
struct ast_bridge *bridge);
497 int ast_stasis_bridging_init(
void);
499 #if defined(__cplusplus) || defined(c_plusplus)
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.
Main Channel structure associated with a channel.
Asterisk locking-related definitions:
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.
Message representing attended transfer.
struct ast_channel_snapshot * channel
char exten[AST_MAX_EXTENSION]
Message published during a blind transfer.
struct ast_bridge_snapshot * ast_bridge_get_snapshot_by_uniqueid(const char *uniqueid)
Returns the current snapshot for the bridge.
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_bridge_publish_attended_transfer(struct ast_attended_transfer_message *transfer_msg)
Publish an attended transfer.
Structure that contains a snapshot of information about a bridge.
void ast_bridge_publish_blind_transfer(struct ast_blind_transfer_message *transfer_message)
Publish a blind transfer event.
Structure representing a snapshot of channel state.
struct stasis_message * ast_bridge_blob_create_from_snapshots(struct stasis_message_type *message_type, struct ast_bridge_snapshot *bridge_snapshot, struct ast_channel_snapshot *chan_snapshot, struct ast_json *blob)
Creates a ast_bridge_blob message from snapshots.
struct ast_channel_snapshot * target
struct stasis_topic * ast_bridge_topic_all(void)
A topic which publishes the events for all bridges.
char bridge[AST_UUID_STR_LEN]
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.
struct ast_bridge_channel_snapshot_pair to_transferee
Structure containing callbacks for Stasis message sanitization.
struct stasis_message_type * type
struct ast_bridge_channel_snapshot_pair to_transfer_target
struct ast_bridge_snapshot * 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.
enum ast_transfer_result result
General Asterisk PBX channel definitions.
void ast_bridge_publish_merge(struct ast_bridge *to, struct ast_bridge *from)
Publish a bridge merge.
struct ast_channel_snapshot * links[2]
struct ast_channel_snapshot * transferee
#define AST_MAX_EXTENSION
struct ast_channel_snapshot * replace_channel
A set of macros to manage forward-linked lists.
struct ast_bridge_snapshot * bridge
Blob of data associated with a bridge.
Core PBX routines and definitions.
enum ast_attended_transfer_dest_type dest_type
struct ast_bridge_snapshot * ast_bridge_get_snapshot(struct ast_bridge *bridge)
Returns the current snapshot for the bridge.
Structure that contains information about a bridge.
struct ast_channel_snapshot * transferer
char context[AST_MAX_CONTEXT]
struct ast_bridge_channel_snapshot_pair threeway
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...
int ast_attended_transfer_message_add_threeway(struct ast_attended_transfer_message *transfer_msg, struct ast_channel *survivor_channel, struct ast_bridge *survivor_bridge)
Add details for an attended transfer that was resolved as a three-way call.
struct ast_bridge_snapshot * from
struct stasis_topic * ast_bridge_topic(struct ast_bridge *bridge)
A topic which publishes the events for a particular bridge.
Message representing the merge of two bridges.
Abstract JSON element (object, array, string, int, ...).
struct ast_json * ast_bridge_snapshot_to_json(const struct ast_bridge_snapshot *snapshot, const struct stasis_message_sanitizer *sanitize)
Build a JSON object from a ast_bridge_snapshot.
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 ast_channel_snapshot * transferee
struct stasis_message * ast_bridge_blob_create(struct stasis_message_type *message_type, struct ast_bridge *bridge, struct ast_channel *chan, struct ast_json *blob)
Creates a ast_bridge_blob message.
enum ast_transfer_result result
struct ast_channel_snapshot * replace_channel
struct ast_bridge_snapshot * to
void ast_bridge_publish_state(struct ast_bridge *bridge)
Publish the state of a bridge.
Pair showing a bridge snapshot and a specific channel snapshot belonging to the bridge.