37 #include <sys/signal.h>
62 .description =
"Bridge Interaction Channel",
168 if (p->
input == ast) {
173 }
else if (p->
output == ast) {
206 if (!(p->
input =
ast_channel_alloc(1,
AST_STATE_UP, 0, 0,
"",
"",
"", requestor ? requestor->
linkedid : NULL, 0,
"Bridge/%p-input", p))) {
210 if (!(p->
output =
ast_channel_alloc(1,
AST_STATE_UP, 0, 0,
"",
"",
"", requestor ? requestor->
linkedid : NULL, 0,
"Bridge/%p-output", p))) {
static int load_module(void)
Load module into PBX, register channel.
int ast_queue_hangup(struct ast_channel *chan)
Queue a hangup frame.
Main Channel structure associated with a channel.
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.
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
struct ast_frame ast_null_frame
CallerID (and other GR30) management and generation Includes code and algorithms from the Zapata libr...
void ast_channel_unregister(const struct ast_channel_tech *tech)
Unregister a channel technology.
struct ast_channel * ast_channel_release(struct ast_channel *chan)
Unlink and release reference to a channel.
static int bridge_hangup(struct ast_channel *ast)
Called when a channel should be hung up.
Configuration File Parser.
static int bridge_write(struct ast_channel *ast, struct ast_frame *f)
Called when a frame should be written out to a channel.
static int bridge_call(struct ast_channel *ast, char *dest, int timeout)
Called when the channel should actually be dialed.
#define ast_mutex_lock(a)
int ast_channel_register(const struct ast_channel_tech *tech)
Register a channel technology (a new channel driver) Called by a channel module to register the kind ...
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
I/O Management (derived from Cheops-NG)
static struct ast_channel_tech bridge_tech
const ast_string_field linkedid
struct ast_channel * ast_channel_alloc(int needqueue, int state, const char *cid_num, const char *cid_name, const char *acctcode, const char *exten, const char *context, const char *linkedid, const int amaflag, const char *name_fmt,...)
static void bridge_queue_hangup(struct bridge_pvt *p, struct ast_channel *us)
Helper function to not deadlock when queueing the hangup frame.
int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features)
Impart (non-blocking) a channel on a bridge.
General Asterisk PBX channel definitions.
#define ast_mutex_trylock(a)
Access Control of various sorts.
Scheduler Routines (derived from cheops)
Structure to describe a channel "technology", ie a channel driver See for examples: ...
Core PBX routines and definitions.
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
static struct ast_frame * bridge_read(struct ast_channel *ast)
Called when a frame should be read from the channel.
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.
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
struct ast_bridge * bridge
static int unload_module(void)
Unload the bridge interaction channel from Asterisk.
#define ast_channel_unlock(chan)
struct ast_channel * output
#define CHANNEL_DEADLOCK_AVOIDANCE(chan)
#define AST_FORMAT_SLINEAR
Standard Command Line Interface.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
Data structure associated with a single frame of data.
#define ast_mutex_init(pmutex)
#define ast_channel_trylock(chan)
#define ast_mutex_destroy(a)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
static snd_pcm_format_t format
struct ast_channel_tech * tech
struct ast_channel * input
Structure for mutex and tracking information.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
#define ast_mutex_unlock(a)