aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-15 23:24:51 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-15 23:24:51 +0000
commit195245925855327e6d12be2293c8e9fcc57662cd (patch)
tree1d145d53531c453391f74d30f64b85c38318a447 /include
parentff15e0fa53156b9994da3f726bfe91232de6195a (diff)
Allow manager originate to specifiy more than one variable to be set.
Allow manager originate and spool files to set writable dialplan functions, including those that use the pipe symbol to seperate arguments. Allow CDR dialplan function to be able to set the account code and userfield. This deprecates the use of the Account header in manager originate and spool files, as well as the SetAccount and SetCDRUserField applications. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6147 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/channel.h17
-rwxr-xr-xinclude/asterisk/manager.h4
-rwxr-xr-xinclude/asterisk/pbx.h4
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);