Issue with CDR and re-compiling Addon Makefile

Hello All,

I have been running FreePBX for a week and today I went to Report tab and don’t see any data. I then checked Master.csv and CDRs are stored in that file. I’d the data to be written to mysql and not csv.



hostname = localhost
password = fpbx
user = freepbx

I logged in with the same user and pass to mysql and works. so we know it’s not the user/pass.

I came across a post and said to create a empty cdr.conf… done, issue still there. by the way, I don’t know why cdr.conf was missing…

Install mysql-deve package… rebooted the server… still same thing…
Verified amportal.conf, all set and correct…

updated freepbx from 2.5.1 to 2.5.23, also update Freepbx framework. no luck.

CLI returns:

localhostCLI> cdr status
CDR logging: enabled
CDR mode: simple
CDR output unanswered calls: no

it doesn’t say anything about mysql. So I have decided to re-compile Asterisk-Addons but I’m getting:

[CC] cdr_addon_mysql.c -> cdr_addon_mysql.o
cdr_addon_mysql.c:26:22: error: asterisk.h: No such file or directory
cdr_addon_mysql.c:29:29: error: asterisk/config.h: No such file or directory
cdr_addon_mysql.c:30:30: error: asterisk/options.h: No such file or directory
cdr_addon_mysql.c:31:30: error: asterisk/channel.h: No such file or directory
cdr_addon_mysql.c: In function ‘reload’:
cdr_addon_mysql.c:502: error: ‘mysql_lock’ undeclared (first use in this function)
cdr_addon_mysql.c: At top level:
cdr_addon_mysql.c:510: error: expected ‘)’ before string constant
make[1]: *** [cdr_addon_mysql.o] Error 1
make: *** [cdr] Error 2

mysql-devel already installed. Since I used AsteriskNOW to install FreePBX and Asterisk then I think that I’m missing the source file or something and Makefile is looking in the wrong Path…

so I download the same version of Asterisk to /usr/src, how can I point the Makefile to read from that folder… or is it something else that I’m missing


I came across a post on

#yum install asterisk-addons-mysql

then #amportal stop

#amportal start

fixed the issue.