Backup/restore no CDR - verified permissions

I had FreePBX 2.7 running on asterisk 1.4.29. Did a backup/restored to a different machine running same FreePBX version but using asterisk 1.6.2.6. Everything works great (excellent!) except for CDR. When I go to the reports page I get the dreaded “No data found !!!”. I logged into mysql using the asterisk user and could select everything from the CDR table without issue. I also verified apache is running under the asterisk user. I’m sure it is something simple I’m missing so looking for a tip to help me clear this up.

Rob

Did you install Asterisk-addons?

Yes, all addons 1.6.2.0 installed.

cdr_mysql.conf is correct and looking something like this:

[global]
hostname = localhost
dbname=asteriskcdrdb
password = amp109
user = asteriskuser
userfield=1

What is the result of typing this at asterisk cli:

module show like cdr

It has the right credentials in cdr_mysql.conf and I’ve verified that running mysql under these credentials has access to the cdr table (simple select count(*) from cdr in the asteriskcdrdb database).

Output from CLI is:

Module Description Use Count
func_cdr.so Call Detail Record (CDR) dialplan functi 0
app_cdr.so Tell Asterisk to not maintain a CDR for 0
app_forkcdr.so Fork The CDR into 2 separate entities 0
cdr_csv.so Comma Separated Values CDR Backend 0
cdr_manager.so Asterisk Manager Interface CDR Backend 0
cdr_custom.so Customizable Comma Separated Values CDR 0

Thanks for you help by the way.

Rob

Yup, you are missing:

cdr_addon_mysql.so             MySQL CDR Backend 

Try to load it by:

module load cdr_addon_mysql

If that fails you probably forgot to make install after make (just guessing)

When I do make menuselect the app_addon_sql_mysql has the dreaded 3 XXX’s by it meaning a dependency is not available. the mysqlclient interface is available though so it looks like some more troubleshooting to find out the issue. I’ll see what the problem is related to that module building.

Rob

Just needed to install mysql-devel (apt-get install libmysql+±dev) and rebuild asterisk addons. I’ve been building with CentOS so I missed this in the migration to ubuntu.

Thanks for your help.

Rob

I did the same CLI module check he did and got the same result - same 7 modules loaded, apparently missing cdr_addon_mysql.so.

I tried the module load you suggested above and it did nothing.

When I check the modules folder I don’t see cdr_addon_mysql.so. So apparently it didn’t install when I installed FreePBX (FPBX 2.8.8.1 Asterisk 1.4.26.2) Forgive the newbie question but…how do I get it?