Setup MySQL for storing call records

In this chapter you can learn how to configure the Ozeki Phone System to be able to store call records using a MySQL database server. You will be provided with the installation steps, the configuration details such as the database connection string, database connection type and with the recommended database table layout.

To be able to store calling information to a MySQL database you will need to install the MyODBC driver to your computer. This driver can be downloaded from the MySQL website. We recommended to use the newest drivers, because they supports unicode characters.

After the MyODBC driver has been installed on your computer, you need to configure a Call reporter SQL API in the Ozeki Phone System.

During the configuration you should choose the following database connection type:

Odbc

You should use the next database connection string properly for your MyODBC driver:

Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;Database=OzekiPBX;User=ozeki;Password=qwe123;Option=4;

The database connection strings have to be modified to match your database. You should use the ip address or the hostname of your database server instead of the "127.0.0.1". Replace "OzekiPBX" to the name of you database and replace "ozeki" and "qwe123" to the username and password that can be used to connect to your database server.

The connection string and the connection type should be entered on the Call Reporter SQL API configuration form.

specifying connection string for mysql database
Figure 1 - Specifying the connection string for the MySQL database

In the following figure you can see the SQL templates tab of the Call reporting API. Here, you need to provide the SQL queries that will store the main changes of the calls (e.g. when a call started, forwarded or finished).

specifying sql queries
Figure 2 - Specifying the SQL queries

After the Call Reporter SQL API has been configured in the Ozeki Phone System, the only thing left to do is to create the database tables for Call Reporter SQL API. We recommend you to use the following table layout:

CREATE TABLE `ozpbxcalls` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `starttime` datetime DEFAULT NULL,
  `source` varchar(150) DEFAULT NULL,
  `callerid` varchar(150) DEFAULT NULL,
  `dialed` varchar(150) DEFAULT NULL,
  `destination` varchar(150) DEFAULT NULL,
  `duration` int(10) DEFAULT NULL,
  `callstate` varchar(150) DEFAULT NULL,
  `recordurl` varchar(150) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=UTF8;

If you have any questions or need assistance, please contact us at info@ozekiphone.com.

Dig deeper!
People who read this also read...

More information