39 #include <sys/types.h>
66 res =
ast_app_dtget(chan, context, exten, exten_len, 100, 1000);
79 snprintf(destination,
sizeof(destination),
"%s@%s", exten, context);
95 if (
ast_call(chan, destination, 0)) {
154 if (called_bridge_channel) {
215 attended_bridge_result =
ast_bridge_join(attended_bridge, bridge_channel->
chan, NULL, &caller_features);
static struct ast_channel * dial_transfer(struct ast_channel *caller, const char *exten, const char *context)
Helper function that creates an outgoing channel and returns it immediately.
int ast_hangup(struct ast_channel *chan)
Hang up a channel.
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
struct ast_party_connected_line connected
Channel Connected Line ID information.
Asterisk main include file. File version handling, generic pbx functions.
#define AST_LIST_FIRST(head)
Returns the first entry contained in a list.
int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect, size_t size, int maxlen, int timeout)
Present a dialtone and collect a certain length extension.
struct ast_party_caller caller
Channel Caller ID information.
char complete[MAXIMUM_DTMF_FEATURE_STRING]
enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features)
Join (blocking) a channel to a bridge.
Structure that contains features information.
char context[AST_MAX_CONTEXT]
static int grab_transfer(struct ast_channel *chan, char *exten, size_t exten_len, const char *context)
Helper function that presents dialtone and grabs extension.
struct ast_bridge * ast_bridge_new(enum ast_bridge_capability capabilities, int flags)
Create a new bridge.
int ast_bridge_features_enable(struct ast_bridge_features *features, enum ast_bridge_builtin_feature feature, const char *dtmf, void *config)
Enable a built in feature on a bridge features structure.
int ast_bridge_depart(struct ast_bridge *bridge, struct ast_channel *chan)
Depart a channel from a bridge.
int ast_bridge_features_init(struct ast_bridge_features *features)
Initialize bridge features structure.
static int attended_abort_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
Attended transfer abort feature.
int ast_bridge_destroy(struct ast_bridge *bridge)
Destroy a bridge.
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
static int load_module(void)
struct ast_bridge * bridge
int ast_bridge_features_hook(struct ast_bridge_features *features, const char *dtmf, ast_bridge_features_hook_callback callback, void *hook_pvt)
Attach a custom hook to a bridge features structure.
int ast_channel_datastore_inherit(struct ast_channel *from, struct ast_channel *to)
Inherit datastores from a parent to a child.
void ast_bridge_change_state(struct ast_bridge_channel *bridge_channel, enum ast_bridge_channel_state new_state)
Change the state of a bridged channel.
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.
struct ast_channel * chan
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Asterisk internal frame definitions.
#define AST_MAX_EXTENSION
char context[AST_MAX_CONTEXT]
char context[AST_MAX_CONTEXT]
Structure that contains information about a bridge.
static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
Internal built in feature for attended transfers.
#define AST_LIST_LAST(head)
Returns the last entry contained in a list.
struct ast_bridge * bridge
char threeway[MAXIMUM_DTMF_FEATURE_STRING]
#define ast_channel_unlock(chan)
void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_channel *child)
Inherits channel variable from parent to child channel.
int ast_stream_and_wait(struct ast_channel *chan, const char *file, const char *digits)
stream file until digit If the file name is non-empty, try to play it.
int ast_call(struct ast_channel *chan, char *addr, int timeout)
Make a call.
Structure that contains configuration information for the attended transfer built in feature...
#define ast_channel_lock_both(chan1, chan2)
Lock two channels.
static int feature_blind_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
Internal built in feature for blind transfers.
static int attended_threeway_transfer(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
Attended transfer feature to turn it into a threeway call.
struct ast_channel * chan
Structure that contains information regarding a channel in a bridge.
void ast_connected_line_copy_from_caller(struct ast_party_connected_line *dest, const struct ast_party_caller *src)
Copy the caller information to the connected line information.
static int feature_hangup(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
Internal built in feature for hangup.
char abort[MAXIMUM_DTMF_FEATURE_STRING]
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
ast_bridge_channel_state
State information about a bridged channel.
static char context[AST_MAX_CONTEXT]
static int unload_module(void)
int ast_bridge_features_register(enum ast_bridge_builtin_feature feature, ast_bridge_features_hook_callback callback, const char *dtmf)
Register a handler for a built in feature.
Structure that contains configuration information for the blind transfer built in feature...
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
struct ast_channel * ast_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *status)
Requests a channel.
int ast_bridge_features_cleanup(struct ast_bridge_features *features)
Clean up the contents of a bridge features structure.
int ast_stopstream(struct ast_channel *c)
Stops a stream.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
int ast_bridge_features_set_flag(struct ast_bridge_features *features, enum ast_bridge_feature_flags flag)
Set a flag on a bridge features structure.
struct ast_module * ast_module_ref(struct ast_module *)