[asterisk-commits] murf: branch group/newcdr r155932 - in /team/group/newcdr: configs/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 11 10:29:25 CST 2008


Author: murf
Date: Tue Nov 11 10:29:25 2008
New Revision: 155932

URL: http://svn.digium.com/view/asterisk?view=rev&rev=155932
Log:
Covered Brian's XXX issues

Modified:
    team/group/newcdr/configs/cel.conf.sample
    team/group/newcdr/main/cel.c

Modified: team/group/newcdr/configs/cel.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/configs/cel.conf.sample?view=diff&rev=155932&r1=155931&r2=155932
==============================================================================
--- team/group/newcdr/configs/cel.conf.sample (original)
+++ team/group/newcdr/configs/cel.conf.sample Tue Nov 11 10:29:25 2008
@@ -10,8 +10,7 @@
 
 [general]
 
-; Define whether or not to use CEL.  Setting this to "no" will override
-; any loading of backend CDR modules.  Default is "no". Setting to "yes"
+; Define whether or not to use CEL.  Default is "no". Setting to "yes"
 ; will turn on CEL.
 
 ;enable=no
@@ -50,6 +49,11 @@
 
 events= APP_START, CHAN_START, CHAN_END, ANSWER,HANGUP, BRIDGE_START, BRIDGE_END
 
+; define the date format, by default it is %ld.%06ld,
+; reflect the usual seconds since the epoch, with the
+; number of microseconds
+
+;dateformat = %ld.%06ld
 
 [csv]
 usegmtime=yes ;log date/time in GMT

Modified: team/group/newcdr/main/cel.c
URL: http://svn.digium.com/view/asterisk/team/group/newcdr/main/cel.c?view=diff&rev=155932&r1=155931&r2=155932
==============================================================================
--- team/group/newcdr/main/cel.c (original)
+++ team/group/newcdr/main/cel.c Tue Nov 11 10:29:25 2008
@@ -38,6 +38,7 @@
 
 #include "asterisk/lock.h"
 #include "asterisk/channel.h"
+#include "asterisk/pbx.h"
 #include "asterisk/cel.h"
 #include "asterisk/logger.h"
 #include "asterisk/callerid.h"
@@ -493,11 +494,9 @@
 		newvariable = ast_var_assign("eventtype", ast_cel_eventtype2str(eventtype));
 	AST_LIST_INSERT_HEAD(headp, newvariable, entries);
 
-	/* XXX - format this according to some config-defined format */
 	if (ast_strlen_zero(cel_dateformat)) {
 		snprintf(timebuf, sizeof(timebuf), "%ld.%06ld", eventtime.tv_sec, eventtime.tv_usec);
-	}
-	else {
+	} else {
 		struct ast_tm tm;
 		ast_localtime(&eventtime, &tm, NULL);
 		ast_strftime(timebuf, sizeof(timebuf), cel_dateformat, &tm);
@@ -523,8 +522,8 @@
 	ast_string_field_set(tchan,peeraccount,peeraccount);
 	ast_string_field_set(tchan,userfield,userfield);
 
-	/* XXX - set BRIDGEPEER in the channel variables instead */
-	ast_string_field_set(tchan,language,peer); /* we'll hide the peer name in the language field -- CEL had best be able to tell a dummy channel from a real one!*/
+	pbx_builtin_setvar_helper(tchan, "BRIDGEPEER", peer);
+	
 	tchan->appl = ast_strdup(appname);
 	tchan->data = ast_strdup(appdata);
 	tchan->amaflags = amaflag;




More information about the asterisk-commits mailing list