HTTP Interface Configuration for Mobile Terminated SMS

HTTP Interface Configuration for Mobile Terminated SMS

Last updated: December 3, 2008

This section is only applicable to lab applications and the test application with a required feature license.

If you wish to use the HTTP interface in the test set to route SMS messages to the mobile station attached to the test set's RF port you must do the following:

  1. Enable the Test Set's HTTP Interface
  2. Specify the SMSC IP Address and Port
  3. Configure the Request URL

Enable the Test Set's HTTP Interface

You must enable the HTTP interface in the test set. This can be done via a GPIB command (see CALL:SMService:HTTProtocol:INPut ) or from the test set's front panel (see Enabling the HTTP Interface for Mobile Terminated SMS ).

If the interface is not enabled, HTTP SMS requests sent to the test set are rejected and the HTTP error code 503 (Service Unavailable) is returned to the client issuing the request.

Specify the SMSC IP Address and Port

Several different types of clients could be used to send SMS messages to the test set. Some examples are:

When setting up any of these clients, it is necessary to specify the IP Address and port number on which the test set is listening for incoming messages. These parameters are always to be configured as follows:

   
NOTE
When configuring an SMS Gateway, these parameters apply to the SMSC configuration. In a test system with more than one test set, each test set may be thought of as a separate SMSC and configured as such in the gateway.

   

Configure the Request URL

When using the HTTP interface in the test set for sending SMS messages, you must configure a request URL.

Requests to send SMS messages to the mobile station attached to the test set using the HTTP interface must be configured using the following rules:

  1. The request URL format accepted by the test set is:

    /sms/send/?parameter1=value1&parameter2=value2&parameter3=value3......

       
    NOTE
    "/sms/send/?" must be specified at the beginning of the request URL in order for the test set to recognize the HTTP request as a request to send an SMS message to the mobile station.

       

    The parameters and values variables provides the content of the SMS message as well as additional information for header configuration and test set configuration. All configurable parameters and values are detailed in Request URL Parameters .

  2. Mandatory parameters must be included in the request URL. The mandatory parameters depend on the content of the SMS message you are sending.
    SMS Message Content Type Mandatory Parameters
    7-bit text TEXT
    8 or 16 bit data DATA and/or UDH
  3. An HTTP error code of 400 (Bad Request) is returned to the client initiating an HTTP request and the message is not forwarded on to the mobile station if one or both of the following is true:
    • any parameter values in the request URL do not adhere to the constraints detailed in Request URL Parameters , or
    • any mandatory parameters are not present.
  4. With the exception of SENDER, Optional parameters may be set equal to an empty value in the request URL. For example, if parameter2 is an optional parameter, then /sms/send/?parameter1=value1&parameter2=&parameter3=value3 is a valid request URL. The test set uses the default value for optional parameters when they have been set to empty values. If the SENDER parameter is included, it must be set to a sender address in the request URL. If you do not want to include a sender address with the message, leave out the SENDER parameter rather than setting it equal to an empty value.
    Optional Parameters
    UDHI
    PIDHEX or PID
    DCSHEX or DCS
    SENDER
    MMTS
    SRI
    RPATH
    TRANSPORT
  5. Parameters in the request URL can be in any order.
  6. When a text message is being submitted via the `TEXT' parameter, HTTP URL escaping restrictions apply. Therefore, all space characters must be replaced with the `%20' character sequence. Other characters that require escape characters when used in URLs are detailed in the following table.

    Character to URL Escape Sequence Mapping

       
    NOTE
    It is only necessary for you to use the escape characters when building a request URL manually. If you are sending messages to the mobile station through either an SMS gateway or from another 8960, the escaping is performed automatically.

       

Request URL Parameters

Parameter Use and expected value Inclusion
TEXT 0-160 character string of 7-bit text characters. The underlying character codes specified here are used directly when sending the message OTA and will be interpreted by a receiving mobile station as per the ETSI default Alphabet specification. This parameter must be included in all HTTP requests to send 7-bit text based SMS messages. It must not be included in the same request as either of the DATA or UDH parameters outlined below.
DATA 0-280 ASCII formatted hex characters (the length of the combined UDH and DATA values must not exceed 280 characters) One or both of these parameters must be included in all HTTP requests to send binary SMS messages. The UDH and data for a message may be encoded as a single hex string and specified via either of these parameters, or may instead be specified separately and sent via both parameters. Neither of these parameters may be present in the same request as the TEXT parameter outlined above.
UDH 0-280 ASCII formatted hex characters representing the User Data Header to be included in the message content (the length of the combined UDH and DATA parameters must not exceed 280 characters)
UDHI The User Data Header Indicator (TP-UDHI) of the message. Should be either 0 or 1 to indicate the presence of a User Data Header in the message content. If a UDH parameter (see above) containing a non-empty value is present in the request URL, the UDHI used when sending the message OTA is always 1 regardless of the presence/value of the this parameter. Optional (Default = 0)
PIDHEX The Protocol Identifier (TP-PID) of the message as a string of hex characters Both of these parameters are optional but at most one may be included in any request. (Default = 0)
PID The Protocol Identifier (TP-PID) of the message as a decimal number
DCSHEX The Data Coding Scheme (TP-DCS) of the message as a string of hex characters Both of these parameters are optional but at most one may be included in any request. (Default = 0)
DCS The Data Coding Scheme (TP-DCS) of the message as a decimal number
SENDER The phone number of the sending client as a 0 - 20 character ASCII formatted string of BCD digits from 0-9, *, #, a, b, c Optional (Default = 1000)
MMTS The More Messages to Send value for the SMS PDU header. Should be either 0 or 1. Optional (Default = 1)
SRI The Status Report Indication value for the SMS PDU header. Should be either 0 or 1. Optional (Default = 0)
RPATH The reply path value for the SMS PDU header. Should be either 0 or 1. Optional (Default = 0)
TRANSPORT The transport mechanism to use when sending the message, valid value is either `GSM' or `GPRS'. Optional (Default = Whatever SMS transport is currently set for use in the instrument receiving the request)

Example request URL strings

Text message:

To send a text based SMS message with the following message details:

  • Originating number: 1001
  • Message Text: "This is a simple text message"

you would format the HTTP request URL as follows:

/sms/send/?TEXT=This%20is%20a%20simple%20text%20message&SENDER=1001

Binary message:

To send a binary message with the following message details:

  • Originating number: 987654321
  • Message Content: 140601AE02056A0045C60D036262632E636F2E756B2F6D6F62696C6500070103424243206D6F62696C652073697465000101
  • User Data Header: 0605040B8423F0
  • Protocol ID: 0
  • Data Coding Scheme: 245

you would format the HTTP request URL as follows:

/sms/send/?DATA=140601AE02056A0045C60D036262632E636F2E756B2F6D6F62696C6500070103424243206D6F62696C652073697465000101&PID=0&DCS=245&SENDER=987654321&UDH=0605040B8423F0

or, the test set also allows you to include the User Data Header as part of the `DATA' parameter as explained in the table Request URL Parameters . Therefore, the HTTP request URL could instead be configured as follows:

/sms/send/?DATA=0605040B8423F0140601AE02056A0045C60D036262632E636F2E756B2F6D6F62696C6500070103424243206D6F62696C652073697465000101&UDHI=1&PID=0&DCS=245&SENDER=987654321

Accepted HTTP request methods

Both POST and GET HTTP requests are accepted by the test set for sending SMS messages.

If POST is used as the request method, the URL request parameters detailed in Request URL Parameters are not included in the request URL, but are included in the request body instead. Therefore, the request URL in POST requests contains only `sms/send'.

Related Topics


HTTP Interface for SMS - Introduction

HTTP Interface Configuration for Mobile Originated SMS