Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have upgraded PBX to Asterisk 1.6.2.7 and now CDR files are not created. It looks that such logging is disabled:

Connected to Asterisk 1.6.2.7 currently running on pbx2 (pid = 5824)
Verbosity is at least 3
pbx2*CLI> cdr show status
pbx2*CLI>
Call Detail Record (CDR) settings
----------------------------------
    Logging:                    Disabled
    Mode:                       Simple

Asterisk shows that CDR modules are loaded:

pbx2*CLI> module show like cd
Module                         Description                              Use Count
cdr_manager.so                 Asterisk Manager Interface CDR Backend   0
cdr_csv.so                     Comma Separated Values CDR Backend       0
app_cdr.so                     Tell Asterisk to not maintain a CDR for  0
app_forkcdr.so                 Fork The CDR into 2 separate entities    0
func_cdr.so                    Call Detail Record (CDR) dialplan functi 0
cdr_custom.so                  Customizable Comma Separated Values CDR  0
6 modules loaded

How to enable creating CDR csv files?

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

It seems there was bug in Asterisk Now. It needed /etc/asterisk/cdr.conf which was absent.

share|improve this answer
add comment

We had to follow some more steps.

We needed some CDR logging ASAP and our AsteriskNOW server did not have modules for MySQL CDR logging. We would not install new packages in a running, highly requested production server, so we relied on CSV logging.

To enable it is easy. First, we edit /etc/asterisk/cdr.conf (if it does not exist, we create it) adding a [csv] section. We added some more configuration on it as below, but apparently the important thing is to create the section.

[csv]
usegmtime=yes    
loguniqueid=yes  
loguserfield=yes 
accountlogs=yes

Then, we edited /etc/asterisk/modules.conf for loading the cdr_csv.so module:

; Loading cdr
load => cdr_csv.so

For enabling the logging immediately without restarting Asterisk, we called asterisk -vvvr and loaded the module:

voip*CLI> module load cdr_csv.so

Now every call is logged in /var/log/asterisk/cdr-csv/Master.csv.

It took us some time to get it working. This page proved itself as a useful reference.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.