Missing MySQL CDR Index

Last modified by colinw on 2021/09/10 22:40

On this page

Symptoms

When starting the iSymphony V3 server, any of the following symptoms may present themselves:

  • The mysqld process consumes a large amount of CPU time for long periods of time
  • The java process for iSymphony consumes a large amount of CPU time for long periods of time
  • iSymphony appears to not start up completely, or there are missing pieces of the interface (for example, some sections of the settings page in the administration interface may not appear)
  • The error message "Timeout while waiting for recording executor to finish all threads" appears in the logs

Cause

iSymphony relies on CDR (Call Detail Record) entries to query information about call recordings in your system due to the fact that not all metadata about a recording can be placed in the recording file name for iSymphony to parse out. If you have a very large amount of CDR entries in your database these queries can take a very long time and one query needs to be made for each recording in your system.

Resolution

In order to speed up these queries you will need to index the uniqueid column in the Asterisk CDR database table. The steps to index the uniqueid column will vary based on the Asterisk configuration.

Below is an example on how to index the unique id column in a FreePBX based system utilizing a mysql database:

  1. Run the following command to get the database username and password. They will be labeled "AMPDBUSER" and "AMPDBPASS".

    cat /etc/freepbx.conf
  2. Next run the following command to log into the mysql database:

    mysql -u <database username> -p asteriskcdrdb
  3. Enter the database password when prompted.

  4. Run the following command to create the index:

    ALTER TABLE `cdr` ADD INDEX `uniqueid` (`uniqueid`);
  5. Run the following command to verify the index was created:

    SHOW INDEX FROM cdr;
  6. Type the following command to exit the mysql command line:

    \quit

Related Content

There is no valid license for Pro Macros. Please visit the Licenses section.

   
iSymphony