CDR not workign

my current server is running for some time now
it was installed with freepbx 2.7 and asterisk 1.4

it is currently running asterisk 1.8 and freepbx

i found the CDR database empty
so this has never worked before

i read a lot about how to fix it with asterisk 1.4 on a X86 machine but since i have asterisk 1.8 on a X64 machine i does not want to bring down my production server

i checked it on my test server but here the CDR database works fine so i can’t test anything here

what i have done so far:
create a system image for the machine in case it is broaken
take a look in the mysql database wich looks fine (there is a empty database for CDR)

hostname*CLI> module show like cdr
Module                         Description                              Use Count                  Customizable Comma Separated Values CDR  0                 Asterisk Manager Interface CDR Backend   0                     Comma Separated Values CDR Backend       0                  Customizable syslog CDR Backend          0                    Call Detail Record (CDR) dialplan functi 0                     Tell Asterisk to not maintain a CDR for  0                 Fork The CDR into 2 separate entities    0
7 modules loaded

hostname*CLI> module show like mysql does not give anything back

is there anyone who can help me with this?

How did you build your system, by hand or by a distro?

You are quite right to look for mysql. You need the module. I had a similar problem a while back and had a second test system installed with all of the same versions and copied the over from one system to the other and that seemed to work for me.

to answer the first question i used the distro to install the system some time ago
since the time there are a lot updates installed

i am afraid i can’t copy the file since my test server is X86 and my production server is X64

if you have the file can you please send it to fnetonline ‘and then the at sign’ gmail ‘point’ com

do i simply need to put the file in the right location or do i need to tell asterisk that there is a new module

Sorry, both of my systems are 32-bit. It only worked for me I think because I knew that both systems were exactly the same.

Try “chown -R asterisk. /var/lib/php/session”

Mustard - That makes no sense, he doesn’t even have the MySQL CDR module.

Also changing the ownership of /var would render the system inoperable.

Back to the problem at hand.

Execute an ls -l /usr/lib/asterisk/modules | grep -i cdr and post the output.

Also go to Asterisk CLI and enter module load cdr_mysql and let us know what the output is.

Worst case scenario is somehow is corrupt we can use rpm to reinstall Asterisk from the repo.

My guess is that you never installed the mysql rpm.

try: rpm -q asterisk18-addons-mysql

if it says that it is not installed…then you should should install it.

Thanks for the replay
ls -l /usr/lib/asterisk/modules | grep -i cdr

-rwxr-xr-x 1 root root 164932 Jan 30 2012 -rwxr-xr-x 1 root root 179751 Jan 30 2012 -rwxr-xr-x 1 root root 181367 Jan 30 2012 -rwxr-xr-x 1 root root 179484 Jan 30 2012 -rwxr-xr-x 1 root root 178949 Jan 30 2012 -rwxr-xr-x 1 root root 185498 Jan 30 2012 -rwxr-xr-x 1 root root 177925 Jan 30 2012

fnet-bel10*CLI> module load cdr_mysql
Unable to load module cdr_mysql
Command 'module load cdr_mysql' failed.
rpm -q asterisk18-addons-mysql
package asterisk18-addons-mysql is not installed

how can i “safe for a production server” install this addons?

Remind me again how this system was installed?

Can you post output of ‘yum list | grep -i asterisk’

BTW, thanks for using code tags, makes it easy on the old eyes.

the first question was alredy answerd

[quote]to answer the first question i used the distro to install the system some time ago
since the time there are a lot updates installed[/quote]

For the second one there is a lot of information

# yum list | grep -i asterisk
asterisk.x86_64                      installed       
asterisk-core.x86_64                 installed       
asterisk-dahdi.x86_64                installed       
asterisk-doc.x86_64                  installed       
asterisk-sounds-core-en-gsm.noarch   1.4.21-1_centos5           installed       
asterisk-sounds-core-en-ulaw.noarch  1.4.21-1_centos5           installed       
asterisk-sounds-extra-en-gsm.noarch  1.4.11-1_centos5           installed       
asterisk-voicemail.x86_64            installed       
asterisknow-version.noarch           1.7.1-3_centos5            installed       
asterisk.x86_64                     asterisk-1.8    
asterisk-addons.x86_64              asterisk-1.8    
asterisk-addons-bluetooth.x86_64         asterisk-1.8    
asterisk-addons-core.x86_64         asterisk-1.8    
asterisk-addons-mysql.x86_64         asterisk-1.8    
asterisk-addons-ooh323.x86_64         asterisk-1.8    
asterisk-alsa.x86_64                asterisk-1.8    
asterisk-codec_g729a.x86_64          2:1.8.4_3.1.5-2_centos5    digium-1.8      
asterisk-codec_siren14.x86_64        1.8.0_1.0.5-2_centos5      digium-1.8      
asterisk-codec_siren7.x86_64         1.8.0_1.0.5-2_centos5      digium-1.8      
asterisk-configs.x86_64             asterisk-1.8    
asterisk-core.x86_64                asterisk-1.8    
asterisk-curl.x86_64                asterisk-1.8    
asterisk-dahdi.x86_64               asterisk-1.8    
asterisk-devel.x86_64               asterisk-1.8    
asterisk-doc.x86_64                 asterisk-1.8    
asterisk-gui.noarch                  2.1.0-0.rc1.1_centos5      asterisk-current
asterisk-misdn.x86_64               asterisk-1.8    
asterisk-odbc.x86_64                asterisk-1.8    
asterisk-ogg.x86_64                 asterisk-1.8    
asterisk-pgsql.x86_64               asterisk-1.8    
asterisk-res_fax.x86_64              1:  digium-1.6.2    
asterisk-res_fax_digium.x86_64       1:1.8.4_1.3.0-2_centos5    digium-1.8      
asterisk-resample.x86_64            asterisk-1.8    
asterisk-skypeforasterisk.x86_64     1.8.0_1.1.4-4_centos5      digium-1.8      
asterisk-snmp.x86_64                asterisk-1.8    
asterisk-sounds-core-en-alaw.noarch  1.4.21-1_centos5           asterisk-current
                                     1.4.21-1_centos5           asterisk-current
                                     1.4.21-1_centos5           asterisk-current
                                     1.4.21-1_centos5           asterisk-current
asterisk-sounds-core-es-alaw.noarch  1.4.21-1_centos5           asterisk-current
asterisk-sounds-core-es-gsm.noarch   1.4.21-1_centos5           asterisk-current
asterisk-sounds-core-es-ulaw.noarch  1.4.21-1_centos5           asterisk-current
asterisk-sounds-core-fr-alaw.noarch  1.4.21-1_centos5           asterisk-current
asterisk-sounds-core-fr-gsm.noarch   1.4.21-1_centos5           asterisk-current
asterisk-sounds-core-fr-ulaw.noarch  1.4.21-1_centos5           asterisk-current
asterisk-sounds-extra-en-alaw.noarch 1.4.11-1_centos5           asterisk-current
asterisk-sounds-extra-en-ulaw.noarch 1.4.11-1_centos5           asterisk-current
                                     0.0-4_centos5              asterisk-current
                                     0.0-4_centos5              asterisk-current
asterisk-sqlite3.x86_64             asterisk-1.8    
asterisk-tds.x86_64                 asterisk-1.8    
asterisk-voicemail.x86_64           asterisk-1.8    
asterisk14.x86_64                    1.4.42-3_centos5           asterisk-current
asterisk14-addons.x86_64             1.4.13-2_centos5           asterisk-current
asterisk14-addons-core.x86_64        1.4.13-2_centos5           asterisk-current
asterisk14-addons-mysql.x86_64       1.4.13-2_centos5           asterisk-current
asterisk14-addons-ooh323.x86_64      1.4.13-2_centos5           asterisk-current
asterisk14-alsa.x86_64               1.4.42-3_centos5           asterisk-current
asterisk14-codec_g729a.x86_64        2:1.4_3.1.5-2_centos5      digium-current  
asterisk14-configs.x86_64            1.4.42-3_centos5           asterisk-current
asterisk14-core.x86_64               1.4.42-3_centos5           asterisk-current
asterisk14-curl.x86_64               1.4.42-3_centos5           asterisk-current
asterisk14-dahdi.x86_64              1.4.42-3_centos5           asterisk-current
asterisk14-devel.x86_64              1.4.42-3_centos5           asterisk-current
asterisk14-doc.x86_64                1.4.42-3_centos5           asterisk-current
asterisk14-misdn.x86_64              1.4.42-3_centos5           asterisk-current
asterisk14-odbc.x86_64               1.4.42-3_centos5           asterisk-current
asterisk14-ogg.x86_64                1.4.42-3_centos5           asterisk-current
asterisk14-pgsql.x86_64              1.4.42-3_centos5           asterisk-current
asterisk14-res_fax.x86_64            1:1.4_1.3.0-1_centos5      digium-current  
asterisk14-res_fax_digium.x86_64     1:1.4_1.3.0-1_centos5      digium-current  
asterisk14-skypeforasterisk.x86_64   1.4_1.1.4-1_centos5        digium-current  
asterisk14-snmp.x86_64               1.4.42-3_centos5           asterisk-current
asterisk14-tds.x86_64                1.4.42-3_centos5           asterisk-current
asterisk14-voicemail.x86_64          1.4.42-3_centos5           asterisk-current
                                     1.4.42-3_centos5           asterisk-current
                                     1.4.42-3_centos5           asterisk-current
asterisk16.x86_64                   asterisk-current
asterisk16-addons.x86_64             asterisk-current
asterisk16-addons-bluetooth.x86_64          asterisk-current
asterisk16-addons-core.x86_64          asterisk-current
asterisk16-addons-mysql.x86_64          asterisk-current
asterisk16-addons-ooh323.x86_64          asterisk-current
asterisk16-alsa.x86_64              asterisk-current
asterisk16-codec_g729a.x86_64        2:  digium-current  
asterisk16-codec_siren14.x86_64    digium-current  
asterisk16-codec_siren7.x86_64    digium-current  
asterisk16-configs.x86_64           asterisk-current
asterisk16-core.x86_64              asterisk-current
asterisk16-curl.x86_64              asterisk-current
asterisk16-dahdi.x86_64             asterisk-current
asterisk16-devel.x86_64             asterisk-current
asterisk16-doc.x86_64               asterisk-current
asterisk16-misdn.x86_64             asterisk-current
asterisk16-odbc.x86_64              asterisk-current
asterisk16-ogg.x86_64               asterisk-current
asterisk16-pgsql.x86_64             asterisk-current
asterisk16-res_fax.x86_64            1:  digium-current  
asterisk16-res_fax_digium.x86_64     1:  digium-current  
asterisk16-resample.x86_64          asterisk-current
asterisk16-skypeforasterisk.x86_64    digium-current  
asterisk16-snmp.x86_64              asterisk-current
asterisk16-sqlite3.x86_64           asterisk-current
asterisk16-tds.x86_64               asterisk-current
asterisk16-voicemail.x86_64         asterisk-current
asterisk18.x86_64                    asterisk-current
asterisk18-addons.x86_64             asterisk-current
asterisk18-addons-bluetooth.x86_64          asterisk-current
asterisk18-addons-core.x86_64          asterisk-current
asterisk18-addons-mysql.x86_64          asterisk-current
asterisk18-addons-ooh323.x86_64          asterisk-current
asterisk18-alsa.x86_64               asterisk-current
asterisk18-codec_g729a.x86_64        2:1.8.4_3.1.5-1_centos5    digium-current  
asterisk18-codec_siren14.x86_64      1.8.0_1.0.5-1_centos5      digium-current  
asterisk18-codec_siren7.x86_64       1.8.0_1.0.5-1_centos5      digium-current  
asterisk18-configs.x86_64            asterisk-current
asterisk18-core.x86_64               asterisk-current
asterisk18-curl.x86_64               asterisk-current
asterisk18-dahdi.x86_64              asterisk-current
asterisk18-devel.x86_64              asterisk-current
asterisk18-doc.x86_64                asterisk-current
asterisk18-misdn.x86_64              asterisk-current
asterisk18-odbc.x86_64               asterisk-current
asterisk18-ogg.x86_64                asterisk-current
asterisk18-pgsql.x86_64              asterisk-current
asterisk18-res_fax_digium.x86_64     1:1.8.4_1.3.0-1_centos5    digium-current  
asterisk18-resample.x86_64           asterisk-current
asterisk18-skypeforasterisk.x86_64   1.8.0_1.1.4-1_centos5      digium-current  
asterisk18-snmp.x86_64               asterisk-current
asterisk18-sqlite3.x86_64            asterisk-current
asterisk18-tds.x86_64                asterisk-current
asterisk18-voicemail.x86_64          asterisk-current
asterisknow-version.noarch           2.0.0-4_centos5            asterisk-current
dahdi-linux.x86_64                   2.6.2-1_centos5            asterisk-current
dahdi-linux-devel.x86_64             2.6.2-1_centos5            asterisk-current
dahdi-tools.x86_64                   2.6.2-1_centos5            asterisk-current
dahdi-tools-doc.x86_64               2.6.2-1_centos5            asterisk-current
freepbx.x86_64                       2.10.0rc1-1_centos5        asterisk-current
freepbx-dahdiconfig.noarch           2.8.0-2_centos5            asterisk-current
freepbx-digium_phones.noarch         asterisk-current
freepbx-digiumaddoninstaller.noarch  2.8.0-4_centos5            asterisk-current
libopenr2-devel.x86_64               1.2.0-1_centos5            asterisk-current
libopenr2-doc.x86_64                 1.2.0-1_centos5            asterisk-current
libpri.x86_64                        1.4.12-1_centos5           asterisk-current
libpri-devel.x86_64                  1.4.12-1_centos5           asterisk-current
libresample.x86_64                   0.1.3-1_centos5            asterisk-current
libresample-devel.x86_64             0.1.3-1_centos5            asterisk-current
libss7-devel.x86_64                  1.0.2-1_centos5            asterisk-current
libtonezone.x86_64                   2.6.2-1_centos5            asterisk-current
libtonezone-devel.x86_64             2.6.2-1_centos5            asterisk-current
mISDN.x86_64                         asterisk-current
mISDN-devel.x86_64                   asterisk-current
mISDNuser.x86_64                     asterisk-current
mISDNuser-devel.x86_64               asterisk-current
udhcp.x86_64                         0.9.9-1_centos5            asterisk-current
yum-repos-asterisk.noarch            1.0.0-1_centos5            asterisk-current

. . . to answer the first question i used the distro to install the system . . .

Is insufficient info, as there are several distros, you apparently used AsteriskNow though and older versions (than a few weeks) do not have mysql cdr working. That should be a good starting clue as to how to install the missing resources.

i could not remember how i did the installation some time ago
i just take a look at the datastore of my VM and found
since i updated everything some time ago it is not the same as the current installation

i have really bad experience with the freepbx back-up solutions so i doesn’t want to re-install the hole machine

Your current AsteriskNow is 2.0.0-4 (you should look at what you post :wink: . It’s mysql cdr does not work. There are recipes for fixing that on Google.

Your FreePBX version is 2.10.0rc1-1 you can only backup and restore at the same level of FreePBX any bad experiences are probably because you didn’t follow that golden rule.

Update your modules in FreePBX to the latest 2.10, make a backup, install a new system maybe the Schmooze one here that also uses 2.10, copy the backup file somewhre and restore it to the new machine. If you only have one machine, get another hardrive for the new system and swap it out before the new install, Do it on Sunday Morning at 2:00 am

Yes, you are missing the mysql module, part of addons.

yum install asterisk-addons.x86_64
yum install asterisk-addons-core.x86_64
yum install asterisk-addons-mysql.x86_64

That should get you close, though you may now have to manually config the .conf file.

As Dicko said, many tutorials on this. There are many distro’s out on the net. We assumed you meant our distro since you are here. It’s very annoying to have to go on a 12 message fact finding mission to find out the facts. If you had said Asterisk Now it’s a known issue. Send my your paypal address so I can send you a bill.

re-install asterisk-addons by YUM has fixed this issue

thanks for the support