42 static int media_call(
struct ast_channel *chan,
const char *addr,
int timeout)
73 .description =
"Bridge Media Announcing Channel Driver",
74 .requester = announce_request,
76 .hangup = media_hangup,
95 .description =
"Bridge Media Recording Channel Driver",
96 .requester = record_request,
98 .hangup = media_hangup,
153 return media_request_helper(cap, assignedids, requestor, data, &announce_tech,
"announcer");
159 return media_request_helper(cap, assignedids, requestor, data, &record_tech,
"recorder");
162 static void cleanup_capabilities(
void)
175 static int unload_module(
void)
179 cleanup_capabilities();
183 static int load_module(
void)
199 ast_log(LOG_ERROR,
"Unable to register channel technology %s(%s).\n",
200 announce_tech.type, announce_tech.description);
201 cleanup_capabilities();
206 ast_log(LOG_ERROR,
"Unable to register channel technology %s(%s).\n",
207 record_tech.type, record_tech.description);
208 cleanup_capabilities();
215 AST_MODULE_INFO(
ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT,
"Bridge Media Channel Driver",
216 .support_level = AST_MODULE_SUPPORT_CORE,
218 .unload = unload_module,
Main Channel structure associated with a channel.
Channels with this particular technology are an implementation detail of Asterisk and should generall...
Asterisk main include file. File version handling, generic pbx functions.
void ast_channel_unregister(const struct ast_channel_tech *tech)
Unregister a channel technology.
int ast_unreal_sendhtml(struct ast_channel *ast, int subclass, const char *data, int datalen)
struct ast_unreal_pvt * ast_unreal_alloc(size_t size, ao2_destructor_fn destructor, struct ast_format_cap *cap)
Allocate the base unreal struct for a derivative.
#define AST_UNREAL_NO_OPTIMIZATION
Structure to pass both assignedid values to channel drivers.
ast_callid ast_read_threadstorage_callid(void)
extracts the callerid from the thread
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 ...
struct ast_channel * ast_unreal_new_channels(struct ast_unreal_pvt *p, const struct ast_channel_tech *tech, int semi1_state, int semi2_state, const char *exten, const char *context, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, ast_callid callid)
Create the semi1 and semi2 unreal channels.
int ast_channel_add_bridge_role(struct ast_channel *chan, const char *role_name)
Adds a bridge role to a channel.
int ast_unreal_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
int ast_unreal_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
const struct ast_channel_tech * tech
General Asterisk PBX channel definitions.
void ast_unreal_destructor(void *vdoomed)
struct ast_unreal_pvt destructor.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
int ast_unreal_setoption(struct ast_channel *chan, int option, void *data, int datalen)
Structure to describe a channel "technology", ie a channel driver See for examples: ...
int ast_unreal_write(struct ast_channel *ast, struct ast_frame *f)
int ast_unreal_digit_begin(struct ast_channel *ast, char digit)
The base pvt structure for local channel derivatives.
struct ast_format_cap * capabilities
int ast_unreal_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
struct ast_frame * ast_unreal_read(struct ast_channel *ast)
Module has failed to load, may be in an inconsistent state.
int ast_unreal_queryoption(struct ast_channel *ast, int option, void *data, int *datalen)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
int ast_answer(struct ast_channel *chan)
Answer a channel.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
int ast_unreal_hangup(struct ast_unreal_pvt *p, struct ast_channel *ast)
Hangup one end (maybe both ends) of an unreal channel derivative.
int ast_unreal_sendtext(struct ast_channel *ast, const char *text)
Unreal channel derivative framework.