Asterisk - The Open Source Telephony Project GIT-master-a63eec2
|
Bridging technology for storing channels in a bridge for the purpose of holding, parking, queues, and other such states where a channel may need to be in a bridge but not actually communicating with anything. More...
#include "asterisk.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "asterisk/module.h"
#include "asterisk/channel.h"
#include "asterisk/bridge.h"
#include "asterisk/bridge_technology.h"
#include "asterisk/frame.h"
#include "asterisk/musiconhold.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | deferred_data |
struct | holding_channel |
Structure which contains per-channel role information. More... | |
Typedefs | |
typedef void(* | deferred_cb) (struct ast_bridge_channel *bridge_channel) |
Enumerations | |
enum | holding_roles { HOLDING_ROLE_PARTICIPANT , HOLDING_ROLE_ANNOUNCER } |
enum | idle_modes { IDLE_MODE_NONE , IDLE_MODE_MOH , IDLE_MODE_RINGING , IDLE_MODE_SILENCE , IDLE_MODE_HOLD } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | defer_action (struct ast_bridge_channel *bridge_channel, deferred_cb callback) |
static void | deferred_action (struct ast_bridge_channel *bridge_channel, const void *payload, size_t payload_size) |
static void | handle_participant_join (struct ast_bridge_channel *bridge_channel, struct ast_bridge_channel *announcer_channel) |
static int | holding_bridge_join (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel) |
static void | holding_bridge_leave (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel) |
static void | holding_bridge_suspend (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel) |
static void | holding_bridge_unsuspend (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 int | load_module (void) |
static void | participant_entertainment_start (struct ast_bridge_channel *bridge_channel) |
static void | participant_entertainment_stop (struct ast_bridge_channel *bridge_channel) |
static void | participant_idle_mode_setup (struct ast_bridge_channel *bridge_channel) |
static void | participant_reaction_announcer_join (struct ast_bridge_channel *bridge_channel) |
static void | participant_reaction_announcer_leave (struct ast_bridge_channel *bridge_channel) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Holding bridge module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_bridge_technology | holding_bridge |
Bridging technology for storing channels in a bridge for the purpose of holding, parking, queues, and other such states where a channel may need to be in a bridge but not actually communicating with anything.
Definition in file bridge_holding.c.
typedef void(* deferred_cb) (struct ast_bridge_channel *bridge_channel) |
Definition at line 73 of file bridge_holding.c.
enum holding_roles |
Enumerator | |
---|---|
HOLDING_ROLE_PARTICIPANT | |
HOLDING_ROLE_ANNOUNCER |
Definition at line 51 of file bridge_holding.c.
enum idle_modes |
Enumerator | |
---|---|
IDLE_MODE_NONE | |
IDLE_MODE_MOH | |
IDLE_MODE_RINGING | |
IDLE_MODE_SILENCE | |
IDLE_MODE_HOLD |
Definition at line 56 of file bridge_holding.c.
|
static |
Definition at line 442 of file bridge_holding.c.
|
static |
Definition at line 442 of file bridge_holding.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 442 of file bridge_holding.c.
|
static |
Definition at line 93 of file bridge_holding.c.
References ast_bridge_channel_queue_callback(), ast_channel_name(), ast_log, ast_bridge_channel::bridge, deferred_data::callback, callback(), ast_bridge_channel::chan, deferred_action(), LOG_WARNING, and ast_bridge::uniqueid.
Referenced by handle_participant_join(), holding_bridge_join(), and holding_bridge_leave().
|
static |
Definition at line 412 of file bridge_holding.c.
References ast_bridge_channel_lock_bridge(), ast_bridge_unlock, ast_bridge_channel::bridge, deferred_data::callback, holding_bridge, ast_bridge_channel::tech_pvt, and ast_bridge::technology.
Referenced by defer_action(), and smart_bridge_operation().
|
static |
Definition at line 226 of file bridge_holding.c.
References ast_channel_name(), ast_format_slin, ast_log, ast_set_write_format(), ast_channel::bridge_channel, ast_bridge_channel::chan, defer_action(), LOG_WARNING, and participant_entertainment_start().
Referenced by holding_bridge_join().
|
static |
Definition at line 242 of file bridge_holding.c.
References ast_assert, ast_bridge_channel_has_role(), ast_calloc, ast_channel_name(), ast_format_slin, ast_free, AST_LIST_TRAVERSE, ast_log, ast_set_read_format(), ast_channel::bridge, ast_channel::bridge_channel, ast_bridge_channel::chan, ast_bridge::channels, defer_action(), handle_participant_join(), HOLDING_ROLE_ANNOUNCER, HOLDING_ROLE_PARTICIPANT, LOG_ERROR, LOG_WARNING, NULL, participant_reaction_announcer_join(), holding_channel::role, ast_bridge::tech_pvt, ast_bridge_channel::tech_pvt, and ast_bridge::uniqueid.
|
static |
Definition at line 301 of file bridge_holding.c.
References ast_free, AST_LIST_TRAVERSE, ast_bridge::channels, defer_action(), HOLDING_ROLE_ANNOUNCER, NULL, participant_entertainment_stop(), participant_reaction_announcer_leave(), holding_channel::role, ast_bridge::tech_pvt, and ast_bridge_channel::tech_pvt.
|
static |
Definition at line 352 of file bridge_holding.c.
References HOLDING_ROLE_PARTICIPANT, participant_entertainment_stop(), holding_channel::role, and ast_bridge_channel::tech_pvt.
|
static |
Definition at line 369 of file bridge_holding.c.
References ast_bridge_channel::bridge, HOLDING_ROLE_PARTICIPANT, participant_entertainment_start(), holding_channel::role, ast_bridge::tech_pvt, and ast_bridge_channel::tech_pvt.
|
static |
Definition at line 329 of file bridge_holding.c.
References ast_bridge_queue_everyone_else(), HOLDING_ROLE_ANNOUNCER, NULL, holding_channel::role, and ast_bridge_channel::tech_pvt.
|
static |
Definition at line 433 of file bridge_holding.c.
References ast_bridge_technology_register, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, holding_bridge, and unload_module().
|
static |
Definition at line 186 of file bridge_holding.c.
References ast_assert, ast_bridge_channel_get_role_option(), ast_channel_start_silence_generator(), AST_CONTROL_HOLD, AST_CONTROL_RINGING, ast_indicate(), ast_indicate_data(), ast_log, ast_moh_start(), ast_bridge_channel::chan, holding_channel::entertainment_active, holding_channel::idle_mode, IDLE_MODE_HOLD, IDLE_MODE_MOH, IDLE_MODE_NONE, IDLE_MODE_RINGING, IDLE_MODE_SILENCE, LOG_WARNING, NULL, participant_idle_mode_setup(), holding_channel::silence_generator, and ast_bridge_channel::tech_pvt.
Referenced by handle_participant_join(), holding_bridge_unsuspend(), and participant_reaction_announcer_leave().
|
static |
Definition at line 141 of file bridge_holding.c.
References ast_assert, ast_channel_stop_silence_generator(), AST_CONTROL_UNHOLD, ast_indicate(), ast_moh_stop(), ast_bridge_channel::chan, holding_channel::entertainment_active, holding_channel::idle_mode, IDLE_MODE_HOLD, IDLE_MODE_MOH, IDLE_MODE_NONE, IDLE_MODE_RINGING, IDLE_MODE_SILENCE, NULL, holding_channel::silence_generator, and ast_bridge_channel::tech_pvt.
Referenced by holding_bridge_leave(), holding_bridge_suspend(), and participant_reaction_announcer_join().
|
static |
Definition at line 114 of file bridge_holding.c.
References ast_assert, ast_bridge_channel_get_role_option(), ast_channel_name(), ast_debug, ast_strlen_zero(), ast_bridge_channel::chan, holding_channel::idle_mode, IDLE_MODE_HOLD, IDLE_MODE_MOH, IDLE_MODE_NONE, IDLE_MODE_RINGING, IDLE_MODE_SILENCE, NULL, and ast_bridge_channel::tech_pvt.
Referenced by participant_entertainment_start().
|
static |
Definition at line 174 of file bridge_holding.c.
References ast_channel_name(), ast_format_slin, ast_log, ast_set_write_format(), ast_channel::bridge_channel, ast_bridge_channel::chan, LOG_WARNING, and participant_entertainment_stop().
Referenced by holding_bridge_join().
|
static |
Definition at line 295 of file bridge_holding.c.
References ast_bridge_channel_restore_formats(), ast_channel::bridge_channel, and participant_entertainment_start().
Referenced by holding_bridge_leave().
|
static |
Definition at line 427 of file bridge_holding.c.
References ast_bridge_technology_unregister(), and holding_bridge.
Referenced by load_module().
|
static |
Definition at line 442 of file bridge_holding.c.
|
static |
Definition at line 442 of file bridge_holding.c.
|
static |
Definition at line 392 of file bridge_holding.c.
Referenced by deferred_action(), load_module(), and unload_module().