Ozeki NG SMS Gateway logo OZEKI NG SMS Gateway
"The World's most reliable SMS gateway software!"
info@ozekisms.com
Tel.: +36 1 371 0150
SMS Gateway to send SMS via GSM modem or IP SMS connection Overview SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Quick start SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Download SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Manual SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection How to buy SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection FAQ SMS Gateway to send SMS via GSM modem or IP SMS connection SMS Gateway to send SMS via GSM modem or IP SMS connection Contact Us SMS Gateway to send SMS via GSM modem or IP SMS connection
OZEKI NG SMS Gateway - Product Guide

Ozeki Phone Sytem PBX SMS Contents | SearchAppendix

Home > Product Manual > Examples and Solutions > Autoreply voucher example

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  User Guide
  Developers Guide
  Examples and Solutions
  Telephone networks
  SMS Pin game
  E-mail to SMS alert
  2 way SMS to Email gateway
  SMS Order System
  Least Cost Routing
  SMS Load Balancing
  Asterisk PBX SMS
  SQL SMS Gateway
  SMS Service Provider
  Service Provider
  SMS PIN code query
  SMS Counter game
  SMS newsgroup
  Distributed SMS
  SMS Menu
  Google maps
  Forwarding
  Birthday greeting - SQL Express
  Birthday greeting - MySQL
  Birthday greeting - Oracle
  Instant brochure - MMS autoreply
  Alphabet letter game
  SMS sport betting service
  E-mail about outgoing SMS messages
  SMS Information Menu
  Email to SMS feature
  Reminder example
  Bulk SMS Client
  Bulk SMS to a given phone number range
  Filtering phone numbers
  Ozeki Phone Sytem PBX SMS
  Autoreply voucher example
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
  Cookie policy
 


Automated phone calls?
Ozeki Phone System XE VoIP PBX software is an advanced PBX built for automated voice calls and 2 way SMS messaging. It has outstanding APIs for software developers. It can be used for:

Phone calls from SQL
Phone calls from HTTP
Voice and SMS applications

Callcenter developers
If you are working on telephone solutions, please check out the Ozeki VoIP SIP SDK.
It can be used to create VoIP client and server software.

Contact Us!
If you wish to get further information, do not hesitate to contact us!

E-mail: info@ozekisms.com

If you have a technical question, please submit a support request on-line.

How to setup Ozeki NG SMS Gateway Autoreply voucher sender

Find an Autoreply example on this page that will demonstrate how to build your own SMS system to introduce voucher service for your customers. To implement this solution effectively and properly please follow the configuration guide below this page.


Configuration guide


1. Installing Ozeki NG SMS Gateway software

In order to start using Ozeki NG SMS Gateway, first you need to install it to your computer. If you have any problem during the installation process, just follow this guide: Installation Steps.

2. Connecting the gateway to your service provider

After you have installed the two Ozeki NG SMS Gateway software products, you need to setup at least one service provider connection to send out your SMS messages. There are two ways of sending SMS messages:


You can configure the service provider connections based on the guides that can be found here.


3. Configuring MySQL

To setup Autoreply service a database table is needed that will hold voucher information. Here is the table definition:


 CREATE TABLE IF NOT EXISTS `voucher` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `voucher` int(11) DEFAULT NULL,
   `phonenumber` varchar(100) DEFAULT NULL,
   `date_time` timestamp DEFAULT NULL,
   PRIMARY KEY (`id`),
   KEY `id` (`id`)
 ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

Now a stored procedure has to be created in your database server which will help you to create the random voucher.

First you need to login to your database management software. You can use mysql console, phpmyadmin or any other management software. Then select the database in which you created the voucher table and issue the following create script.

 DELIMITER $$
CREATE PROCEDURE Getphonenumber( IN phone varchar(100))
BEGIN
	DECLARE random INT(11);
	SET random = (select UNIX_TIMESTAMP()+FLOOR(RAND()*1000)+FLOOR(RAND()*9999));
	IF random NOT IN (SELECT voucher FROM voucher) THEN
    	INSERT INTO voucher (phonenumber,voucher, date_time) VALUES(phone, random, NOW());
     SELECT phone, random;       
     END IF;   
     
END $$
DELIMITER ;

4. Adding new Autoreply Database user and modifying it.

After you have created the table and the stored procedure, you need to add a new Autoreply Database user to your Ozeki NG SMS Gateway software product.


Figure 1 - New user


Figure 2 - Autoreply Database user

In order to connect the gateway to a MySQL database, first you need to install a MySQL ODBC Driver to your Windows operating system and then add a new data source to it which will be connected to your database server.


Figure 3 - New data source

If you have added the new data source, return to your Ozeki NG SMS Gateway, install a new Autoreply Database user and provide a connection string (related to your database server) under the Database connection tab in the Connection String textbox and select ODBC from the Connection string type dropdown menu.

Driver={MySQL ODBC 5.1 Driver};Server=localhost;
Database=voucher;User=root;Password=qwe123;Option=4;


Figure 4 - Provide connection information

Now go to the Autoreply script tab and add the path of the sqlscript.txt which default is C:\Program Files (x86)\Ozeki\OzekiNG - SMS Gateway\Config\Autoreply\sqlscript.txt. You have to open this file, delete the last row and add to the following line CALL Getphonenumber ("$sender");


Figure 5 - sqlscript.txt path


Figure 6 - sqlscript.txt

This guide shows you a solution how to send Autoreply voucher message using Ozeki NG SMS Gateway software product. The stored procedure can also be created in different ways. It is also possible to use other database servers, such as MSSQL or Oracle.

If you have any other question, please send us an e-mail at info@ozekisms.com.



Next page: Appendix
Copyright © 2000 - 2017 Ozeki Informatics Ltd.
All rights reserved

Software PBX for Windows | VoIP SDK   |   Legal information   |   Privacy policy   |   Terms of use
Please, address your inquiries to info@ozekisms.com