[Freeswitch-svn] [commit] r3834 - freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr

Freeswitch SVN mishehu at freeswitch.org
Tue Dec 26 14:17:22 EST 2006


Author: mishehu
Date: Tue Dec 26 14:17:22 2006
New Revision: 3834

Modified:
   freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp

Log:
Added output of a header to CsvCDR so that folks know what the format is.  Not yet tested either.

Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp	(original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp	Tue Dec 26 14:17:22 2006
@@ -228,7 +228,21 @@
 		switch_console_printf(SWITCH_CHANNEL_LOG,"Could not open the CSV file %s .  CsvCDR logger will not be functional until this is resolved and a reload is issued.  Failbit is set to %d.\n",filename.c_str(),outputfile.fail());
 		activated = 0;
 	}
+	else
+	{
+		outputfile << "callstartdate,formattedcallstartdate,callanswerdate,formattedcallanswerdate,calltransferdate,formattedcalltransferdate,callendate,formattedcallenddate,hangupcause_text,hangupcause,clid,originated,dialplan,myuuid,destuuid,src,dst,srcchannel,dstchannel,ani,aniii,network_address,lastapp,lastdata,billusec,disposition,amaflags";
+		if(chanvars_fixed_list.size())
+		{
+			std::list<std::string>::iterator iItr, iEnd;
+			for(iItr = chanvars_fixed_list.begin(),iEnd = chanvars_fixed_list.end(); iItr != iEnd; iItr++)
+				outputfile << "," << *iItr;
+		}
+	
+		if(logchanvars)
+			outputfile << ",chanvars_supp";
 	
+		outputfile << std::endl;
+	}
 }
 
 bool CsvCDR::process_record()



More information about the Freeswitch-svn mailing list