Short Message Peer to Peer Protocol Specification v3.4


NOTE (1): ActiveXperts SMS Component provides developers with a fast and reliable SMPP API. Simply connect to the SMPP provider, bind using your credentials and call SubmitSms to send out the messages. Read more »

NOTE (2): ActiveXperts SMS Messaging Server is an SMS messaging framework to allow sending, receiving and processing SMS messages. It is designed to implement any project that requires SMS messaging. Read more »


Table of Content


3. SMPP PDU Type and Format Definitions


3.1 SMPP PDU - Type Definitions

The following SMPP PDU data type definitions are used to define the SMPP parameters:

Notes:

3.1.1 SMPP Parameter Field Size Notation

The following notation style is used throughout. Note that some SMPP strings are optional and others mandatory.

Size octets Type Description of String type specified
4 Integer Fixed size integer field. In this example the integer is of size 32 bits (4 octets)
Var Max 16 C-Octet String This string is of variable length from 1-15 ASCII characters, followed by an octet containing the NULL terminator. An empty string is encoded as a single octet containing the NULL character (0x00).
Fixed 1 or 17C-Octet StringThis string has two possible lengths:- 1 octet containing the NULL character or a fixed number of characters terminated with the NULL character (in this example 16 characters plus the NULL character).
Var 0 - 254 Octet String Variable size octet string field. In this example the size of the octet string field can vary from 0 to 254 octets.
Table 3-1: C-Octet String Notation

3.2 SMPP PDU Format - Overview

The general format of an SMPP PDU consists of a PDU header followed by a PDU body as outlined in the following table.

SMPP PDU
PDU Header (mandatory)PDU Body (Optional)
command length command id command status sequence number PDU Body
4 octetsLength = (Command Length value - 4) octets
Table 3-2: SMPP PDU Format Overview

The SMPP Header is a mandatory part of every SMPP PDU and must always be present. The SMPP PDU Body is optional and may not be included with every SMPP PDU.

The format of each SMPP PDU is described in more detail in the following section 4. "SMPP PDU Definition".

3.2.1 SMPP PDU Layout

SMPP PDU Field Size octets Type Description
H E A D E R
command_length 4 Integer

The command_length field defines the total octet length of the SMPP PDU packet including the length field.

command_id 4 Integer

The command_id field identifies the particular SMPP PDU, e.g., submit_sm, query_sm, etc.

A unique command identifier is allocated to each SMPP request PDU in the range: 0x00000000 to 0x000001FF A unique command identifier is also allocated to each SMPP response PDU in the range: 0x80000000 to 0x800001FF

(Note that an SMPP response command_id is identical to the corresponding request SMPP command_id, but with bit 31 set). Refer to chapter 5. for details of the complete SMPP Command ID set.

command_status 4 Integer

The command_status field indicates the success or failure of an SMPP request. It is relevant only in the SMPP response PDU and it must contain a NULL value in an SMPP request PDU.

The complete list of SMPP Error codes is defined in Chapter 5.

sequence_number 4 Integer

This field contains a sequence number which allows SMPP requests and responses to be associated for correlation purposes. The use of sequence numbers for message correlation allows SMPP PDUs to be exchanged asynchronously.

Assignment of the sequence_number is the responsibility of the SMPP PDU originator. The sequence_number should be increased monotonically for each submitted SMPP request PDU and must be preserved in the associated SMPP response PDU.

The sequence_number may range from: 0x00000001 to 0x7FFFFFFF.

B O D Y
Mandatory Parameters var. mixed

A list of mandatory parameters corresponding to that SMPP PDU defined in the command_id field.

The complete list of mandatory parameters is detailed in section 4. "SMPP PDU Definition" with the description of each SMPP PDU.

Optional Parameters var. mixed

A list of Optional Parameters corresponding to that SMPP PDU defined in the command_id field and included as required.

The complete list of optional parameters is detailed in section 4. "SMPP PDU Definition"with the description of each SMPP PDU.

Table 3-3: SMPP PDU Format Description

Note: Some SMPP PDUs may only have a Header part only, for example, the enquire_link PDU.

3.2.2 SMPP PDU Length

The command_length field at the beginning of the SMPP PDU header, indicates the total number of octets contained in that SMPP PDU. The command_length field contains a 4-octet integer transmitted in Big Endian format.

To decode an SMPP PDU, the ESME or SMSC should first read the command_length field (4 octets) to determine the PDU length. The amount of remaining data is then determined by subtracting the length of the command_length field (4 octets) from this total PDU length as provided by the command_length field value. Thus, extracting a command length of value N, indicates that N-4 octets are remaining for the given PDU.

Example:-

The following data-stream example illustrates how the SMPP PDU header is encoded:

00 00 00 2F 00 00 00 02 00 00 00 00 00 00 00 01 53 4D 50 50 33 54 45 53 54 00 
73 65 63 72 65 74 30 38 00 53 55 42 4D 49 54 31 00 00 01 01 00 

Note: Values are shown in Hex format.

The header would be decoded as follows:

00 00 00 2F         Command Length        0x0000002F 
00 00 00 02         Command ID            0x00000002 (bind_transmitter) 
00 00 00 00         Command Status        0x00000000 
00 00 00 01         Sequence Number       0x00000001 

The remaining data represents the PDU body (which in this example relates to the bind_transmitter PDU).

3.2.3 SMPP Message length and extended message length

The length of the short message text (or user data) is defined in the sm_length field of the submit_sm, submit_multi, deliver_sm and replace_sm SMPP PDUs.

The maximum message length which can be specified in sm_length field (see section 5.2.21) is 254 octets. If an ESME wishes to submit a message of length greater than 254 octets, the sm_length field must be set to NULL and the message_payload optional parameter must be populated with the message length value and user data.

SMPP supports extended message lengths in the submit_sm, submit_multi, data_sm and deliver_sm PDUs.

Refer to section 3.2.4 "Optional Parameters" for detail on Optional Parameters.

Note:

The actual short message length which can be transmitted to a MS may vary according to the underlying network.

3.2.4 Optional Parameters

Optional Parameters are fields, which may be present in a message. Optional Parameters provide a mechanism for the future introduction of new parameters, as and when defined in future versions of the SMPP protocol.

Optional Parameters must always appear at the end of a PDU , in the "Optional Parameters" section of the SMPP PDU. However, they may be included in any convenient order within the "Optional Parameters" section of the SMPP PDU and need not be encoded in the order presented in this document.

For a particular SMPP PDU, the ESME or SMSC may include some, all or none of the defined optional parameters as required for the particular application context. For example a paging system may only need to include the "callback number" related optional parameters in a submit_sm operation.

3.2.4.1 Optional Parameter Format

All optional parameters have the following general TLV (Tag, Length, Value) format. The definition of the Tag, Length and Value for each optional parameter is defined in chapter 5.

Parameter Name Size Type Description
Tag 2 Integer

The Tag field is used to uniquely identify the particular optional parameter in question. The optional parameter Tag field is always 2 octets in length.

Length 2 Integer

The Length field indicates the length of the Value field in octets. Note that this length does not include the length of the Tag and Length fields.

The optional parameter Length field is always 2 octets in length.

Value variable variable

The Value field contains the actual data for the optional parameter in question.

Table 3-4: Optional Parameter Format

3.3 Guidelines for SMPP Forward Compatibility

Forward Compatibility procedures allow a functional entity (i.e. SMSC or ESME) using one version of the SMPP protocol to easily communicate with an entity using a later, more enhanced version of the protocol. Hence, new enhancements to existing SMPP PDUs are implemented using optional parameters.

The following guidelines must be followed in SMPP implementations to ensure that this process is implemented successfully and consistently:


3.4 Guidelines for SMPP Backward Compatibility

Backward Compatibility procedures allow a functional entity using one version of the SMPP protocol to communicate with an entity using an older version of the protocol.

The following guidelines must be followed in SMPP implementations to ensure that this process is implemented successfully and consistently:

As the concept of Optional Parameters was introduced in this version of the protocol, the following special guidelines are defined: