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

Scheduled SMS Contents | SearchInformix

Home > Product Manual > Installation Guide > Users and applications > SMS from/to database > SQL templates

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  Prerequisites
  Download Information
  Installation Steps
  Service Provider Connections
  Users and applications
  Standard user
  SMPP user
  SMS from/to database
  MSSQL
  MySQL
  Oracle
  Sybase SQL Anywhere
  PostgreSQL
  Pervasive SQL
  Date Format Strings
  Scheduled SMS
  SQL templates
  Informix
  Access
  Video
  Connection string builder
  Keywords
  MS SQL high speed
  Oracle High Speed
  SQL statements
  Polling technology
  Dynamic Keywords
  Dynamic SMPP parameters
  Autoreply SMS from database
  Autoreply SMS using a script
  Simple autoreply SMS
  SMS from/to file
  SMS through E-mail
  SMS via HTTP Request
  SMS via colour protocol
  Application starter SMS
  SMS Voting
  SMS from MS Outlook
  SMS from/to FTP server
  PDF Request in SMS
  SMS to WCF service
  SMS Forwarder
  RSS to SMS
  Linux
  User Guide
  Developers Guide
  Examples and Solutions
  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.

SQL to SMS Gateway configuration - SQL templates

This section gives you information on how you can customize the SQL commands used to access your database tables. The information presented here is helpful if you wish to setup an SQL to SMS gateway configuration and you wish to alter the default database table layout.

Default operation of the SMS gateway

By default the SMS gateway uses two database tables. One of the tables (ozekimessagein) is used for receiving SMS messages. The other (ozekimessagout) is used sending SMS messages . If an SMS message arrives to your gateway, it will be inserted to the ozekimessagin database table using the following SQL command:

INSERT INTO ozekimessagein (sender, receiver, msg, senttime, receivedtime, msgtype, operator) VALUES ('$originator','$recipient','$messagedata','$senttime','$receivedtime','$messagetype','$operatornames')


Before this statement is executed by the SMS gateway the keywords (e.g.: $originator, $recipient,...) will be replaced to the corresponding values of the incoming SMS message.

If you want to send an SMS message, you have to create a record in the ozekimessagout table. The status of the message should be set to "send". The SMS gateway will read the ozekimessagout table using the following SQL query to find your message:

SELECT id,sender,receiver,msg,msgtype,operator FROM ozekimessageout WHERE status='send'

After you outgoing SMS messages has been successfully fetched, the record will be updated using the following SQL command:

UPDATE ozekimessageout SET status='sending' WHERE id='$id'

This indicates that your SMS messages has been accepted for delivery by the SMS gateway and is saved into the outbox of the SMS gateway. Some time after this the following events can happen to your message:
  1. delivered to network
  2. delivery to network is not possible
  3. delivered to handset
  4. delivery to handset is not possible

Depending which one of these events occur one of the following SQL commands will be executed on your database record:

If the "delivered to network" event occurs:
UPDATE ozekimessageout SET status='sent', senttime='$senttime' WHERE id='$id'

If the "delivery to network is not possible" event occurs:
UPDATE ozekimessageout SET status='notsent' WHERE id='$id'

If the "delivered to handset" event occurs:
UPDATE ozekimessageout SET status='delivered' WHERE id='$id'

If the "delivery to handset is not possible" event occurs:
UPDATE ozekimessageout SET status='undelivered' WHERE id='$id'

If the status of the message stays in "sending", it indicates, that the Ozeki software has read the message from the database. The message was accepted for delivery and was stored in the outbox folder, but it was not yet accepted by the mobile network operator. It means that it is "waiting for delivery". In this case, if you look at the Graphical User Interface (GUI) of Ozeki NG, you should see the message in your outbox.

If the status of the message stays in "sending" for a long time, it is highly probable that the messages are not delivered because the mobile network connection is not functioning in your system. To resolve this issue, please check if the service provider connection's link (SMPP, UCP, CIMD2) is working.

Customized operation of the SMS Gateway

To change this behavior, you should modify the SQL templates used by the SMS gateway. This can be done by opening the "SQL for sending" or the "SQL for receiving" tab of the "Database configuration form" (Figure 1).


Figure 1 - How to update the SQL templates

On this form you can specify an SQL command that is valid in your database server. You can put stored procedures and complex SQL statements. As long as the SQL command can be executed, the SMS gateway can use it.

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





Next page: Informix
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