How do I repair asteriskcdrdb?

Hi gurus

Just did a Free PBX module upgrade and now phones are cutting out intermittently, seem to have high memory problems on the server - showing Web Server error and 100% swap and CPU useage - and these error messages have appeared in the log files.

file://///trixbox1/share/var/log/messages - says it is killing processes due to lack of swap and high memory

file://///trixbox1/share/var/log/asterisk/messages - is showing intermittent problems reaching our phones with this error message

ERROR[14821] cdr_addon_mysql.c: mysql_cdr: Failed to insert into database: (145) Table ‘./asteriskcdrdb/cdr’ is marked as crashed and should be repaired.

Any suggestions on how to go about the repair please?


for starters, there is clearly something seriously wrong with your system from what you describe that you will want to determine and it is very unlikely to be related to FreePBX 2.4. As far as repairing the database, you might wan to try looking at:

and see if that can help you. You can also look at phpMyAdmin as it can try to do the repairs from the GUI if you are more comfortable with that.

Hi gurus
I’m an old guy with the attitude, if it isn’t broken, don’t fix it!
That’s why we are running FreePBX 2.4.0 with Trixbox with 6 SIP SNOM phones and 4 Zap channels. No problems until now (see below).


The PBX window advising on available upgrades says:
core (current:
conferences (current:
paging (current:
framework (current:
queues (current:
recordings (current:
music (current:

But I’m too scared to download anything in case it goes wrong!
Can anyone suggest an order to install the updates, to minimise problems please??
And do we do Trixbox first then PBX??


On some days the phones now behave erratically. The symptoms are…

Trixbox CE shows physical memory is >95% (normally <40%).

This error is reported with the Cron Manager: “The following commands failed with the listed error /var/lib/asterisk/bin/module_admin listonline (255)
Added 25 minutes ago (cron_manager.EXECFAIL).”

The error log files show:
[Feb 19 08:57:51] WARNING[2467] chan_sip.c: Remote host can’t match request BYE to call ‘[email protected]’. Giving up.
[Feb 19 09:03:12] WARNING[23276] app_macro.c: Context ‘macro-dialout-trunk-predial-hook’ for macro ‘dialout-trunk-predial-hook’ lacks ‘s’ extension, priority 1.

Feb 19 10:56:54 trixbox1 yum-updatesd-helper: error getting update info: Cannot retrieve repository metadata (repomd.xml) for repository: trixbox. Please verify its path and try again
Feb 19 10:58:17 trixbox1 smbd[23535]: [2010/02/19 10:58:17, 0] smbd/nttrans.c:call_nt_transact_ioctl(2481)
Feb 19 10:58:17 trixbox1 smbd[23535]: call_nt_transact_ioctl(0x900eb): Currently not implemented.
Feb 19 11:00:17 trixbox1 smbd[23539]: [2010/02/19 11:00:17, 0] lib/util_sock.c:get_peer_addr(1232)

A reboot of Trixbox seems to fix things for a few days, with immediate return of CPU memory.
However, now Trixbox fails on the shutdown and displays this message: "Starting killall: unloading zaptel. Hardware drivers: error module wctdm is in use, module zaptel is in use by wctdm."
On hard reboot, everything loads OK but at the final stage of loading Asterix, the Trixbox server gives the message “error fetching interface information”.

I am an IT novice. This is all strange to me.
Can anyone make any sense of it please???

Kind regards