Asterisk - The Open Source Telephony Project
21.4.1
|
Confbridge manager events for stasis messages. More...
#include "asterisk.h"
#include "asterisk/channel.h"
#include "asterisk/bridge.h"
#include "asterisk/stasis.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/stasis_bridges.h"
#include "asterisk/manager.h"
#include "asterisk/stasis_message_router.h"
#include "include/confbridge.h"
#include "asterisk/message.h"
#include "asterisk/stream.h"
Go to the source code of this file.
Functions | |
static struct ast_json * | bridge_to_json (struct ast_bridge_snapshot *bridge_snapshot) |
static struct ast_json * | channel_to_json (struct ast_channel_snapshot *channel_snapshot, struct ast_json *conf_blob, struct ast_json *labels_blob) |
void | conf_send_event_to_participants (struct confbridge_conference *conference, struct ast_channel *chan, struct stasis_message *msg) |
Send events to bridge participants. More... | |
static void | confbridge_atxfer_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_end_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
const char * | confbridge_event_type_to_string (struct stasis_message_type *event_type) |
Get the string representation of a confbridge stasis message type. More... | |
static void | confbridge_join_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_leave_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_mute_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_publish_manager_event (struct stasis_message *message, struct ast_str *extra_text) |
static void | confbridge_start_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_start_record_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_stop_record_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_talking_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static void | confbridge_unmute_cb (void *data, struct stasis_subscription *sub, struct stasis_message *message) |
static int | get_admin_header (struct ast_str **extra_text, struct stasis_message *message) |
static int | get_bool_header (struct ast_str **extra_text, struct stasis_message *message, const char *json_key, const char *ami_header) |
static int | get_muted_header (struct ast_str **extra_text, struct stasis_message *message) |
int | manager_confbridge_init (void) |
register stasis message routers to handle manager events for confbridge messages More... | |
void | manager_confbridge_shutdown (void) |
unregister stasis message routers to handle manager events for confbridge messages More... | |
static struct ast_json * | pack_bridge_and_channels (struct ast_json *json_bridge, struct ast_json *json_channels, struct stasis_message *msg) |
static struct ast_json * | pack_snapshots (struct ast_bridge_snapshot *bridge_snapshot, struct ast_channel_snapshot *channel_snapshot, struct ast_json *conf_blob, struct ast_json *labels_blob, struct stasis_message *msg) |
static void | send_message (const char *msg_name, char *conf_name, struct ast_json *json_object, struct ast_channel *chan) |
STASIS_MESSAGE_TYPE_DEFN (confbridge_start_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_end_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_join_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_leave_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_start_record_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_stop_record_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_mute_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_unmute_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_talking_type) | |
STASIS_MESSAGE_TYPE_DEFN (confbridge_welcome_type) | |
Variables | |
static struct stasis_message_router * | bridge_state_router |
static struct stasis_message_router * | channel_state_router |
Confbridge manager events for stasis messages.
Definition in file confbridge_manager.c.
void conf_send_event_to_participants | ( | struct confbridge_conference * | conference, |
struct ast_channel * | chan, | ||
struct stasis_message * | msg | ||
) |
Send events to bridge participants.
conference | The conference bridge |
chan | The channel triggering the action |
msg | The stasis message describing the event |
Definition at line 414 of file confbridge_manager.c.
References confbridge_conference::active_list, ao2_ref, ast_channel_snapshot_get_latest(), ast_debug, ast_json_array_append(), ast_json_array_create(), ast_json_object_get(), ast_json_string_set(), ast_json_unref(), AST_LIST_TRAVERSE, ast_bridge_blob::blob, ast_bridge_blob::bridge, confbridge_user::chan, ast_bridge_blob::channel, conf_find_user_profile(), confbridge_event_type_to_string(), confbridge_user::list, confbridge_conference::name, stasis_message_data(), stasis_message_type(), and confbridge_user::u_profile.
const char* confbridge_event_type_to_string | ( | struct stasis_message_type * | event_type | ) |
Get the string representation of a confbridge stasis message type.
event_type | The confbridge event type such as 'confbridge_welcome_type()' |
The | string representation of the message type |
unknown | if not found |
Definition at line 249 of file confbridge_manager.c.
Referenced by conf_send_event_to_participants().
int manager_confbridge_init | ( | void | ) |
register stasis message routers to handle manager events for confbridge messages
0 | success |
non-zero | failure |
Definition at line 721 of file confbridge_manager.c.
References ast_bridge_topic_all(), ast_channel_topic_all(), manager_confbridge_shutdown(), stasis_message_router_add(), and STASIS_MESSAGE_TYPE_INIT.
Referenced by load_module().
void manager_confbridge_shutdown | ( | void | ) |
unregister stasis message routers to handle manager events for confbridge messages
Definition at line 698 of file confbridge_manager.c.
References stasis_message_router_unsubscribe(), and STASIS_MESSAGE_TYPE_CLEANUP.
Referenced by manager_confbridge_init(), and unload_module().