cdr_mysql stopped working

Home » Asterisk Users » cdr_mysql stopped working
Asterisk Users 4 Comments

I did an upgrade to the SVN trunk on the 12/9 and when I looked in my mysql
table for CDR’s today there are no entries since the update.
I have rebuilt and re-installed and re-started asterisk still no CDR’s
flowing to mysql. I did not change any configs. I checked to make sure that
the cdr_mysql option was selected under the make menu options. The module
shows it is there when I do a modules show. I don’t get any errors saying
it can’t write to the table. My voicemail settings are pulling from the
same server.

Any ideas on what I could try to fix this or how I could test to see what
is causing it?


4 thoughts on - cdr_mysql stopped working

  • Rebooting is a good clue. You could check your firewall settings.
    Firewalls can stop mysql connections.

    Try manually connecting to the mysql server from the asterisk system
    and see what happens.

  • You can also enter into the CLI in order to see if you can spot any
    error regarding cdr_mysql, or ‘duplicated value for key…’ after hangin
    up a call.

    There might be a corruption in the ‘cdr’ table (I’ve seen this
    sometimes). You could try a ‘repair table cdr’ from the MySQL CLI.

    Note: Sometimes, corrumptions in myISAM tables not always produce the
    data to be unaccessible, but just make it impossible to insert new records.

    David Backeberg wrote:

  • David

    I got the svn trunk again and did a make clean and rebuilt the install and
    all started to work again. My guess is that it looks like the mysql client
    code was out of sync with the server version.

    All is good again.


  • Jose

    Thanks for your response. It appears that the issue was that the mysql
    client drivers were updated when I installed some mono updates and I had to
    recompile asterisk the system was actually writing completely blank entries
    for every call. Once asterisk was compiled using the newer mysql client lib
    things started to work again. The moral of the story is if you update
    anything on the box that may change mysql at all you should do a complete
    make clean and recompile.