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)
259#if defined(__cplusplus) || defined(c_plusplus)
Common implementation-independent jitterbuffer stuff.
void(* ao2_destructor_fn)(void *vdoomed)
Typedef for an object destructor.
General Asterisk PBX channel definitions.
#define AST_MAX_EXTENSION
int ast_unreal_digit_end(struct ast_channel *ast, char digit, unsigned int duration)
int ast_unreal_setoption(struct ast_channel *chan, int option, void *data, int datalen)
int ast_unreal_queryoption(struct ast_channel *ast, int option, void *data, int *datalen)
int ast_unreal_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
int ast_unreal_digit_begin(struct ast_channel *ast, char digit)
int ast_unreal_sendhtml(struct ast_channel *ast, int subclass, const char *data, int datalen)
void ast_unreal_call_setup(struct ast_channel *semi1, struct ast_channel *semi2)
Setup unreal owner and chan channels before initiating call.
void ast_unreal_destructor(void *vdoomed)
struct ast_unreal_pvt destructor.
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_write(struct ast_channel *ast, struct ast_frame *f)
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.
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.
int ast_unreal_indicate(struct ast_channel *ast, int condition, const void *data, size_t datalen)
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_sendtext(struct ast_channel *ast, const char *text)
ast_unreal_channel_indicator
int ast_unreal_answer(struct ast_channel *ast)
int ast_unreal_write_stream(struct ast_channel *ast, int stream_num, struct ast_frame *f)
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.
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.
struct ast_frame * ast_unreal_read(struct ast_channel *ast)
Structure to pass both assignedid values to channel drivers.
Structure that contains information about a bridge.
Structure to describe a channel "technology", ie a channel driver See for examples:
Main Channel structure associated with a channel.
struct ast_bridge * bridge
char exten[AST_MAX_EXTENSION]
const struct ast_channel_tech * tech
Data structure associated with a single frame of data.
struct ast_frame_subclass subclass
union ast_frame::@226 data
General jitterbuffer configuration.
Callbacks that can be provided by concrete implementations of the unreal channel driver that will be ...
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(*const optimization_finished)(struct ast_unreal_pvt *p, int success, unsigned int id)
Called when an optimization attempt completed successfully.
The base pvt structure for local channel derivatives.
struct ast_stream_topology * chan_old_topology
struct ast_format_cap * reqcap
struct ast_channel * chan
char name[AST_MAX_EXTENSION+AST_MAX_CONTEXT+2]
struct ast_unreal_pvt_callbacks * callbacks
struct ast_channel * owner
struct ast_stream_topology * owner_old_topology
struct ast_stream_topology * reqtopology