SOLVED Empty CDR

Joined
May 22, 2013
Messages
301
Reaction score
44
Hello, I have nothing in my CDR at all and don't know what point it stopped recording. The only change I made is in December I upgraded to Asterisk 11.20.0.

I am using a Raspberry Pi (original version model 'B') with Incredible PBX 3.11. I have FreePBX 2.11.0.35.

CDR is empty, if I go to asteriskcdrdb in myPHP cdr has 0 rows.

Code:
incrediblepbx*CLI> cdr show status

Call Detail Record (CDR) settings
----------------------------------
  Logging:  Enabled
  Mode:  Simple
  Log unanswered calls:  No
  Log congestion:  No

* Registered Backends
  -------------------
  csv
  cdr-custom

Code:
incrediblepbx*CLI> module show like mysql
Module  Description  Use Count
0 modules loaded
incrediblepbx*CLI>

Code:
incrediblepbx*CLI> module load cdr_mysql.so
Unable to load module cdr_mysql.so
Command 'module load cdr_mysql.so' failed.

I am now at the end of my expertise with databases and this config, can anyone help please? I am guessing you will need me to try and post more info so just tell me what you want and I'll post it, thanks :)
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
I have nothing in mine either. If I open the time back to 2015, a bunch of July 2015 x701 items show up. That is before my install.

huh?
 
Joined
May 22, 2013
Messages
301
Reaction score
44
I have checked /var/log/asterisk/cdr-csv and calls are still being recorded in here so Asterisk is recording them, seems to be some sort of database problem to get them reporting to FreePBX. Databases are not my thing at all and I feel really stuck.
 

sko001

Member
Joined
Jun 3, 2013
Messages
52
Reaction score
8
Same here. I just upgraded to Asterisk 11.21.2 and all records before the upgrade show up in CDR, nothing after the upgrade however. When looking at the tail of Master.csv it did record all calls made/received after the upgrade.
 
Joined
May 22, 2013
Messages
301
Reaction score
44
Another update:
Code:
root@incrediblepbx:~# isql -v MySQL-asteriskcdrdb asteriskuser rasp_amp
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect

Plus
Code:
# apt-get install unixodbc-dev libmyodbc libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqlclient-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  libnet-daemon-perl libplrpc-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libltdl-dev libodbc1 odbcinst odbcinst1debian2 unixodbc
Suggested packages:
  libtool-doc odbc-postgresql tdsodbc unixodbc-bin
Recommended packages:
  libtool
The following NEW packages will be installed:
  libltdl-dev libmyodbc libodbc1 odbcinst odbcinst1debian2
  unixodbc unixodbc-dev
 
Joined
May 22, 2013
Messages
301
Reaction score
44
I have yet another update and this may start shedding light. I did a make menuconfig and under CDR these are enabled:
CDR adaptive odbc,
Custom
Manager
Syslog
CSV
Odbc
Sqlite 3 custom

These are XXX out:
Pgsql
Radius
TDs

And this is the interesting deprecated one:
CDR sqlite

Am I getting warmer?

Edit - I have realised I am not getting warmer since asterisk is doing its job otherwise the master.csv file would be empty so it's something to do with how asteriskcdrdb obtains its data from there. Now I'm stuck again and out of new ideas, over to anyone else please?
 
Last edited:
Joined
May 22, 2013
Messages
301
Reaction score
44
I found this online http://www.minestron.it/asterisk/cdr-de-asterisk-usando-odbc-no-mas-mysql

It seems to describe switching to odbc.

I can get the guide working right down to this section:


Code:
SQL> select * from cdr limit 1
---------
SQLRowCount returns 1
1 rows fetched

I get this
Code:
SQL> select * from cdr limit 1
+--------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+-----------+-----------+----------------------------------------------+-----------+---------------------+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+
| calldate  | clid  | src  | dst  | dcontext  | channel  | dstchannel  | lastapp  | lastdata  | duration  | billsec  | disposition  | amaflags  | accountcode  | uniqueid  | userfield  | did  | recordingfile  | cnum  | cnam  | outbound_cnum  | outbound_cnam  | dst_cnam  |
+--------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+-----------+-----------+----------------------------------------------+-----------+---------------------+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+
+--------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+---------------------------------------------------------------------------------+-----------+-----------+----------------------------------------------+-----------+---------------------+---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+-----------------------------------------+
SQLRowCount returns 0
SQL>
Where am I going wrong?
 
Joined
May 22, 2013
Messages
301
Reaction score
44
Finally solved it, here's the solution I found to help others


.I used the link in post 8 along with info on this thread
http://chrismendes.com/2014/06/27/mysql-cdr-for-asterisk-w-odbc/

I installed the dependencies on the link above, then I edited the odbc.INI and odbcinst.INI in line with the link in my last post to match settings as the passwords and user names were right.

I then went to the source dir of asterisk and did ./configure, then make menuselect ensuring func_odbc and res_odbc were selected. I then did make and make install.

Then I went into freepbx and config settings, edited res_odbc and CDR_odbc.conf files to match those in the link in my last post, except I did not edit the additional. Conf file, I edited the ordinary. Conf file.

Amportal restart and it came back up, what a relief. Hope this helps others.
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
@wardmundy - is this rigmarole above all needed to get this working? Just asking cuz wasn't this a working item before release of IPBX13-12.x?
 

SMTC

Member
Joined
Jan 22, 2009
Messages
190
Reaction score
13
If a wipe/reinstall solves the CDR issue (and others like GVAUTH), it looks easier IMHO than the above patchingand rebuild. I expect I have a high chance of munging the fix and ending up with a dead machine only to start again anyways.

@wardmundy - has there been fixes to the distro of late? I don't mind playing around a bit, but I prefer a simple tried and true working version to start with. To me it seems like PIAF of days gone by worked better out of the gate.
 

Members online

Forum statistics

Threads
25,821
Messages
167,814
Members
19,246
Latest member
abuhyder
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top