Setup PostgreSQL for logging PBX events

In this chapter you can learn how to log PBX events of Ozeki Phone System using a PostgreSQL database server. In this guide you can see the installation steps, the database connection string, the database connection type and the recommended database table layout for PostgreSQL database.

If you would like to save the PBX events with PostgreSQL database server, follow this detailed guide.

As the PostgreSQL database requires Open DataBase Connectivity (ODBC), select Odbc in the Connection string type dropdown menu. The Odbc driver for PostgreSQL can be available at the following webpage: http://pgfoundry.org/projects/psqlodbc/.

Odbc

Replace the default database connection string with the one for the PostgreSQL database in the Connection string template:

DRIVER={PostgreSQL};SERVER=YourServerIP;port=5432;DATABASE= YourDatabaseName;UID=YourUsername;PWD=YourPassword

Modify the variables in the connection string according to your needs.

The connection string and the connection type should be entered on the Database Logging SQL API configuration form.

specifying connection string for postgresql database
Figure 1 - Specifying the connection string for the PostgreSQL database

In the following figure you can see the SQL templates tab of the Database logging API. Here, you need to provide the SQL queries that will store PBX events.

specifying sql queries for storing pbx events
Figure 2 - Specifying the SQL queries for storing PBX events

After the Database Logging SQL API has been configured in the Ozeki Phone System, you need to create the database tables for Database Logging SQL API. Use the following table layout:

-- -----------------------------------------------------
-- Table `OzekiPBX`.`ozpbxlog`
-- -----------------------------------------------------
CREATE TABLE ozpbxlog
(
    id serial PRIMARY KEY, 
    Time date NOT NULL,
    Thread integer NOT NULL,
    LogLevel varchar(20) NOT NULL,
    Logger varchar(255) NOT NULL,
    Message text NOT NULL
)

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