I have a Debian 8.2, and I use a Asterisk 11
I’m trying to install CDR-Stats but I don’t know if is necessary to change any files in /etc/asterisk/res_odbc.conf or in cdr_manager.conf or any others files?
I use SQLite3 for my database see the file cdr_sqlite3_custom.conf
;
; Mappings for custom config file
;
[master] ; currently, only file "master.db" is supported, with only one table at a time.
table => cdr
columns => calldate, clid, dcontext, channel, dstchannel, lastapp, lastdata,source, destination, duration, billsec, disposition, amaflags, accountcode, uniqueid, userfield, test
values => '${CDR(start)}','${CDR(clid)}','${CDR(dcontext)}','${CDR(channel)}','${CDR(dstchannel)}','${CDR(lastapp)}','${CDR(lastdata)}','${CDR(src)}','${CDR(dst)}','${CDR(duration,f)}','${CDR(billsec,f)}','${CDR(disposition)}','${CDR(amaflags)}','${CDR(accountcode)}','${CDR(uniqueid)}','${CDR(userfield)}','${CDR(test)}'
Manage.conf
;
; Asterisk Call Management CDR
;
[general]
enabled = yes
; The "mappings" category can be used to define additional "key: value" pairs
; that will be included in the manager event. (after AccountCode, Source, etc).
;
; Each line like "varname => label" will include a "label: ${CDR(varname)}"
; in the generated event where ${CDR(varname)} its replaced with its value
;
;[mappings]
;rate => Rate
;carrier => Carrier
And my CLI
cdr-stats*CLI> cdr show status
Call Detail Record (CDR) settings
----------------------------------
Logging: Enabled
Mode: Simple
Log unanswered calls: No
Log congestion: No
* Registered Backends
-------------------
cdr_manager
csv
cdr_sqlite3_custom
cdr-custom
My sqlite is correct
sqlite> select * from cdr;
AcctId calldate clid dcontext channel dstchannel lastapp lastdata source destination duration billsec disposition amaflags accountcode uniqueid userfield test INTEGER
---------- ------------------- ---------- ---------- ----------------- ----------------- ---------- -------------- ---------- ----------- ---------- ---------- ----------- ------------- ----------- ------------ ---------- ---------- ----------
1 2015-11-30 17:10:05 2020 ramais SIP/2020-00000000 SIP/2020-00000001 Dial SIP/2020,60,tT 2020 2020 3.005739 0.000000 BUSY DOCUMENTATION 1448910605.0 0
2 2015-11-30 17:22:37 2020 ramais SIP/2020-00000002 SIP/2020-00000003 Dial SIP/2020,60,tT 2020 2020 2.492737 0.000000 BUSY DOCUMENTATION 1448911357.2 0
3 2015-11-30 17:22:56 2020 ramais SIP/2020-00000000 SIP/2020-00000001 Dial SIP/2020,60,tT 2020 2020 2.235693 0.000000 BUSY DOCUMENTATION 1448911376.0 0
4 2015-11-30 17:24:25 2021 ramais SIP/2021-00000003 SIP/2020-00000004 Dial SIP/2020,60,tT 2021 2020 4.532038 2.181802 ANSWERED DOCUMENTATION 1448911465.3 0
5 2015-12-01 10:25:11 2021 ramais SIP/2021-00000005 SIP/2020-00000006 Dial SIP/2020,60,tT 2021 2020 2.435696 0.000000 BUSY DOCUMENTATION 1448972711.5 0
6 2015-12-01 10:25:57 2021 ramais SIP/2021-00000008 SIP/2020-00000009 Dial SIP/2020,60,tT 2021 2020 3.970104 1.625434 ANSWERED DOCUMENTATION 1448972757.8 0
7 2015-12-01 10:55:56 2021 ramais SIP/2021-0000000a SIP/2020-0000000b Dial SIP/2020,60,tT 2021 2020 3.601228 0.000000 BUSY DOCUMENTATION 1448974556.1 0
8 2015-12-01 10:56:28 2021 ramais SIP/2021-0000000d SIP/2020-0000000e Dial SIP/2020,60,tT 2021 2020 8.034695 6.241365 ANSWERED DOCUMENTATION 1448974588.1 0
9 2015-12-01 11:05:13 2021 ramais SIP/2021-0000000f SIP/2020-00000010 Dial SIP/2020,60,tT 2021 2020 5.165651 3.265424 ANSWERED DOCUMENTATION 1448975113.1 0
10 2015-12-01 12:08:46 2021 ramais SIP/2021-00000011 SIP/2020-00000012 Dial SIP/2020,60,tT 2021 2020 3.746379 1.726299 ANSWERED DOCUMENTATION 1448978926.1
Thanks in advanced.