OpenWrt Forum Archive

Topic: Asterisk 1.4 and CDR ?

The content of this topic has been archived on 25 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all !

Running OpenWrt 0.9 on a WRTSL54GS ...

Since i have updated to asterisk 1.4 the CDR are not written ...
I have the same setup as in 1.12 where it worke fine ...
I have tried everything i could think of but to no avail ...

Has anyone have had the same problem ?  Any Cue ?

Thanks for any help !

Noël

noelbou wrote:

Since i have updated to asterisk 1.4 the CDR are not written ...
I have the same setup as in 1.12 where it worke fine ...
I have tried everything i could think of but to no avail ...

Has anyone have had the same problem ?  Any Cue ?

I had the same problem initially; I think I solved it for CSV cdr by manually creating the Master.csv file in the /var/log/asterisk/cdr-csv dir. I load only cdr_csv.so, no other cdr related modules (especially not app_cdr.so of course...).
You may want to check these settings.

Hans.

(Last edited by zandbelt on 15 Apr 2007, 14:51)

Hello Hans,

Thanks for your quick reply !

- I have the enable=yes set in cdr.conf
- I have cdr.so loaded, no other cdr related modules.
- Got the following trace on startup:  cdr.c:1093 do_reload: CDR simple logging enabled.

i added the following in /etc/init.d/asterisk to create the cdr-csv dir:
[ -d /var/log/asterisk/cdr-csv/ ] || mkdir -p /var/log/asterisk/cdr-csv
(This seems to be missing ...)
No joy ...

Then tried to manually create Master.csv ... nope ...

Tried to add the following to * startup script ...:
[ -f /var/log/asterisk/cdr-csv/Master.csv ] || touch /var/log/asterisk/cdr-csv/Master.csv

Tried to change permission to 0666 ...

Still nothing written to Master.csv  :-(

Spent hours on this with no success ...

Thanks for any cue ...

Noël



I had the same problem initially; I think I solved it for CSV cdr by manually creating the Master.csv file in the /var/log/asterisk/cdr-csv dir. I load only cdr_csv.so, no other cdr related modules (especially not app_cdr.so of course...).
You may want to check these settings.

Hans.

noelbou wrote:

- I have the enable=yes set in cdr.conf
- I have cdr.so loaded, no other cdr related modules.

I hope you mean cdr_csv.so? The "yes" entry is the default; the only enabled entry in my cdr.conf is the following:

[csv]                                                                          
usegmtime=yes ;log date/time in GMT

The contents of my 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)}"

Also the the cdr_manager.conf:

[general]
enabled = no

Maybe the missing clue is somewhere in here?
Like I wrote: I remember I had the same problem initially when upgrading from 1.2 to 1.4; but stuff now works correctly over here and I can't remember just exactly what it was that did the trick...

Hans.

UPDATE ...

I finally got the cdr-csv to be written ... (at last ...)

The problem is very simple but still not documented ..

What solved the problem is uncommenting the following 2 lines in cdr.conf
(and changing to 'no' since i did not want to use GMT)

[csv]                                                                         
usegmtime=no ;log date/time in GMT

I saw Hans that you had done it but since i didn't want to use GMT time ... i did not change this
(but did not expect it was a must for the Master.csv to be written)


The [cdr] section seems to be new in v1.4 BUT it is also commented in the
default cdr.conf file AND the Master.csv will no be written without  the [cdr] section
and at least 1 param ... See:
http://ip-forum.net/forum/index.php/top … g1395.html

+---------------------------------------------------+

So ... if i may suggest ... it would be a good idea to either modify the cdr.conf as above
or at least to doccument this in the cdr.conf file OR change * source so that these
params are just ignore if not present and allow writes to the Master.csv file (as in V1.2x)

Best ...

Noël

The discussion might have continued from here.