Welcome page
Products
Ozeki 10
Apps
Chat
SMS Gateway
SMS with Client Software
HTTP API
SMS from/to Database
PHP SMS API
Solutions
C# SMS API
VB.NET SMS API
SQL Logging
MySQL table layout
Oracle table layout
MSSQL table layout
SQL templates
SQL Log Tracking
Keywords
Advanced Traffic Queries
System Database
Robot Controller
Softphone
Connections
Installation guide
Terms and Definitions
SMS
Bulk Messenger
Cluster
Developer tools
Robots
Hardware
Technology
Company


Ozeki SMS Gateway
MSSQL table layout MSSQL table layout | SQL Log Tracking SQL Log Tracking

Default SQL template examples

You can use the following example templates in all cases that a message is 'Received', 'Accepted for delivery', 'Delivered to network', 'Delivered to handset' and has 'Delivery error'. These SQL statements will run every time one of these five message events occur in Ozeki SMS Gateway.

Received:
This example template INSERT-s every incoming message to the 'inbox' table.
INSERT INTO inbox (username,msgtype,msgid,sender,receiver,msgsubject,msgdata,senttime,receivedtime,operator) VALUES ('$username','$msgtype','$msgid','$sender','$receiver','$msgsubject','$msgdata','$senttime','$receivedtime','$operator')

Accepted for delivery:
You can INSERT messages in the 'outbox' table before broadcasting them with Ozeki SMS Gateway.
INSERT INTO outbox (username,msgtype,msgid,sender,receiver,msgsubject,msgdata,acceptedfordeliverytime,operator,status) VALUES ('$username','$msgtype','$msgid','$sender','$receiver','$msgsubject','$msgdata','$acceptedfordeliverytime','$operator','accepted')

Delivered to network:
UPDATE-s the message record before delivering it to the network. For example it changes the message status.
UPDATE outbox SET deliveredtonetworktime='$deliveredtonetworktime', callbackid='$callbackid', status='deliveredtonetwork', cost='$cost' where msgid='$msgid'

Delivered to handset:
UPDATE-s the message record before delivering it to the recipient's handset by changing the message status.
UPDATE outbox SET deliveredtohandsettime='$deliveredtohandsettime', status='deliveredtohandset' where msgid='$msgid'

Delivery error:
UPDATE-s the message record in case of an error. It also saves the error message as well.
UPDATE outbox SET errormessage='$errormessage', status='deliveryfailed' where msgid='$msgid'

You can find these SQL examples in the field boxes


Figure 1 - Find and if necessary modify the SQL templates


Copyright © 2000- - Ozeki Ltd | info@ozeki.hu | Tel: +36 1 371 0150
Home > Products > Ozeki 10 > Apps > SMS Gateway > SQL Logging > SQL templates
Legal | Privacy policy | Terms of use
Page: 5780 | Login | 54.92.193.89