Author Topic: Getting Asterisk CDRs from MySQL database using Call Accounting Mate  (Read 19818 times)

sergey

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 48
    • View Profile
CAM 2.6.1.94 has built-in ability to query ODBC data sources for SMDR/CDR records. There is also special support for Asterisk-MySQL combination built on top of this functionality.

Following steps are necessary to install and configure CAM 2.6.1.94 onwards to collect CDR from MySQL server:

A. Download and install MySQL ODBC Connector 3.51:
1. The MySQL ODBC driver for Windows platform is available for download at http://mysql.com/downloads/connector/odbc/3.51.html
2. Install the downloaded driver on the same computer where CAM server is installed

B. Configure CAM to connect to the MySQL server, managing CDR records from Asterisk
1.   Open Configuration/PBX Communication page
2.   Activate Port tab on the page
3.   Select Asterisk-MySQL in the Port field on the tab
4.   This will show Asterisk-MySQL Parameters section with the fields listed below:
5.   MySQL Host (mandatory) must contain network name/IP address of the MySQL server
6.   MySQL User (optional) should contain MySQL user having access to the database and table storing CDR records from Asterisk
7.   MySQL Password (optional) should contain password for the above user
8.   CDR Database (mandatory) must contain name of the database storing CDR data from Asterisk
9.   While changing the fields above page fills ODBC Parameters section automatically, providing connection string and SQL statement
      necessary to connect to ODBC MySQL driver and query the MySQL server for data
10. Tt is not recommended to change fields in the ODBC Parameters section manually, except the 'Every' field which contains schedule
     for CDR record polling
11. Activate Driver tab and select Asterisk-MySQL in the PBX driver field
12. Press Save button to apply the changes and start polling of the MySQL server

C. Checking the MySQL connection
1. Current version of CAM has no function, allowing to test the connection, so immediately after saving the MySQL server parameters
    you will have to check main error log for any error and diagnosing information
2. To check the log activate Log files/Main link on the left bar menu and scroll the log to the latest messages
« Last Edit: July 12, 2005, 03:27:47 AM by Administrator »