123 }
else if (!strcmp(
idle_mode,
"musiconhold")) {
125 }
else if (!strcmp(
idle_mode,
"ringing")) {
129 }
else if (!strcmp(
idle_mode,
"silence")) {
135 ast_debug(1,
"channel %s idle mode '%s' doesn't match any defined idle mode\n",
189 const char *moh_class;
220 moh_length = moh_class ? strlen(moh_class + 1) : 0;
231 if (!announcer_channel) {
261 if (announcer_channel) {
265 ast_log(
LOG_WARNING,
"Bridge %s: Channel %s tried to be an announcer. Bridge already has one.\n",
380 if (announcer_channel) {
393 .
name =
"holding_bridge",
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
#define ast_bridge_unlock(bridge)
Unlock the bridge.
@ AST_BRIDGE_CAPABILITY_HOLDING
int ast_bridge_queue_everyone_else(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
Queue the given frame to everyone else.
void ast_bridge_channel_lock_bridge(struct ast_bridge_channel *bridge_channel)
Lock the bridge associated with the bridge channel.
void ast_bridge_channel_restore_formats(struct ast_bridge_channel *bridge_channel)
Restore the formats of a bridge channel's channel to how they were before bridge_channel_internal_joi...
int ast_bridge_channel_queue_callback(struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_custom_callback_option flags, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size)
Queue a bridge action custom callback frame onto the bridge channel.
static int holding_bridge_join(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
static void participant_idle_mode_setup(struct ast_bridge_channel *bridge_channel)
@ HOLDING_ROLE_PARTICIPANT
static void participant_entertainment_stop(struct ast_bridge_channel *bridge_channel)
static void holding_bridge_suspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
static int defer_action(struct ast_bridge_channel *bridge_channel, deferred_cb callback)
static void holding_bridge_leave(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
static int holding_bridge_write(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
static void participant_entertainment_start(struct ast_bridge_channel *bridge_channel)
static struct ast_bridge_technology holding_bridge
static void participant_reaction_announcer_join(struct ast_bridge_channel *bridge_channel)
static void handle_participant_join(struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *announcer_channel)
static void participant_reaction_announcer_leave(struct ast_bridge_channel *bridge_channel)
void(* deferred_cb)(struct ast_bridge_channel *bridge_channel)
static void holding_bridge_unsuspend(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
static int load_module(void)
static int unload_module(void)
static void deferred_action(struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size)
const char * ast_bridge_channel_get_role_option(struct ast_bridge_channel *bridge_channel, const char *role_name, const char *option)
Retrieve the value of a requested role option from a bridge channel.
int ast_bridge_channel_has_role(struct ast_bridge_channel *bridge_channel, const char *role_name)
Check to see if a bridge channel inherited a specific role from its channel.
@ AST_BRIDGE_PREFERENCE_BASE_HOLDING
#define ast_bridge_technology_register(technology)
See __ast_bridge_technology_register()
int ast_bridge_technology_unregister(struct ast_bridge_technology *technology)
Unregister a bridge technology from use.
General Asterisk PBX channel definitions.
const char * ast_channel_name(const struct ast_channel *chan)
struct ast_silence_generator * ast_channel_start_silence_generator(struct ast_channel *chan)
Starts a silence generator on the given channel.
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.
int ast_set_read_format(struct ast_channel *chan, struct ast_format *format)
Sets read format on channel chan.
int ast_indicate_data(struct ast_channel *chan, int condition, const void *data, size_t datalen)
Indicates condition of channel, with payload.
int ast_set_write_format(struct ast_channel *chan, struct ast_format *format)
Sets write format on channel chan.
int ast_indicate(struct ast_channel *chan, int condition)
Indicates condition of channel.
Asterisk internal frame definitions.
#define ast_debug(level,...)
Log a DEBUG message.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
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.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Structure that contains information regarding a channel in a bridge.
void * tech_pvt
Private information unique to the bridge technology.
struct ast_bridge * bridge
Bridge this channel is participating in.
struct ast_channel * chan
Structure that is the essence of a bridge technology.
Structure that contains information about a bridge.
const ast_string_field uniqueid
struct ast_bridge_channels_list channels
struct ast_bridge_technology * technology
Main Channel structure associated with a channel.
struct ast_bridge_channel * bridge_channel
struct ast_bridge * bridge
Data structure associated with a single frame of data.
Structure which contains per-channel role information.
struct ast_silence_generator * silence_generator
unsigned int entertainment_active
enum idle_modes idle_mode