[Asterisk-cvs] asterisk/include/asterisk channel.h, 1.91, 1.92 manager.h, 1.14, 1.15 pbx.h, 1.48, 1.49

russell at lists.digium.com russell at lists.digium.com
Fri Jul 15 19:17:04 CDT 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv13448/include/asterisk

Modified Files:
	channel.h manager.h pbx.h 
Log Message:
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.


Index: channel.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- channel.h	10 Jul 2005 23:49:57 -0000	1.91
+++ channel.h	15 Jul 2005 23:24:51 -0000	1.92
@@ -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 @@
 	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 @@
 	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 @@
 */
 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 */

Index: manager.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/manager.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- manager.h	21 Apr 2005 06:02:44 -0000	1.14
+++ manager.h	15 Jul 2005 23:24:51 -0000	1.15
@@ -141,6 +141,10 @@
 
 /*! 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);

Index: pbx.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/pbx.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- pbx.h	8 Jul 2005 21:14:34 -0000	1.48
+++ pbx.h	15 Jul 2005 23:24:51 -0000	1.49
@@ -516,11 +516,11 @@
 
 /* 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);




More information about the svn-commits mailing list