diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/channel.h | 17 | ||||
-rwxr-xr-x | include/asterisk/manager.h | 4 | ||||
-rwxr-xr-x | include/asterisk/pbx.h | 4 |
3 files changed, 19 insertions, 6 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 49a73420e..9dd312466 100755 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -20,6 +20,7 @@ #include "asterisk/frame.h" #include "asterisk/sched.h" #include "asterisk/chanvars.h" +#include "asterisk/config.h" #include <unistd.h> #include <setjmp.h> @@ -387,8 +388,7 @@ struct chanmon; oh.priority = priority; \ oh.cid_num = cid_num; \ oh.cid_name = cid_name; \ - oh.variable = variable; \ - oh.account = account; \ + oh.vars = vars; \ } struct outgoing_helper { @@ -397,8 +397,7 @@ struct outgoing_helper { int priority; const char *cid_num; const char *cid_name; - const char *variable; - const char *account; + struct ast_variable *vars; }; #define AST_CDR_TRANSFER (1 << 0) @@ -947,6 +946,16 @@ struct ast_channel *ast_bridged_channel(struct ast_channel *chan); */ void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_channel *child); +/*! + \brief adds a list of channel variables to a channel + \param chan the channel + \param vars a linked list of variables + + Variable names can be for a regular channel variable or a dialplan function + that has the ability to be written to. +*/ +void ast_set_variables(struct ast_channel *chan, struct ast_variable *vars); + /* Misc. functions below */ /* Helper function for migrating select to poll */ diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h index 62454255d..0b2712de6 100755 --- a/include/asterisk/manager.h +++ b/include/asterisk/manager.h @@ -141,6 +141,10 @@ extern int manager_event(int category, char *event, char *contents, ...) /*! Get header from mananger transaction */ extern char *astman_get_header(struct message *m, char *var); + +/*! Get a linked list of the Variable: headers */ +struct ast_variable *astman_get_variables(struct message *m); + /*! Send error in manager transaction */ extern void astman_send_error(struct mansession *s, struct message *m, char *error); extern void astman_send_response(struct mansession *s, struct message *m, char *resp, char *msg); diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index 187372dcb..b0ca14cc0 100755 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -516,11 +516,11 @@ int ast_async_goto_by_name(const char *chan, const char *context, const char *ex /* Synchronously or asynchronously make an outbound call and send it to a particular extension */ -int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, const char *variable, const char *account, struct ast_channel **locked_channel); +int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, struct ast_channel **locked_channel); /* Synchronously or asynchronously make an outbound call and send it to a particular application with given extension */ -int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, const char *variable, const char *account, struct ast_channel **locked_channel); +int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, struct ast_channel **locked_channel); /* Functions for returning values from structures */ const char *ast_get_context_name(struct ast_context *con); |