39 #include "asterisk/features_config.h"
75 static const char *
const app =
"AttendedTransfer";
77 static int attended_transfer_exec(
struct ast_channel *chan,
const char *data)
80 const char *context = NULL;
85 char feature_code[AST_FEATURE_MAX_LEN];
89 if (ast_strlen_zero((
char *)data)) {
90 ast_log(LOG_WARNING,
"%s requires an argument (exten)\n", app);
96 if (ast_strlen_zero(context)) {
101 ast_channel_lock(chan);
102 if (ast_get_builtin_feature(chan,
"atxfer", feature_code,
sizeof(feature_code)) ||
103 ast_strlen_zero(feature_code)) {
105 ast_channel_unlock(chan);
108 ast_channel_unlock(chan);
115 for (digit = feature_code; *digit; ++digit) {
120 for (digit = exten; *digit; ++digit) {
133 static int unload_module(
void)
138 static int load_module(
void)
143 AST_MODULE_INFO_STANDARD_EXTENDED(
ASTERISK_GPL_KEY,
"Attended transfer to the given extension");
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
int ast_unregister_application(const char *app)
Unregister an application.
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
struct ast_frame_subclass subclass
General Asterisk PBX channel definitions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
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.
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
Data structure associated with a single frame of data.
enum ast_frame_type frametype
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
#define AST_APP_ARG(name)
Define an application argument.