1.5 Administrator's Guide

  1. Home
  2. Docs
  3. 1.5 Administrator’s Guide
  4. Monitoring the system
  5. Call Detail Records (CDR)
  6. Accessing the CDR database

Accessing the CDR database

To access the records in the MySQL CDR database remotely, the Com.X needs to be configured to allow an external user access.

1. Configure the Com.X to allow remote connections to the MySQL server by
    editing /etc/mysql/my.cnf and changing the bind-address field to 0.0.0.0

Note: This poses a security risk and remote access should be restricted by a proper firewall.

2. Restart the MySQL server:
    sudo /etc/init.d/mysql restart

3. Restart the comma-gui service:
    sudo /etc/init.d/commagui restart

4. Log into the mysql server as root from the Com.X console:
    mysql ­u root

5. Configure a cdruser with read access to the CDR database:
   GNT SELECT ON asteriskcdrdb.* TO cdruser@’%’ IDENTIFIED BY ‘password’;
   FLUSH PRIVILEGES;

6. ConfigurX your SQL client to point to the server, with username cdruser and
    the password as configured, on the default port 3306, and with database
    schema asteriskcdrdb.