Addressbook types in Ozeki NG SMS Gateway

This page demonstrates the addressbook types available in Ozeki NG SMS Gateway. Please read this description page and follow the screen shots to learn the various types and their functions.

In this example I login as user admin to Ozeki NG SMS Gateway. To be able to configure the addressbook, click on the respective user (Figure 1).

admin user in ozeki ng
Figure 1 - Click on the user

Click on Configure and select Advanced tab on the configuration pane (Figure 2).

selecting advanced tab in ozeki ng
Figure 2 - Select Advanced tab

In the section called Addressbook, you can specify the Type of Addressbook.

File Addressbook

In this case File Addressbook is selected (Figure 3). File addressbook ensures that contacts will be stored in a file.

selecting file addressbook type
Figure 3 - File addressbook

Click on Configure under Addressbook section (Figure 4).

configuring addressbook in ozeki ng
Figure 4 - Addressbook configuration

On General tab you can see the directory of the addressbook but please note that it cannot be configured (Figure 5).

directory of addressbook in ozeki ng
Figure 5 - Directory of addressbook

LDAP Addressbook

If you select LDAP Addressbook as the addressbook on Advanced tab, then contacts will be selected from LDAP (for example, Active Directory) (Figure 6).

selecting ldap as type of addressbook in ozeki ng
Figure 6 - LDAP addressbook

Go to Configure and click on Addressbook configuration. On General tab you can specify the parameters such as Host (in this example Active Directory is on computer 192.168.91.190) (Figure 7).

specifying parameters of the ldap addressbook in ozeki ng
Figure 7 - Specify parameters

On Attributes tab you can configure how contacts should be search for (Figure 8).

attributes tab in ozeki ng
Figure 8 - Attributes tab

Figure 9 demonstrates that three contacts has been imported and appeared in the addressbook.

imported contacts in ozeki ng
Figure 9 - Imported contacts

SQL Addressbook

You can also select SQL Addressbook type on Advanced tab (Figure 10). In this case contacts will be stored and uploaded from an SQL database.

selecting sql addressbook type in ozeki ng
Figure 10 - SQL addressbook

To configure the addressbook, click on Configure and on Addressbook configuration. On Connection information tab you can specify the Connection string with which the system connects to the database (Figure 11).

setting up a connection string in ozeki ng
Figure 11 - Connection string

First you need to create database tables:

MSSQL

Create table script for MSSQL Server
CREATE TABLE contact (
        id int IDENTITY (1,1) not null,
        name varchar(50) not null,
        mobile varchar(255) not null,
        telephone varchar(255) not null,
        fax varchar(255) not null,
        email varchar(255) not null,
        im varchar(255) not null,
        other varchar(255) not null,
        comment varchar(255) not null,
        createTime DateTime not null
);


CREATE TABLE contactGroup (
        id int IDENTITY (1,1) not null,
        name varchar(50) not null,
        useraccount varchar(50) not null,
        subscribekeyword varchar(50) not null,
        greetingmessage varchar(50) not null,
        unsubscribekeyword varchar(50) not null,
        byemessage varchar(50) not null,
        allowsubscription varchar(5) not null
);


 CREATE TABLE membership (
        groupId int not null,
        contactId int not null
) 

MySQL

You can connect to MySQL with this connection string:
Connection string

Driver={MySQL ODBC 5.1 Driver};Server=IPaddress;Database=DBname;User=UserName;Password=PassWord;Option=4;
 

Create table script for MySQL
CREATE TABLE  `contact` (
       `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
       `name` VARCHAR( 50 ) NOT NULL ,
       `mobile` VARCHAR( 255 ) NOT NULL ,
       `telephone` VARCHAR( 255 ) NOT NULL ,
       `fax` VARCHAR( 255 ) NOT NULL ,
       `email` VARCHAR( 255 ) NOT NULL ,
       `im` VARCHAR( 255 ) NOT NULL ,
       `other` VARCHAR( 255 ) NOT NULL ,
       `comment` VARCHAR( 255 ) NOT NULL ,
       `createTime` DATE NOT NULL
);

CREATE TABLE  `contactGroup` (
       `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
       `name` VARCHAR( 50 ) NOT NULL ,
       `useraccount` VARCHAR( 50 ) NOT NULL ,
       `subscribekeyword` VARCHAR( 50 ) NOT NULL ,
       `greetingmessage` VARCHAR( 50 ) NOT NULL ,
       `unsubscribekeyword` VARCHAR( 50 ) NOT NULL ,
       `byemessage` VARCHAR( 50 ) NOT NULL ,
       `allowsubscription` VARCHAR( 5 ) NOT NULL
);

CREATE TABLE  `membership` (
 `groupId` INT NOT NULL ,
 `contactId` INT NOT NULL
);

 

On Contacts tab you can specify the SQL statements of the contacts: for Load, Create, Delete, and Update fields (Figure 12).

contacts tab in ozeki ng
Figure 12 - Contacts tab

If you use MySQL please replace Create statement in Contacts tab to the follows:

Create statement

INSERT INTO Contact (name, mobile, telephone, fax, email, im, other, comment, createTime) VALUES
('$name', '$mobile', '$telephone', '$fax', '$email', '$im', '$other', '$comment', '$createTime');
SELECT last_insert_id();

On Groups tab you can define the SQL statements of groups for Load, Create, Delete, and Update fields (Figure 13).

groups tab in ozeki ng
Figure 13 - Groups tab

If you use MySQL please replace Create statement in Groups tab to the follows:

Create statement

INSERT INTO ContactGroup (name, useraccount, subscribekeyword, greetingmessage, unsubscribekeyword,
byemessage, allowsubscription) VALUES ('$name', '$useraccount', '$subscribekeyword', '$greetingmessage',
'$unsubscribekeyword', '$byemessage', '$allowsubscription'); SELECT last_insert_id();

SQL statements can also be specified for members on Membership tab: Load, Add to group, and Remove from group (Figure 14).

membership tab in ozeki ng
Figure 14 - Membership tab

More information