Setup Oracle making and accepting calls using a Database

In this chapter you can learn about how to make and accept calls using a Oracle database server with your Ozeki Phone System. In this guide you can get information about the installation steps, the database connection string, the database connection type and the database table layout for Oracle database server.

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

OleDb

You should use the next database connection string:

Provider=SQLNCLI;Server=127.0.0.1;Database=OzekiPBX;UID=ozeki;PWD=qwe123;

The database connection string have to be modified to match your database.

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

specifying connection string for oracle database
Figure 1 - Specifying the connection string for the Oracle database

Figure 2 shows the SQL queries that will be used if there is an incoming call.

sql queries for making outgoing calls
Figure 2 - SQL queries for making outgoing calls

Under the Incoming calls tab, you need to provide the SQL queries that will be used when there is an incoming call. Figure 3 shows the SQL query that you need to use.

sql queries for accepting incoming calls
Figure 3 - SQL queries for accepting incoming calls

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

-- -----------------------------------------------------
-- Table `OzekiPBX`.`ozmlin`
-- -----------------------------------------------------
CREATE TABLE ozmlin
(
  id integer PRIMARY KEY,
  callerid varchar(40) NOT NULL,
  scriptid integer NOT NULL,
  duration integer DEFAULT NULL,
  status varchar(40) DEFAULT NULL,
  recordurl varchar(150) DEFAULT NULL,
  starttime timestamp DEFAULT NULL
);

CREATE SEQUENCE id_seq START WITH 1 INCREMENT BY 1;

CREATE OR REPLACE ozmlin_insert
BEFORE INSERT ON ozmlin
FOR EACH ROW
BEGIN
    SELECT id_seq.nextval INTO :new.id FROM dual;
END;
/

-- -----------------------------------------------------
-- Table `OzekiPBX`.`ozmlout`
-- -----------------------------------------------------
CREATE TABLE ozmlout
(
  id integer PRIMARY KEY,
  dialednumber varchar(40) NOT NULL,
  status varchar(40) DEFAULT NULL,
  duration integer DEFAULT NULL,
  scriptid integer DEFAULT NULL,
  recordurl varchar(150) DEFAULT NULL,
  starttime timestamp DEFAULT NULL
);

CREATE SEQUENCE id_seq START WITH 1 INCREMENT BY 1;

CREATE OR REPLACE ozmlout_insert
BEFORE INSERT ON ozmlout
FOR EACH ROW
BEGIN
    SELECT id_seq.nextval INTO :new.id FROM dual;
END;
/

-- -----------------------------------------------------
-- Table `OzekiPBX`.`ozmlscripts`
-- -----------------------------------------------------
CREATE TABLE ozmlscripts
(
  scriptid integer PRIMARY KEY,
  ozml varchar(10000) NOT NULL
);

CREATE SEQUENCE scriptid_seq START WITH 1 INCREMENT BY 1;

CREATE OR REPLACE ozmlscripts_insert
BEFORE INSERT ON ozmlscripts
FOR EACH ROW
BEGIN
    SELECT scriptid_seq.nextval INTO :new.scriptid FROM dual;
END;
/

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