29 #ifndef _ASTERISK_CORE_UNREAL_H 30 #define _ASTERISK_CORE_UNREAL_H 37 #if defined(__cplusplus) || defined(c_plusplus) 105 #define AST_UNREAL_IS_OUTBOUND(a, b) ((a) == (b)->chan ? 1 : 0) 107 #define AST_UNREAL_CARETAKER_THREAD (1 << 0) 108 #define AST_UNREAL_NO_OPTIMIZATION (1 << 1) 109 #define AST_UNREAL_MOH_INTERCEPT (1 << 2) 110 #define AST_UNREAL_OPTIMIZE_BEGUN (1 << 3) 262 #if defined(__cplusplus) || defined(c_plusplus)
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
struct ast_unreal_pvt_callbacks * callbacks
struct ast_channel * owner
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.
Structure to pass both assignedid values to channel drivers.
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_unreal_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
Common implementation-independent jitterbuffer stuff.
void(*const optimization_finished)(struct ast_unreal_pvt *p, int success, unsigned int id)
Called when an optimization attempt completed successfully.
struct ast_frame_subclass subclass
int ast_unreal_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
const struct ast_channel_tech * tech
struct ast_stream_topology * chan_old_topology
General Asterisk PBX channel definitions.
void(*const optimization_started)(struct ast_unreal_pvt *p, struct ast_channel *source, enum ast_unreal_channel_indicator dest, unsigned int id)
Called when an optimization attempt has started.
void ast_unreal_destructor(void *vdoomed)
struct ast_unreal_pvt destructor.
#define AST_MAX_EXTENSION
int ast_unreal_channel_push_to_bridge(struct ast_channel *ast, struct ast_bridge *bridge, unsigned int flags)
Push the semi2 unreal channel into a bridge from either member of the unreal pair.
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: ...
struct ast_stream_topology * owner_old_topology
struct ast_channel * chan
struct ast_format_cap * reqcap
void ast_unreal_call_setup(struct ast_channel *semi1, struct ast_channel *semi2)
Setup unreal owner and chan channels before initiating call.
Structure that contains information about a bridge.
int ast_unreal_write(struct ast_channel *ast, struct ast_frame *f)
int ast_unreal_digit_begin(struct ast_channel *ast, char digit)
void(* ao2_destructor_fn)(void *vdoomed)
Typedef for an object destructor.
The base pvt structure for local channel derivatives.
int ast_unreal_write_stream(struct ast_channel *ast, int stream_num, struct ast_frame *f)
int ast_unreal_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
struct ast_frame * ast_unreal_read(struct ast_channel *ast)
ast_unreal_channel_indicator
int ast_unreal_queryoption(struct ast_channel *ast, int option, void *data, int *datalen)
int ast_unreal_answer(struct ast_channel *ast)
struct ast_unreal_pvt * ast_unreal_alloc_stream_topology(size_t size, ao2_destructor_fn destructor, struct ast_stream_topology *topology)
Allocate the base unreal struct for a derivative.
Data structure associated with a single frame of data.
union ast_frame::@263 data
static char context[AST_MAX_CONTEXT]
Callbacks that can be provided by concrete implementations of the unreal channel driver that will be ...
struct ast_stream_topology * reqtopology
General jitterbuffer configuration.
int ast_unreal_hangup(struct ast_unreal_pvt *p, struct ast_channel *ast)
Hangup one end (maybe both ends) of an unreal channel derivative.
void ast_unreal_lock_all(struct ast_unreal_pvt *p, struct ast_channel **outchan, struct ast_channel **outowner)
Send an unreal pvt in with no locks held and get all locks.
int ast_unreal_sendtext(struct ast_channel *ast, const char *text)