7f66 SMS Gateway - Send message, URL template

                

Search the manual:

Overview Quick start Download Manual How to buy FAQ Contact Us
OZEKI NG SMS Gateway - Product Guide

Send message Contents | SearchMultiple SMS

Home > Product Manual > Developers Guide > HTTP SMS API > Send message > URL template

SMS Gateway SMS Gateway Home

  Product Manual
  Introduction
  SMS technology
  Installation Guide
  User Guide
  Developers Guide
  Tutorials
  ASP SMS API
  PHP SMS API
  HTTP SMS API
  Send message
  URL template
  Multiple SMS
  Browser redirect
  Character sets
  HTML response
  Validity period
  Receive message
  Billing methods
  Urlencode
  Select operator
  Operate with single message
  Query the addressbook
  Operations with message folders
  Examples
  User handling
  Service Provider Connection Handling
  Reporting API
  Dynamic SMPP parameters
  SQL SMS API
  C Sharp SMS API
  AJAX SMS API
  Delphi SMS API
  Cpp SMS API
  Java SMS API
  VB.NET SMS API
  Python SMS API
  Perl SMS API
  TCL/TK SMS API
  Coldfusion SMS API
  VB 6 SMS API
  Examples and Solutions
  Appendix
  FAQ
  Feature list
  Commercial Information
  Search
 



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.


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

Webphone solutions:
- Adobe Flash video phone
- Silverlight video phone
- Web to web calls
- Web to VoIP calls

Custom SIP clients:
- Silverlight SIP VoIP client
- Flash SIP VoIP client
- C# .net SIP VoIP client
- ASP .net SIP VoIP client
- Web based SIP VoIP client

Custom VoIP solutions:
- VoIP SIP softphones
- VoIP call center clients
- VoIP IVR systems
- VoIP predictive dialer systems
- VoIP auto dialer systems
- VoIP call assistant
- VoIP call recording systems
- VoIP intercom solutions

HTTP SMS API - URL template


This guide gives you instructions on how to create an URL template to be used in the redirecturl, the continueurl and the reporturl parameters of the HTTP API sendmessage method.

Introduction

If the the redirecturl or the continueurl parameters are included in your sendmessage HTTP request, the SMS server will return a response containing the URL. If the URL specified contains certain keywords. The keywords will be replaced to the appropriate values corresponding to the submitted message. In other words an URL template is an URL that will be processed by the SMS gateway before it is used in the HTTP response. Processing means, that certain keywords will be replaced in the URL.

For example if you specify the following URL in the continueurl parameter:

http://www.myserver.com/index.asp?msgid=$messageid&statusmsg=$statusmessage

It will be modified into this when it is returned in the HTTP response:

http://www.myserver.com/index.asp?msgid=AC32DEF&statusmsg=Message+accepted+for+delivery
Note that the keywords $messageid and $statusmessage have been replaced. The message id of the submitted messages is substituted for the $messageid keyword in the URL and the status message of the submission is is substituted for the $statusmessage keywrod. Ozeki NG SMS Gateway replaces the keywords specified in the table bellow.

How to use?

To pass an URL template in the redirecturl, the continueurl or in the reporturl parameter, the URL template must be urlencoded. This is necessary, because otherwise the HTTP syntax of the sendmessage method would break. To urlencode your URL template you can use the online url encoding tool (available at http://www.ozekisms.com/index.php?owpn=417) or you can do the encoding manually.

The URL template we used in the example above looks like this before the encoding:

http://www.myserver.com/index.asp?msgid=$messageid&statusmsg=$statusmessage

After urlencogind it will look like this:

http%3A%2F%2Fwww.myserver.com%2Findex.asp%3Fmsgid%3D%24messageid%26statusmsg%3D%24statusmessage

If you want to include this URL template in your submit request, your request would look like this:

http://127.0.0.1:9501/api?action=sendmessage&username=admin&password=abc123&
recipient=06203105366&messagetype=SMS:TEXT&messagedata=Hello+World&redirecturl=
http%3A%2F%2Fwww.myserver.com%2Findex.asp%3Fmsgid%3D%24messageid%26statusmsg%3D%24statusmessage

Keywords

URL templates can contain the following keywords

KeywordReplaced to Can be used in the following parameter of the HTTP API sendmessage method
statuscode The result code of the message submission redirecturl
continueurl
reporturl
statusmessage The status message of the message submission. (The statuscode explained.) redirecturl
continueurl
reporturl
messageid The id of the submitted message redirecturl
continueurl
reporturl
recipient The recipient phone number of the submitted message redirecturl
continueurl
reporturl
originator The sender name or sender phone number of the submitted message redirecturl
continueurl
reporturl
messagetype The messagetype of the submitted message redirecturl
continueurl
reporturl
messagedata The messagedata of the submitted message redirecturl
continueurl
reporturl
submitdate The date and time value of the message submission event. The date format is YYYY-MM-DD hh:mm:ss. reporturl
deliveredtonetworkdateThe date and time value of the message delivered to network event. The date format is YYYY-MM-DD hh:mm:ss. reporturl
deliveredtohandsetdateThe date and time value of the message delivered to handset event. The date format is YYYY-MM-DD hh:mm:ss. reporturl
statusThe current status of the submitted message. Possible values:

deliveredtonetwork
deliveredtohandset
deliveryfailed

If the delivery fails, the statuscode and statusmessage parameters contain the errorcode and the errormessage returned by the service provider
reporturl


If more then one messages are submitted with a single HTTP request, the URL template will contain the values corresponding to the last message in the list.



Next page: Multiple SMS
Copyright © 2000 - 2013 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


0