Bridge Interaction Channel. More...
#include "asterisk.h"
#include <fcntl.h>
#include <sys/signal.h>
#include "asterisk/lock.h"
#include "asterisk/channel.h"
#include "asterisk/config.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/sched.h"
#include "asterisk/io.h"
#include "asterisk/acl.h"
#include "asterisk/callerid.h"
#include "asterisk/file.h"
#include "asterisk/cli.h"
#include "asterisk/app.h"
#include "asterisk/bridging.h"
Go to the source code of this file.
Data Structures | |
struct | bridge_pvt |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static struct ast_channel * | bridge_bridgedchannel (struct ast_channel *chan, struct ast_channel *bridge) |
Called when the user of this channel wants to get the actual channel in the bridge. More... | |
static int | bridge_call (struct ast_channel *ast, char *dest, int timeout) |
Called when the channel should actually be dialed. More... | |
static int | bridge_hangup (struct ast_channel *ast) |
Called when a channel should be hung up. More... | |
static void | bridge_queue_hangup (struct bridge_pvt *p, struct ast_channel *us) |
Helper function to not deadlock when queueing the hangup frame. More... | |
static struct ast_frame * | bridge_read (struct ast_channel *ast) |
Called when a frame should be read from the channel. More... | |
static struct ast_channel * | bridge_request (const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause) |
Called when we want to place a call somewhere, but not actually call it... yet. More... | |
static int | bridge_write (struct ast_channel *ast, struct ast_frame *f) |
Called when a frame should be written out to a channel. More... | |
static int | load_module (void) |
Load module into PBX, register channel. More... | |
static int | unload_module (void) |
Unload the bridge interaction channel from Asterisk. More... | |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Bridge Interaction Channel" , .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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_CHANNEL_DRIVER, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_channel_tech | bridge_tech |
Bridge Interaction Channel.
Definition in file chan_bridge.c.
|
static |
Definition at line 253 of file chan_bridge.c.
|
static |
Definition at line 253 of file chan_bridge.c.
|
static |
Called when the user of this channel wants to get the actual channel in the bridge.
Definition at line 81 of file chan_bridge.c.
References bridge_pvt::input, bridge_pvt::output, and ast_channel::tech_pvt.
|
static |
Called when the channel should actually be dialed.
Definition at line 123 of file chan_bridge.c.
References ast_bridge_impart(), ast_channel::bridge, bridge_pvt::input, bridge_pvt::output, and ast_channel::tech_pvt.
|
static |
Called when a channel should be hung up.
Definition at line 161 of file chan_bridge.c.
References ast_free, ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, bridge_queue_hangup(), bridge_pvt::input, bridge_pvt::lock, bridge_pvt::output, and ast_channel::tech_pvt.
|
static |
Helper function to not deadlock when queueing the hangup frame.
Definition at line 139 of file chan_bridge.c.
References ast_channel_trylock, ast_channel_unlock, ast_mutex_trylock, ast_mutex_unlock, ast_queue_hangup(), CHANNEL_DEADLOCK_AVOIDANCE, bridge_pvt::input, bridge_pvt::lock, and bridge_pvt::output.
Referenced by bridge_hangup().
|
static |
Called when a frame should be read from the channel.
Definition at line 88 of file chan_bridge.c.
References ast_null_frame.
|
static |
Called when we want to place a call somewhere, but not actually call it... yet.
Definition at line 196 of file chan_bridge.c.
References ast_calloc, ast_channel_alloc(), ast_channel_release(), AST_FORMAT_SLINEAR, ast_free, ast_mutex_init, AST_STATE_UP, bridge_tech, bridge_pvt::input, ast_channel::linkedid, bridge_pvt::lock, ast_channel::nativeformats, bridge_pvt::output, ast_channel::rawreadformat, ast_channel::rawwriteformat, ast_channel::readformat, ast_channel::tech, ast_channel::tech_pvt, and ast_channel::writeformat.
|
static |
Called when a frame should be written out to a channel.
Definition at line 94 of file chan_bridge.c.
References ast_channel_trylock, ast_channel_unlock, ast_mutex_lock, ast_mutex_trylock, ast_mutex_unlock, ast_queue_frame(), CHANNEL_DEADLOCK_AVOIDANCE, bridge_pvt::input, bridge_pvt::lock, bridge_pvt::output, and ast_channel::tech_pvt.
|
static |
Load module into PBX, register channel.
Definition at line 232 of file chan_bridge.c.
References ast_channel_register(), ast_log(), AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, and LOG_ERROR.
|
static |
Unload the bridge interaction channel from Asterisk.
Definition at line 243 of file chan_bridge.c.
References ast_channel_unregister().
|
static |
Definition at line 253 of file chan_bridge.c.
|
static |
Definition at line 253 of file chan_bridge.c.
|
static |
Definition at line 60 of file chan_bridge.c.
Referenced by bridge_request().