[Asterisk-Users] Duplicate CDRs

Mark Drayton mdrayton at fsys.co.uk
Mon Jun 5 04:36:48 MST 2006


Hi

For whatever reason we've getting 2 or 3 CDR lines logged for each call, 
often in different formats:

as1:~# grep test-89-1e2c /var/log/asterisk/cdr-csv/*.csv
/var/log/asterisk/cdr-csv/67.csv:"67","88","89","test-context","88","SIP/test-88-2dae","SIP/test-89-1e2c","Dial","SIP/test-89|20","2006-06-05 
11:41:31",,"2006-06-05 11:41:35",4,0,"NO ANSWER","DOCUMENTATION"
/var/log/asterisk/cdr-csv/Master.csv:"88","88","89","test-context","SIP/test-88-2dae","SIP/test-89-1e2c","Dial","SIP/test-89|20","2006-06-05 
11:41:31","","2006-06-05 11:41:35","4","0","NO 
ANSWER","DOCUMENTATION","67","1149504091.85534","INT_CALL"
/var/log/asterisk/cdr-csv/Master.csv:"67","88","89","test-context","88","SIP/test-88-2dae","SIP/test-89-1e2c","Dial","SIP/test-89|20","2006-06-05 
11:41:31",,"2006-06-05 11:41:35",4,0,"NO ANSWER","DOCUMENTATION"

How can I configure asterisk not to log to <accountcode>.csv at all and 
only log the 18-field line (ie, with uniqueid and userfield) to 
Master.csv? I just want everything in one file, one line per record.

cdr.conf has only a '[general]' line -- nothing else.

cdr_custom.conf:

[mappings]
Master.csv => 
"${CDR(clid)}","${CDR(src)}","${CDR(dst)}","${CDR(dcontext)}","${CDR(channel)}","${CDR(dstchannel)}","${CDR(lastapp)}","${CDR(lastdata)}","${CDR(start)}","${CDR(answer)}","${CDR(end)}","${CDR(duration)}","${CDR(billsec)}","${CDR(disposition)}","${CDR(amaflags)}","${CDR(accountcode)}","${CDR(uniqueid)}","${CDR(userfield)}"

cdr_manager.conf

[general]
enabled = yes

as1*CLI> cdr status
CDR logging: enabled
CDR mode: simple
CDR registered backend: cdr-custom
CDR registered backend: cdr_manager
CDR registered backend: csv

Any ideas?

Thanks,

-- 

Mark Drayton
Frontier Systems
0207 420 4242


This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure.  If you are not the intended
recipient, please telephone or email the sender and delete this message
and any attachment(s) from your system and do not disclose its contents to any
third parties.



More information about the asterisk-users mailing list