[Asterisk-cvs] asterisk/funcs func_cdr.c,1.3,1.4

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


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

Modified Files:
	func_cdr.c 
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: func_cdr.c
===================================================================
RCS file: /usr/cvsroot/asterisk/funcs/func_cdr.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- func_cdr.c	6 Jun 2005 22:12:19 -0000	1.3
+++ func_cdr.c	15 Jul 2005 23:24:51 -0000	1.4
@@ -77,7 +77,12 @@
 			recursive = 1;
 	}
 
-	ast_cdr_setvar(chan->cdr, argv[0], value, recursive);
+	if (!strcasecmp(argv[0], "accountcode"))
+		ast_cdr_setaccount(chan, value);
+	else if (!strcasecmp(argv[0], "userfield"))
+		ast_cdr_setuserfield(chan, value);
+	else
+		ast_cdr_setvar(chan->cdr, argv[0], value, recursive);
 }
 
 #ifndef BUILTIN_FUNC




More information about the svn-commits mailing list