No CDR found in system


I find there is no CDR (CSV) in asterisk. Any clue to solve?

*CLI> module show like cdr
Module Description Use Count Status Support Level
cdr CDR Engine 3 Running core Customizable Comma Separated Values CDR 0 Running core Call Detail Record (CDR) dialplan functi 0 Running core
3 modules loaded

*CLI> core show version
Asterisk 16.5.0 built by root @ on a x86_64 running Linux on 2019-08-08 08:05:48 UTC

*CLI> cdr show status
Call Detail Record (CDR) settings

Logging: Enabled
Mode: Simple
Log unanswered calls: No
Log congestion: No

  • Registered Backends


I am using the following sample as cdr.conf


The “cdr_custom” module is loaded for CDRs. It is configured using the “cdr_custom.conf” file, and places files in the /var/log/asterisk/cdr-custom directory.

1 Like

Thanks. I am new in asterisk. May I know what’s wrong of my setting? Could you elaborate with examples?

A sample file is included in the same directory as cdr.conf.sample. You also haven’t provided what is actually configured on your system for it, and did you look to see if a file is being created in the directory I gave?

There is cdr.conf.

file: cdr.conf

usegmtime=yes ; log date/time in GMT. Default is “no”
loguniqueid=yes ; log uniqueid. Default is “no”
loguserfield=yes ; log user field. Default is “no”
accountlogs=yes ; create separate log file for each account code. Default is “yes”

file: cdr_custom.conf

; Our CDR log will be written to /var/log/asterisk/cdr-custom/Master.csv
; with the following schema.
Master.csv => {CSV_QUOTE({CDR(clid)})},{CSV_QUOTE({CDR(src)})},{CSV_QUOTE({CDR(dst)})},{CSV_QUOTE({CDR(dcontext)})},{CSV_QUOTE({CDR(channel)})},{CSV_QUOTE({CDR(dstchannel)})},{CSV_QUOTE({CDR(lastapp)})},{CSV_QUOTE({CDR(lastdata)})},{CSV_QUOTE({CDR(start)})},{CSV_QUOTE({CDR(answer)})},{CSV_QUOTE({CDR(end)})},{CSV_QUOTE({CDR(duration)})},{CSV_QUOTE({CDR(billsec)})},{CSV_QUOTE({CDR(disposition)})},{CSV_QUOTE({CDR(amaflags)})},{CSV_QUOTE({CDR(accountcode)})},{CSV_QUOTE({CDR(uniqueid)})},{CSV_QUOTE({CDR(userfield)})},${CDR(sequence)}

There is a file “Master.csv” in /var/log/asterisk/cdr-custom but not updated.
-rw-r–r-- 1 root root 546 Aug 16 15:17 Master.csv

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.