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

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
  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.

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 - 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