Asterisk - The Open Source Telephony Project
18.5.0
|
Application to place the channel into a holding Bridge. More...
#include "asterisk.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/features.h"
#include "asterisk/say.h"
#include "asterisk/lock.h"
#include "asterisk/utils.h"
#include "asterisk/app.h"
#include "asterisk/bridge.h"
#include "asterisk/musiconhold.h"
#include "asterisk/astobj2.h"
#include "asterisk/causes.h"
Go to the source code of this file.
Data Structures | |
struct | wait_bridge_wrapper |
Macros | |
#define | APP_NAME "BridgeWait" |
#define | DEFAULT_BRIDGE_NAME "default" |
Enumerations | |
enum | bridgewait_args { OPT_ARG_ENTERTAINMENT, OPT_ARG_MOHCLASS, OPT_ARG_TIMEOUT, OPT_ARG_ARRAY_SIZE } |
enum | bridgewait_flags { MUXFLAG_MOHCLASS = (1 << 0), MUXFLAG_ENTERTAINMENT = (1 << 1), MUXFLAG_TIMEOUT = (1 << 2) } |
enum | wait_bridge_roles { ROLE_PARTICIPANT = 0, ROLE_ANNOUNCER, ROLE_INVALID } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | apply_option_entertainment (struct ast_channel *chan, const char *entertainment_arg) |
static int | apply_option_moh (struct ast_channel *chan, const char *class_arg) |
static int | apply_option_timeout (struct ast_bridge_features *features, char *duration_arg) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | bridgewait_exec (struct ast_channel *chan, const char *data) |
static int | bridgewait_timeout_callback (struct ast_bridge_channel *bridge_channel, void *hook_pvt) |
static struct wait_bridge_wrapper * | get_wait_bridge_wrapper (const char *bridge_name) |
static int | load_module (void) |
static int | process_options (struct ast_channel *chan, struct ast_flags *flags, char **opts, struct ast_bridge_features *features, enum wait_bridge_roles role) |
static int | unload_module (void) |
static enum wait_bridge_roles | validate_role (const char *role) |
static int | wait_bridge_hash_fn (const void *obj, const int flags) |
static int | wait_bridge_sort_fn (const void *obj_left, const void *obj_right, const int flags) |
static struct wait_bridge_wrapper * | wait_bridge_wrapper_alloc (const char *bridge_name, struct ast_bridge *bridge) |
static void | wait_bridge_wrapper_destructor (void *obj) |
static struct wait_bridge_wrapper * | wait_bridge_wrapper_find_by_name (const char *bridge_name) |
static void | wait_wrapper_removal (struct wait_bridge_wrapper *wrapper) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Place the channel into a holding bridge application" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .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 const struct ast_app_option | bridgewait_opts [128] = { [ 'e' ] = { .flag = MUXFLAG_ENTERTAINMENT , .arg_index = OPT_ARG_ENTERTAINMENT + 1 }, [ 'm' ] = { .flag = MUXFLAG_MOHCLASS , .arg_index = OPT_ARG_MOHCLASS + 1 }, [ 'S' ] = { .flag = MUXFLAG_TIMEOUT , .arg_index = OPT_ARG_TIMEOUT + 1 }, } |
static struct ao2_container * | wait_bridge_wrappers |
Application to place the channel into a holding Bridge.
Definition in file app_bridgewait.c.
#define APP_NAME "BridgeWait" |
Definition at line 116 of file app_bridgewait.c.
Referenced by get_wait_bridge_wrapper(), load_module(), and unload_module().
#define DEFAULT_BRIDGE_NAME "default" |
Definition at line 117 of file app_bridgewait.c.
Referenced by bridgewait_exec().
enum bridgewait_args |
Enumerator | |
---|---|
OPT_ARG_ENTERTAINMENT | |
OPT_ARG_MOHCLASS | |
OPT_ARG_TIMEOUT | |
OPT_ARG_ARRAY_SIZE |
Definition at line 191 of file app_bridgewait.c.
enum bridgewait_flags |
Enumerator | |
---|---|
MUXFLAG_MOHCLASS | |
MUXFLAG_ENTERTAINMENT | |
MUXFLAG_TIMEOUT |
Definition at line 185 of file app_bridgewait.c.
enum wait_bridge_roles |
Enumerator | |
---|---|
ROLE_PARTICIPANT | |
ROLE_ANNOUNCER | |
ROLE_INVALID |
Definition at line 262 of file app_bridgewait.c.
|
static |
Definition at line 512 of file app_bridgewait.c.
|
static |
Definition at line 512 of file app_bridgewait.c.
|
static |
Definition at line 241 of file app_bridgewait.c.
References ast_channel_set_bridge_role_option(), ast_log, and LOG_ERROR.
Referenced by process_options().
|
static |
Definition at line 236 of file app_bridgewait.c.
References ast_channel_set_bridge_role_option().
Referenced by process_options().
|
static |
Definition at line 212 of file app_bridgewait.c.
References AST_BRIDGE_HOOK_REMOVE_ON_PULL, ast_bridge_interval_hook(), ast_log, ast_strlen_zero, bridgewait_timeout_callback(), LOG_ERROR, and NULL.
Referenced by process_options().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 512 of file app_bridgewait.c.
|
static |
Definition at line 416 of file app_bridgewait.c.
References args, ast_answer(), AST_APP_ARG, ast_app_parse_options(), ast_bridge_features_cleanup(), ast_bridge_features_init(), ast_bridge_join(), ast_channel_name(), ast_check_hangup_locked(), AST_DECLARE_APP_ARGS, ast_log, AST_STANDARD_APP_ARGS, AST_STATE_UP, ast_strdupa, ast_strlen_zero, ast_verb, wait_bridge_wrapper::bridge, bridgewait_opts, DEFAULT_BRIDGE_NAME, get_wait_bridge_wrapper(), LOG_ERROR, LOG_WARNING, wait_bridge_wrapper::name, NULL, OPT_ARG_ARRAY_SIZE, options, parse(), process_options(), ROLE_INVALID, ROLE_PARTICIPANT, ast_bridge::uniqueid, validate_role(), and wait_wrapper_removal().
Referenced by load_module().
|
static |
Definition at line 204 of file app_bridgewait.c.
References ast_bridge_channel_leave_bridge(), AST_CAUSE_NORMAL_CLEARING, ast_channel_name(), ast_verb, BRIDGE_CHANNEL_STATE_END, and ast_bridge_channel::chan.
Referenced by apply_option_timeout().
|
static |
Definition at line 341 of file app_bridgewait.c.
References APP_NAME, ast_bridge_base_new(), AST_BRIDGE_CAPABILITY_HOLDING, AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM, AST_BRIDGE_FLAG_MERGE_INHIBIT_TO, AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM, AST_BRIDGE_FLAG_SWAP_INHIBIT_TO, AST_BRIDGE_FLAG_TRANSFER_PROHIBITED, wait_bridge_wrapper::bridge, lock, NULL, SCOPED_AO2LOCK, wait_bridge_wrapper_alloc(), and wait_bridge_wrapper_find_by_name().
Referenced by bridgewait_exec().
|
static |
Definition at line 499 of file app_bridgewait.c.
References AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, AO2_CONTAINER_ALLOC_OPT_DUPS_REJECT, APP_NAME, ast_register_application_xml, bridgewait_exec(), NULL, wait_bridge_hash_fn(), and wait_bridge_sort_fn().
|
static |
Definition at line 268 of file app_bridgewait.c.
References apply_option_entertainment(), apply_option_moh(), apply_option_timeout(), ast_assert, ast_channel_add_bridge_role(), ast_test_flag, MUXFLAG_ENTERTAINMENT, MUXFLAG_MOHCLASS, MUXFLAG_TIMEOUT, OPT_ARG_ENTERTAINMENT, OPT_ARG_MOHCLASS, OPT_ARG_TIMEOUT, ROLE_ANNOUNCER, ROLE_INVALID, and ROLE_PARTICIPANT.
Referenced by bridgewait_exec().
|
static |
Definition at line 492 of file app_bridgewait.c.
References ao2_cleanup, APP_NAME, and ast_unregister_application().
|
static |
Definition at line 405 of file app_bridgewait.c.
References ROLE_ANNOUNCER, ROLE_INVALID, and ROLE_PARTICIPANT.
Referenced by bridgewait_exec().
|
static |
Definition at line 140 of file app_bridgewait.c.
References ast_assert, ast_str_hash(), wait_bridge_wrapper::name, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
Referenced by load_module().
|
static |
Definition at line 159 of file app_bridgewait.c.
References ast_assert, wait_bridge_wrapper::name, OBJ_KEY, OBJ_PARTIAL_KEY, and OBJ_POINTER.
Referenced by load_module().
|
static |
Definition at line 319 of file app_bridgewait.c.
References AO2_ALLOC_OPT_LOCK_NOLOCK, ao2_alloc_options, ao2_cleanup, ao2_link, ast_bridge_destroy(), wait_bridge_wrapper::bridge, wait_bridge_wrapper::name, NULL, and wait_bridge_wrapper_destructor().
Referenced by get_wait_bridge_wrapper().
|
static |
Definition at line 126 of file app_bridgewait.c.
References ast_bridge_destroy(), and wait_bridge_wrapper::bridge.
Referenced by wait_bridge_wrapper_alloc().
|
static |
Definition at line 135 of file app_bridgewait.c.
References ao2_find, and OBJ_KEY.
Referenced by get_wait_bridge_wrapper().
|
static |
Definition at line 378 of file app_bridgewait.c.
References ao2_cleanup, ao2_lock, ao2_ref, ao2_unlink, and ao2_unlock.
Referenced by bridgewait_exec().
|
static |
Definition at line 512 of file app_bridgewait.c.
|
static |
Definition at line 512 of file app_bridgewait.c.
|
static |
Definition at line 202 of file app_bridgewait.c.
Referenced by bridgewait_exec().
|
static |
Definition at line 119 of file app_bridgewait.c.