Overview for software developers (ppt)

  • 1,055 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,055
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
17
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Jernas Solutions Ozeki NG SMS Gateway: Development Overview Presented by: Milen Nikolov Manager, Products & Services A subsidiary of International Development Company [IDC] http://www.idcuae.com
  • 2. The Big Picture OzekiNG SMS Gateway Service Provider/SMSC API Adaptors Encapsulator Queue Applications C++,C#,ASP,PHP, AJAX, … HTTP methods SQL queries Databases Oracle, MSSQL, Sybase, Postgre, MySQL, etc E-mail Servers SMTP/POP3 Sendmail, Qmail, MS Exchange, etc TEXT Files
  • 3. Users and Applications User Type Description Standard user User account for accessing the OzekiNG management interface or for sending/receiving SMS messages using the built-in web interface E-mail user Automated user, implementing two-way SMS/E-mail gateway service using POP3 and SMTP Autoreply user A user for automatic reply and message routing based on sender address or message content SMPP user This user account enables other devices to connect to the OzekiNG, turning the software into a SMSC Database user A user account that periodically polls a database for incoming/outgoing messages File user A user account that processes text files as means for sending and receiving messages HTTP Client user A translator, converting mobile communication into HTTP GET and HTTP POST methods.
  • 4. OzekiNG and Databases
    • Send and receive messages using SQL queries
      • Supports a variety of databases
        • MS SQL, Sybase, Oracle [ADO/OLEDB]; MySQL, Postgre [ODBC]
        • And almost anything that does ADO and ODBC
  • 5. OzekiNG + Databases Quickstart
    • Requirements
      • Two database tables: ozekimessageout and ozekimessagein
      • A database user account and a connector [ODBC or ADO]
  • 6. Incoming Messages: Table Fields Field Description Example id This distinguishes incoming messages from each other. Every id has to be different. 1, 2, 3, ... sender This is the phone number of the sender of the message. +36441234567, 06459876543 receiver This is the phone number of the recipient of the message. +36441234567, 06459876543 msg This is the text of the message. This is a message text. senttime This is the time of sending the message. 2007-04-23 10:02:13 receivedtime This is the time of receiving the message. 2007-04-23 10:02:13 operator This denotes which service provider connection was used to receive the message. Vodafone1 msgtype This denotes the type of the message. SMS:TEXT, SMS:WAPPUSH, ...
  • 7. Outgoing Messages: Table Fields Column name Description Example id This distinguishes outgoing messages from each other. Every id has to be different 1, 2, 3, ... sender This is the phone number of the sender of the message +36441234567, 06459876543 receiver This is the phone number of the recipient of the message +36441234567, 06459876543 msg This is the text of the message This is a message text. senttime This is the time of sending the message 2007-04-23 10:02:13 receivedtime This is the time of receiving the message 2007-04-23 10:02:13 operator This denotes which service provider connection is to be used to send out the message. The default is ANY ANY; Vodafone1 msgtype This denotes the type of the message, default SMS:TEXT SMS:TEXT, SMS:WAPPUSH, … status This denotes the status of the message. send, sending, sent, notsent, delivered, undelivered
  • 8. Message Status Field Status Description send The message has been inserted into the database table (ozekimessageout), but not yet processed by Ozeki NG. This is the status to be specified when inserting a new message. sending The message has been processed by Ozeki NG, and inserted into the Database user's Outbox folder, where it is waiting to be sent out. sent The message has been sent out to the SMS Center of a specified service provider, which has accepted the message for delivery. notsent The message has not been sent out to the SMS Center of a specified service provider. Some error has caused the sending to fail. delivered The specified service provider has reported that the message has been delivered to the recipient. undelivered The specified service provider has reported that the delivery of the message to the recipient has failed.
  • 9. Status Update Process Flow
  • 10. Creating OzekiNG Tables
    • CREATE TABLE ozekimessagein (   id int IDENTITY (1,1),   sender varchar(30),   receiver varchar(30),   msg varchar(160),   senttime varchar(100),   receivedtime varchar(100),   operator varchar(30),   msgtype varchar(30),   reference varchar(30), );
    • CREATE TABLE ozekimessageout (   id int IDENTITY (1,1),   sender varchar(30),   receiver varchar(30),   msg varchar(160),   senttime varchar(100),   receivedtime varchar(100),   operator varchar(100),   msgtype varchar(30),   reference varchar(30),   status varchar(30),   errormsg varchar(250) );
    You can optionally create an index in the database for the 'id' field of the outgoing SMS table to support SQL updates.
  • 11. Creating a Database User
  • 12. Creating a Database User
  • 13. Configuring the Connector
  • 14. Configure Logging
  • 15. Monitoring Events
  • 16. Sending a Message
    • insert into ozekimessageout ( receiver , msg , status ) values ( " +97150XXXXXXX "," Hello world "," Send ");
  • 17. SMS Scheduled Sending
  • 18. USING THE HTTP API
    • How to send SMS messages using ASP,ASP .NET, C# and other languages
  • 19. HTTP API: The Idea OzekiNG SMS Gateway Service Provider/SMSC WWW Server Encapsulator Queue Application C++,C#,ASP,PHP, AJAX, … HTTP POST http://127.0.0.1:9501/ozeki? action =SendMessage&u sername =user& password =pass& recipient =050XXXXXXX& messageData =hello
  • 20. HTTP Fields Parameter Description Values Example action Mandatory field, specifying the API command sendMessage action=sendMessage originator Optional field. Specifies the sender identity/number, URL encoded An alphanumeric sender address, or telephone number. Encoded in UTF8 originator=%2B36201112222 recipient Mandatory field, specifying the recipient phone number. Must be URL encoded Comma separated telephone numbers in local or international number format recipient=%2B36201234567 messageType Optional field, defining the type of SMS message There are more than 20 possible message types messageType=SMS:TEXT messageData Specifies the text or the data of the SMS message. Mandatory The value must be encoded in UTF8 and must be URL encoded messageData=Hello+World _charset_ Specifies the charset of the encoded data (if not specified UTF-8 will be assumed). Optional. utf-8 windows-1250 iso-8859-1 iso-8859-2 _charset_=iso-8859-2 serviceProvider The name of the service provider connection to use Must match the string from the configuration serviceProvider=Etisalat
  • 21. Using HTTP Forms to Send SMS
    • <form action=&quot; http://127.0.0.1:9501/ozeki &quot; method=&quot;GET&quot;>
    • <input type=&quot;hidden&quot; name=&quot; _charset_ &quot;>
    • <input type=&quot;hidden&quot; name=&quot; action &quot; value=' sendMessage '>
    • <input type=&quot;hidden&quot; name=&quot; username &quot; value =“yourusername&quot;>
    • <input type=&quot;hidden&quot; name=&quot; password &quot; value=“ yourpassword &quot;>
    • <input type=&quot;hidden&quot; name=&quot; messageType &quot; value=' SMS:TEXT '>
    • <table> <tr><td>Recipient</td>
    • <td><input type=&quot;text&quot; name=&quot; recepient &quot;></td></tr>
    • <tr><td>Message</td>
    • <td><textarea name=&quot; messageData &quot; rows=5 cols=40></textarea></td></tr> <tr><td> </td>
    • <td><input type=&quot; submit &quot; value=&quot; OK &quot;></td></tr> </table>
    • </form>
  • 22. ASP? “S” is for “Simplicity”
    • <%     Dim strMsg     Dim strReceiver     Dim strUrl
    • ' Retrieve the posted items from the HTTP-SMS GW strUrl = http://localhost:9501/ozeki? strRequest = &quot; username = youruser &quot;; strRequest = strRequest+&quot;& password = p4$$wd &quot;; strRequest = strRequest+&quot;& action = sendMessage &quot;; strRequest = strRequest+&quot;& messageType =SMS:TEXT&quot;;
    • strRequest = strRequest+&quot;& recipient =&quot;+Server.URLEncode(&quot;+97150XXXXXXX&quot;);
    • strRequest = strRequest+&quot;& messageData =&quot;+Server.URLEncode(&quot; Hello World &quot;);  
    •     strUrl = strUrl+strRequest;
    •     'Create InternetExplorer     Dim WebBrowser: Set WebBrowser = CreateObject(&quot;InternetExplorer.Application&quot;)         WebBrowser.Navigate strUrl
    •     Do While WebBrowser.busy     Loop     WebBrowser.Quit
    •     'Display message info to the user     Response.Write(&quot; The message has been sent  . &quot; + chr(13)) %>
  • 23. Q & A
    • Can we send the same message to multiple phone numbers?
      • Comma separated list of the phone numbers to be used, i.e. string smsRecipients = HttpUtility.UrlEncode (“+971050XXXX,+97150YYYY&quot;);
    • Is it possible to run the code on a different server?
      • Certainly, simply set the correct URL and port number of the OzekiNG server in your application.
      • WARNING! Security measures have to be in place – ACL, firewalling, strong passwords, VPN.
    • Can we change sender identity?
      • Required: IP SMS connectivity, service provider-set Sender ID
      • Use the “ originator ” field in the API, i.e. string smsOriginator = HttpUtility.UrlEncode(“Dental Clinic&quot;);
  • 24. Other Languages and Methods
    • Developers’ Guide at http://www.ozekisms.com
      • ASP.NET, C#, PHP, AJAX, SQL
      • Examples and source code
      • Sending and receiving SMS
      • Different types of messages
      • Application ports for J2ME developers
  • 25.
    • THANK YOU
    • For more information:
    • Milen Nikolov, milen@jernas.org
    • +971 50 6823400 or +971 2 6418533