Asterisk - The Open Source Telephony Project
21.4.1
|
The Asterisk Management Interface - AMI (bridge event handling) More...
#include "asterisk.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/manager.h"
#include "asterisk/stasis_message_router.h"
Go to the source code of this file.
Data Structures | |
struct | bridge_list_data |
Typedefs | |
typedef struct ast_manager_event_blob *(* | bridge_snapshot_monitor) (struct ast_bridge_snapshot *old_snapshot, struct ast_bridge_snapshot *new_snapshot) |
Typedef for callbacks that get called on channel snapshot updates. | |
Functions | |
struct ast_str * | ast_manager_build_bridge_state_string (const struct ast_bridge_snapshot *snapshot) |
Generate the AMI message body from a bridge snapshot. More... | |
struct ast_str * | ast_manager_build_bridge_state_string_prefix (const struct ast_bridge_snapshot *snapshot, const char *prefix) |
Generate the AMI message body from a bridge snapshot. More... | |
static struct ast_manager_event_blob * | bridge_create (struct ast_bridge_snapshot *old_snapshot, struct ast_bridge_snapshot *new_snapshot) |
Handle bridge creation. | |
static struct ast_manager_event_blob * | bridge_destroy (struct ast_bridge_snapshot *old_snapshot, struct ast_bridge_snapshot *new_snapshot) |
Handle bridge destruction. | |
static void | bridge_merge_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | bridge_snapshot_update (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static struct ast_manager_event_blob * | bridge_video_update (struct ast_bridge_snapshot *old_snapshot, struct ast_bridge_snapshot *new_snapshot) |
Handle video source updates. | |
static void | channel_enter_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | channel_leave_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | manager_bridge_destroy (struct mansession *s, const struct message *m) |
static int | manager_bridge_info (struct mansession *s, const struct message *m) |
static int | manager_bridge_kick (struct mansession *s, const struct message *m) |
static int | manager_bridges_list (struct mansession *s, const struct message *m) |
static void | manager_bridging_cleanup (void) |
int | manager_bridging_init (void) |
Initialize support for AMI channel events. More... | |
static int | send_bridge_info_item_cb (void *obj, void *arg, void *data, int flags) |
static int | send_bridge_list_item_cb (void *obj, void *arg, void *data, int flags) |
Variables | |
bridge_snapshot_monitor | bridge_monitors [] |
static struct stasis_message_router * | bridge_state_router |
Message router for cached bridge state snapshot updates. | |
static struct stasis_forward * | topic_forwarder |
The Stasis Message Bus API subscription returned by the forwarding of the channel topic to the manager topic. | |
The Asterisk Management Interface - AMI (bridge event handling)
Definition in file manager_bridges.c.
struct ast_str* ast_manager_build_bridge_state_string | ( | const struct ast_bridge_snapshot * | snapshot | ) |
Generate the AMI message body from a bridge snapshot.
snapshot | the bridge snapshot for which to generate an AMI message body |
NULL | on error |
Definition at line 267 of file manager_bridges.c.
References ast_manager_build_bridge_state_string_prefix().
struct ast_str* ast_manager_build_bridge_state_string_prefix | ( | const struct ast_bridge_snapshot * | snapshot, |
const char * | prefix | ||
) |
Generate the AMI message body from a bridge snapshot.
snapshot | the bridge snapshot for which to generate an AMI message body |
prefix | What to prepend to the bridge fields |
NULL | on error |
Definition at line 223 of file manager_bridges.c.
References AST_BRIDGE_VIDEO_MODE_NONE, ast_bridge_video_mode_to_string(), ast_str_append(), ast_str_create, ast_str_set(), ast_bridge_snapshot::creator, ast_bridge_snapshot::name, ast_bridge_snapshot::num_channels, ast_bridge_snapshot::subclass, ast_bridge_snapshot::technology, ast_bridge_snapshot::uniqueid, ast_bridge_snapshot::video_mode, and ast_bridge_snapshot::video_source_id.
Referenced by ast_manager_build_bridge_state_string().
int manager_bridging_init | ( | void | ) |
Initialize support for AMI channel events.
0 | on success. |
non-zero | on error. |
Definition at line 683 of file manager_bridges.c.
References ast_bridge_topic_all(), ast_manager_get_message_router(), ast_manager_get_topic(), ast_manager_register_xml_core, ast_register_cleanup(), manager_topic, stasis_forward_all(), and stasis_message_router_add().
bridge_snapshot_monitor bridge_monitors[] |
Definition at line 323 of file manager_bridges.c.