History
SMPP (Short Message Peer-to-Peer) was originally designed by Aldiscon, a small Irish company that was later acquired by Logica (since 2016, after a number of changes Mavenir). The protocol was originally created by a developer, Ian J Chambers, to test the functionality of the SMSC without using SS7 test equipment to submit messages. In 1999, Logica formally handed over SMPP to the SMPP Developers Forum, later renamed as The SMS Forum and now disbanded. As part of the original handover terms, SMPP ownership has now returned to Mavenir due to the disbanding of the SMS Forum. To date, SMPP development is suspended and SMS Forum is disbanded. From the SMS Forum website:July 31, 2007 - The SMS Forum, a non-profit organization with a mission to develop, foster and promote SMS (short message service) to the benefit of the global wireless industry will disband by July 27, 2007.A press release, attached to the news, used to warn that site will be suspended soon. In spite of this, the site was mostly functioning and specifications could be downloaded (as of 31 January 2012). As of 12 April 2021, the website owner has changed and the specifications can be download from mirror sites only. In 1995 the
Operation
Contrary to its name, the SMPP uses the client–server model of operation. The Short Message Service Center (SMSC) usually acts as a server, awaiting connections from ESMEs. When SMPP is used for SMS peering, the sending MC usually acts as a client. The protocol is based on pairs of request/response PDUs ( protocol data units, or packets) exchanged overVersions
The SMPP standard has evolved during the time. The most commonly used versions of SMPP are: * SMPP 3.3 the oldest used version (despite its limitations, it is still widely used); supports GSM only. Generates an immediate response for each message sent. * SMPP 3.4 adds optional tag–length–value (TLV) parameters, support of non-GSM SMS technologies and the transceiver support (single connections that can send and receive messages). The exchange of SMPP request and response PDUs between an ESME Transmitter and SMSC may occur synchronously or asynchronously. * SMPP 5.0 is the latest version of SMPP; adds support for cell broadcasting, smart flow control. As of 2019, it is not widely used. The applicable version is passed in the interface_version parameter of a bind command.PDU format (after version 3.4)
The SMPP PDUs are binary encoded for efficiency. They start with a header which may be followed by a body:PDU header
Each PDU starts with a header. The header consists of 4 fields, each of length of 4 octets: ;command_length
: Is the overall length of the PDU in octets (including command_length field itself); must be ≥ 16 as each PDU must contain the 16 octet header
;command_id
: Identifies the SMPP operation (or command). If the most significant bit is cleared, this is a request operation. Otherwise it is a response.
;command_status
: Always has a value of 0 in requests; in responses it carries information about the result of the operation
;sequence_number
: Is used to correlate requests and responses within an SMPP session; allows asynchronous communication (using a sliding window method)
All numeric fields in SMPP use the Example
This is an example of the binary encoding of a 60-octet ''submit_sm'' PDU. The data is shown in Hex octet values as a single dump and followed by a header and body break-down of that PDU. This is best compared with the definition of the submit_sm PDU from the SMPP specification in order to understand how the encoding matches the field by field definition. The value break-downs are shown with decimal in parentheses and Hex values after that. Where you see one or several hex octets appended, this is because the given field size uses 1 or more octets encoding. Again, reading the definition of the submit_sm PDU from the spec will make all this clearer.PDU header
'command_length', (60) ... 00 00 00 3C 'command_id', (4) ... 00 00 00 04 'command_status', (0) ... 00 00 00 00 'sequence_number', (5) ... 00 00 00 05PDU body
'service_type', () ... 00 'source_addr_ton', (2) ... 02 'source_addr_ npi', (8) ... 08 'source_addr', (555) ... 35 35 35 00 'dest_addr_ton', (1) ... 01 'dest_addr_ npi', (1) ... 01 'dest_addr', (555555555) ... 35 35 35 35 35 35 35 35 35 00 'esm_class', (0) ... 00 'protocol_id', (0) ... 00 'priority_flag', (0) ... 00 'schedule_delivery_time', (0) ... 00 'validity_period', (0) ... 00 'registered_delivery', (0) ... 00 'replace_if_present_flag', (0) ... 00 'data_coding', (3) ... 03 'sm_default_msg_id', (0) ... 00 'sm_length', (15) ... 0F 'short_message', (Hello Wikipedia) ... 48 65 6C 6C 6F 20 57 69 6B 69 70 65 64 69 61 Note that the text in the short_message field must match the data_coding. When the data_coding is 8 (UCS2), the text must be in UCS-2BE (or its extension,data_coding=4
or 8
is the same as in SMPP 3.3. Other values in the range 1-15 are reserved in SMPP 3.3. Unfortunately, unlike SMPP 3.3, where data_coding=0 was unambiguously GSM 7-bit default alphabet, for SMPP 3.4 and higher the GSM 7-bit default alphabet is missing in this list, and data_coding=0
may differ for various Short message service centers—it may be data_coding=0
, both sides (ESME and SMSC) must be sure they consider it the same encoding. Otherwise it is better not to use data_coding=0
. It may be tricky to use the GSM 7-bit default alphabet, some Short message service centers requires data_coding=0
, others e.g. data_coding=241
.
Quirks
Despite its wide acceptance, the SMPP has a number of problematic features: * Nodata_coding
for GSM 7-bit default alphabet
* Not standardized meaning of data_coding=0
* Unclear support for Shift-JIS encoding
* Incompatibility of submit_sm_resp
between SMPP versions
* Using of SMPP 3.3 SMSC Delivery Receipts, especially the Message Id format in them
No data_coding for GSM 7-bit default alphabet
Although data_coding value in SMPP 3.3 are based on theNot standardized meaning of data_coding=0
According to SMPP 3.4 and 5.0 thedata_coding=0
means ″SMSC Default Alphabet″. Which encoding it really is, depends on the type of the SMSC and its configuration.
Unclear support for Shift-JIS encoding
One of the encodings in CDMA standard C.R1001 isIncompatibility of submit_sm_resp between SMPP versions
When a submit_sm fails, the SMSC returns asubmit_sm_resp
with non-zero value of command_status and ″empty″ message_id.
* SMPP 3.3 explicitly states about the message_id field
″If absent this field must contain a single NULL byte″. The length of the PDU is at least 17 octets.
* SMPP 3.4 contains an unfortunate note in the SUBMIT_SM_RESP
section ″The submit_sm_resp
PDU Body is not returned if the command_status
field contains a non-zero value.″ Then the length of the PDU is 16 octets.
* SMPP 5.0 just specifies that message_id
is a mandatory parameter of the type C-Octet string of the submit_sm_resp
message. According to the section 3.1.1 NULL Settings, ″A NULL string ″″ is encoded as 0x00″. The length of the PDU is at least 17 octets.
For the best compatibility, any SMPP implementation should accept both variants of negative submit_sm_resp
regardless of the version of SMPP standard used for the communication.
Message ID in SMPP 3.3 SMSC Delivery Receipts
The only way to pass delivery receipts in SMPP 3.3 is to put information in a text form to theshort_message
field; however, the format of the text is described in Appendix B of SMPP 3.4, although SMPP 3.4 may (and should) use receipted_message_id
and message_state
TLVs for the purpose. While SMPP 3.3 states that Message ID is a C-Octet String (Hex) of up to 8 characters (plus terminating '\0'), the SMPP 3.4 specification states that the id field in the Delivery Receipt Format is a C-Octet String (Decimal) of up to 10 characters. This splits SMPP implementations to 2 groups:
* Implementations using the decimal representation of an integer Message Id in the id field of the Delivery Receipt body and the hexadecimal representation of an integer Message Id in message_id
and receipted_message_id
fields
* Implementations using the same hexadecimal number (or even the same arbitrary string) both in message_id
parameter and in the id field of the Delivery Receipt body
The SMPP 3.4 specification does however state that the delivery receipt format is SMSC vendor specific, and therefore the format included in the specification is merely one possibility. As noted above, when using SMPP 3.4 receipted_message_id
and message_state
TLVs should be used to convey the outcome of a message.
Extensibility, compatibility and interoperability
Since introduction of TLV parameters in version 3.4, the SMPP may be regarded angeneric_nack
with command_status=3
to any unrecognised SMPP command, but do not stop the communication.
* Ignore any unrecognised, unexpected or unsupported TLV parameters.
* The borders of PDUs are always given by the PDUs' command_length
field. Any message field must not exceed the end of PDU. If a field is not properly finished, it should be treated as truncated at the end of PDU, and it should not affect further PDUs.
Information applicable to one version of SMPP can often be found in another version of SMPP, for example with the case of SMPP 3.4 describing the only mechanism of delivery receipts in SMPP 3.3 described above.
Security
The SMPP protocol is designed on a clear-text binary protocol which needs to be considered if using for potentially sensitive information such as one-time passwords via SMS. There are, however, implementations of SMPP over secure SSL/TLS if required.See also
* Universal Computer Protocol/External Machine Interface (UCP/EMI) * Computer Interface for Message Distribution (CIMD) * Rich Communication ServicesReferences
External links