GSM 03.40
   HOME

TheInfoList



OR:

GSM 03.40 or 3GPP TS 23.040 is a
mobile telephony Mobile telephony is the provision of telephone services to phones which may move around freely rather than stay fixed in one location. Telephony is supposed to specifically point to a voice-only service or connection, though sometimes the li ...
standard describing the format of the Transfer Protocol Data Units (TPDU) of the Short Message Transfer Protocol (SM-TP) used in the GSM networks to carry Short Messages. This format is used throughout the whole transfer of the message in the GSM
mobile network A cellular network or mobile network is a communication network where the link to and from end nodes is wireless. The network is distributed over land areas called "cells", each served by at least one fixed-location transceiver (typically thre ...
. In contrast, application servers use different protocols, like Short Message Peer-to-Peer or
Universal Computer Protocol {{refimprove, date=March 2019 External Machine Interface (EMI), an extension to Universal Computer Protocol (UCP), is a protocol primarily used to connect to short message service centres (SMSCs) for mobile telephones. The protocol was developed by ...
, to exchange messages between them and the Short Message Service Center (SMSC). GSM 03.40 is the original name of the standard. Since 1999 it is being developed by the 3GPP under the name 3GPP TS 23.040. However, the original name is often used to refer even to the 3GPP document.


Usage

The GSM 03.40 TPDUs are used to carry messages between the Mobile Station (MS) and Mobile Switching Centre (MSC) using the Short Message Relay Protocol (SM-RP), while between MSC and
Short Message Service Centre A Short Message Service Center (SMSC) is a network element in the mobile telephone network. Its purpose is to store, forward, convert and deliver Short Message Service (SMS) messages. The full designation of an SMSC according to 3GPP is ''Sh ...
(SMSC) the TPDUs are carried as a parameter of a
Mobile Application Part The Mobile Application Part (MAP) is an SS7 protocol that provides an application layer for the various nodes in GSM and UMTS mobile core networks and GPRS core networks to communicate with each other in order to provide services to users. The ...
(MAP) package.3rd Generation Partnership Project; Technical realization of the Short Message Service (SMS) (3G TS 23.040 version 11.5.0)
(zipped .doc file), ETSI, March 2013.
In emerging networks which use
IP Multimedia Subsystem The IP Multimedia Subsystem or IP Multimedia Core Network Subsystem (IMS) is a standardised architectural framework for delivering IP multimedia services. Historically, mobile phones have provided voice call services over a circuit-switched-styl ...
(IMS) Short Messages are carried in the MESSAGE command of
Session Initiation Protocol The Session Initiation Protocol (SIP) is a signaling protocol used for initiating, maintaining, and terminating communication sessions that include voice, video and messaging applications. SIP is used in Internet telephony, in private IP telepho ...
(SIP). Even in these IP-based networks an option exists which (due to compatibility reasons) defines transfer of Short Messages in the GSM 03.40 format embedded in 3GPP 24.011 as Content-Type: application/vnd.3gpp.sms.3GPP TS 24.451
Support of SMS and MMS over NGN IMS subsystem; Stage 3 of 3GPP TS 24.341 Release 7


TPDU Types

GSM 03.40 defines six types of messages, which are distinguished by the message direction and the two least significant bits in the first octet of SM-TP message (the TP-MTI field): SMS-SUBMIT is used to submit a short message from a
mobile phone A mobile phone, cellular phone, cell phone, cellphone, handphone, hand phone or pocket phone, sometimes shortened to simply mobile, cell, or just phone, is a portable telephone that can make and receive calls over a radio frequency link whil ...
(Mobile Station, MS) to a
short message service centre A Short Message Service Center (SMSC) is a network element in the mobile telephone network. Its purpose is to store, forward, convert and deliver Short Message Service (SMS) messages. The full designation of an SMSC according to 3GPP is ''Sh ...
(SMSC, SC). SMS-SUBMIT-REPORT is an acknowledgement to the SMS-SUBMIT; a success means that the message was stored (buffered) in the SMSC, a failure means that the message was rejected by the SMSC. SMS-COMMAND may be used to query for a message buffered in the SMSC, to modify its parameters or to delete it. SMS-DELIVER is used to deliver a message from SMSC to a mobile phone. The acknowledgement returned by the mobile phone may optionally contain a SMS-DELIVER-REPORT. When home routing applies, SMS-DELIVER is used to submit messages from an SMSC to another one. SMS-STATUS-REPORT may be sent by the SMSC to inform the originating mobile phone about the final outcome of the message delivery or to reply to a SMS-COMMAND.


TPDU Fields

The fields of SM-TP messages, including their order and size, are summarized in the following table, where M means a mandatory field, O an optional field, E is used for fields which are mandatory in negative responses (RP-ERR) and not present in positive responses (RP-ACK), x is a field present elsewhere: The first octet of the TPDU contains various flags including the TP-MTI field described above: By setting the TP-More-Messages-to-Send (TP-MMS) bit to 0 (reversed logic), the SMSC signals it has more messages for the recipient (often further segments of a concatenated message). The MSC usually does not close the connection to the mobile phone and does not end the MAP dialogue with the SMSC, which allows faster delivery of subsequent messages or message segments. If by coincidence the further messages vanish from the SMSC in the meantime (when they are for example deleted), the SMSC terminates the MAP dialogue with a MAP Abort message. The TP-Loop-Prevention (TP-LP) bit is designed to prevent looping of SMS-DELIVER or SMS-STATUS-REPORT messages routed to a different address than is their destination address or generated by an application. Such message may be sent only if the original message had this flag cleared and the new message must be sent with the flag set. By setting the TP-Status-Report-Indication (TP-SRI) bit to 1, the SMSC requests a status report to be returned to the SME. By setting the TP-Status-Report-Request (TP-SRR) bit to 1 in a SMS-SUBMIT or SMS-COMMAND, the mobile phone requests a status report to be returned by the SMSC. When the TP-SRQ has value of 1 in an SMS-STATUS-REPORT message, the message is the result of an SMS-COMMAND; otherwise it is a result of an SMS-SUBMIT. When TP-UDHI has value 1, the TP-UD field starts with
User Data Header User Data Header (UDH) is a binary structure which may be present at the start of a short message in the Short Message Service in GSM. It does not contain any text, but it specifies how the message should be formatted and processed. UDH can be use ...
. Setting the TP-RP bits turns on a feature which allows to send a reply for a message using the same path as the original message. If the originator and the recipient home networks differ, the reply would go through another SMSC then usually. The mobile operator must take special measures to charge such messages. Both SM-RP and MAP used to transmit GSM 03.40 TPDU carry enough information to return acknowledgement—the information whether a request was successful or not. However, a GSM 03.40 TPDU may be included in the acknowledgement to carry even more information. The GSM 03.40 has undergone the following development: * Up to GSM 03.40 5.2.0 SMS-DELIVER-REPORT and SMS-SUBMIT-REPORT was sent only in the case of an error. Since 5.3.0 they are sent in case of success as well. MO-ForwardSM-Res was introduced back in GSM 09.02 5.6.0 August 1997 * Up to GSM 03.40 6.0.0 SMS-DELIVER-REPORT and SMS-SUBMIT-REPORT sent in case of an error contained only TP-MTI and TP-FCS fields and the last field in SMS-STATUS-REPORT was TP-ST. Since version 6.1.0 these TPDUs has format shown in the table above. Although these changes are ancient (version 6.1.0 occurred in July 1998), old formats of MAP are frequently seen even in today's networks.


Message Content

The content of the message (its text when the message is not a binary one) is carried in the TP-UD field. Its size may be up to 160 × 7 = 140 × 8 = 1120 bits. Longer messages can be split into multiple parts and sent as a
Concatenated SMS In the cellular phone industry, mobile phones and their networks sometimes support concatenated short message service (or concatenated SMS) to overcome the limitation on the number of characters that can be sent in a single SMS text message transmis ...
. The length of message content is given in the TP-UDL field. When the message encoding is GSM 7-bit default alphabet (depends on TP-DCS field), the TP-UDL gives length of TP-UD in 7-bit units; otherwise TP-UDL gives length of the TP-UD in octets. When TP-UDHI is 1, the TP-UD starts with
User Data Header User Data Header (UDH) is a binary structure which may be present at the start of a short message in the Short Message Service in GSM. It does not contain any text, but it specifies how the message should be formatted and processed. UDH can be use ...
(UDH); in this case the first octet of the TP-UD is User Data Header Length (UDHL) octet, containing the length of the UDH in octets without UDHL itself. UDH eats room from the TP-UD field. When the message encoding is GSM 7-bit default alphabet and a UDH is present, fill bits are inserted to align start of the first character of the text after UDH with septet boundary. This behaviour was designed for older mobile phones which don't understand UDH; such mobile phones might display the UDH as a jumble of strange characters; if the first character after UDH was Carriage Return (CR), the mobile phone would rewrite the message with the rest of the message.


Addresses

A GSM 03.40 message contains at most one address: destination address (TP-DA) in SMS-SUBMIT and SMS-COMMAND, originator address (TP-OA) in SMS-DELIVER and recipient address (TP-RA) in SMS-STATUS-REPORT. Other addresses are carried by lower layers. The format of addresses in the GSM 03.40 is described in the following table: Type of number (TON): If a subscriber enters a telephone number with `+' sign at its start, the `+' sign will be removed and the address gets TON=1 (international number), NPI=1. The number itself must always start with a country code and must be formatted exactly according to the E.164 standard. In contrast, for numbers written without `+' sign the address gets TON=0 (unknown), NPI=1. In this case the number must adhere to the mobile operator's
dial plan In telecommunication, a dial plan (or dialing plan) establishes the permitted sequences of digits dialed by telephone subscriber and the manner in which a telephone switch interprets these digits within the definitions of the prevailing telephone nu ...
, which means that international numbers must have the international prefix (00 in most countries, but 011 in the USA) before the country code and numbers for long-distance calls must start with the trunk prefix (0 in most countries, 1 in the USA) followed by a trunk code. Numbering plan identification (NPI): Telephone numbers should have NPI=1. Application servers may use alphanumeric addresses which have TON=5, NPI=0 combination. The EXT bit is always 1 meaning "no extension".


Address examples

U.S. number +1 555 123 4567 would be encoded as 0B 91 51 55 21 43 65 F7 (the F in upper four bits of the last octet is a filler which is used when the number length is odd). Alphanumeric address is at first put to the GSM 7-bit default alphabet, then encoded the same way as any message text in TP-UD field (that means it is 7-bit packed) and then the address is supplied with the "number" length and TON and NPI. For example, a fictional alphanumeric address ''Design@Home'' is converted to the GSM 7-bit default alphabet which yields 11 bytes 44 65 73 69 67 6E 00 48 6F 6D 65 (hex), the 7-bit packing transforms it to 77 bits stored in 10 octets as C4 F2 3C 7D 76 03 90 EF 76 19; 77 bits is 20
nibble In computing, a nibble (occasionally nybble, nyble, or nybl to match the spelling of byte) is a four-bit aggregation, or half an octet. It is also known as half-byte or tetrade. In a networking or telecommunication context, the nibble is oft ...
s (14 hex) which is the value of the first octet of the address. The second octet contains TON (5) and NPI (0), which yields D0 hex. The complete address in the GSM format is 14 D0 C4 F2 3C 7D 76 03 90 EF 76 19.


Message Reference

The Message Reference field (TP-MR) is used in all messages on the submission side with exception of the SMS-SUBMIT-REPORT (that is in SMS-SUBMIT, SMS-COMMAND and SMS-STATUS-REPORT). It is a single-octet value which is incremented each time a new message is submitted or a new SMS-COMMAND is sent. If the message submission fails, the mobile phone should repeat the submission with the same TP-MR value and with the TP-RD bit set to 1.


Time Format

A date and time used in TP-SCTS, TP-DT and in Absolute format of TP-VP is stored in 7 octets: In all octets the values are stored in binary coded decimal format with switched digits (number 35 is stored as 53 hex). Time zone is given in quarters of an hour. If the time zone offset is negative (in Western hemisphere) bit 3 of the last octet is set to 1. 23:01:56 Mar 25th 2013 PST (GMT-7) would be encoded as 31 30 52 32 10 65 8A. In this example, the time zone, 8A is binary 1000 1010. Bit 3 is 1, therefore the time zone is negative. The remaining number (bit-wise 'and' with 1111 0111) is 1000 0010, hexadecimal 82. Treat this as any previous element in the sequence, (hex 82 represents number 28). Finally the time zone offset is given by 28 × 15 minutes = 420 minutes (7 hours).


Validity Period

An SMS-SUBMIT TPDU may contain a TP-VP parameter which limits the time period for which the SMSC would attempt to deliver the message. However, the validity period is usually limited globally by the SMSC configuration parameter— often to 48 or 72 hours. The Validity Period format is defined by the Validity Period Format field:


Relative format


Absolute format

The absolute format is identical to the other time formats in GSM 03.40.


Enhanced format

Enhanced format of TP-VP field is seldom used. It has always 7 octets, although some of them are not used. The first octet is TP-VP Functionality Indicator. Its 3 least significant bits have the following meaning: The value of 1 in the bit 6 of the first octet means that the message is Single-shot. The value of 1 in the bit 7 of the first octet indicates that TP-VP functionality indicator extends to another octet. However, no such extensions are defined.


Protocol Identifier

TP-PID (Protocol identifier) either refers to the higher layer protocol being used, indicates interworking with a certain type of telematic device (like fax, telex, pager,
teletex Teletex was ITU-T specification F.200 for a text and document communications service that could be provided over telephone lines. It was rapidly superseded by e-mail but the name ''Teletex'' lives on in several of the X.500 standard attributes u ...
, e-mail), specifies replace type of the message or allows download of configuration parameters to the SIM card. Plain MO-MT messages have PID=0. For TP-PID = 63 the SC converts the SM from the received TP
Data Coding Scheme Data Coding Scheme is a one-octet field in Short Messages (SM) and Cell Broadcast Messages (CB) which carries a basic information how the recipient handset should process the received message. The information includes: * the character set or mess ...
to any data coding scheme supported by that MS (e.g. the default). Short Message Type 0 is known as a silent SMS. Any handset must be able to receive such short message irrespective of whether there is memory available in the (U)SIM or ME or not, must acknowledge receipt of the message, but must not indicate its receipt to the user and must discard its contents, so the message will not be stored in the (U)SIM or ME.


Data Coding Scheme

A special 7-bit encoding called ''GSM 7 bit default alphabet'' was designed for Short Message System in GSM. The alphabet contains the most-often used symbols from most Western-European languages (and some Greek uppercase letters). Some
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
characters and the
Euro sign The euro sign () is the currency sign used for the euro, the official currency of the eurozone and unilaterally adopted by Kosovo and Montenegro. The design was presented to the public by the European Commission on 12 December 1996. It consists ...
did not fit into the GSM 7-bit default alphabet and must be encoded using two septets. These characters form GSM 7-bit default alphabet ''extension table''. Support of the GSM 7-bit alphabet is mandatory for GSM handsets and network elements. Languages which use
Latin script The Latin script, also known as Roman script, is an alphabetic writing system based on the letters of the classical Latin alphabet, derived from a form of the Greek alphabet which was in use in the ancient Greek city of Cumae, in southern Italy ...
, but use characters which are not present in the GSM 7-bit default alphabet, often replace missing characters with
diacritic A diacritic (also diacritical mark, diacritical point, diacritical sign, or accent) is a glyph added to a letter or to a basic glyph. The term derives from the Ancient Greek (, "distinguishing"), from (, "to distinguish"). The word ''diacriti ...
marks with corresponding characters without diacritics, which causes not entirely satisfactory user experience, but is often accepted. For best look the 16-bit UTF-16 (in GSM called UCS-2) encoding may be used at price of reducing length of a (non segmented) message from 160 to 70 characters. The messages in Chinese, Korean or Japanese languages must be encoded using the UTF-16 character encoding. The same was also true for other languages using non-Latin scripts like Russian, Arabic, Hebrew and various Indian languages. In 3GPP TS 23.038 8.0.0 published in 2008 a new feature, an extended National language shift table was introduced, which in the version 11.0.0 published in 2012 covers
Turkish Turkish may refer to: *a Turkic language spoken by the Turks * of or about Turkey ** Turkish language *** Turkish alphabet ** Turkish people, a Turkic ethnic group and nation *** Turkish citizen, a citizen of Turkey *** Turkish communities and mi ...
, Spanish, Portuguese,
Bengali Bengali or Bengalee, or Bengalese may refer to: *something of, from, or related to Bengal, a large region in South Asia * Bengalis, an ethnic and linguistic group of the region * Bengali language, the language they speak ** Bengali alphabet, the w ...
,
Gujarati Gujarati may refer to: * something of, from, or related to Gujarat, a state of India * Gujarati people, the major ethnic group of Gujarat * Gujarati language, the Indo-Aryan language spoken by them * Gujarati languages, the Western Indo-Aryan sub- ...
,
Hindi Hindi (Devanāgarī: or , ), or more precisely Modern Standard Hindi (Devanagari: ), is an Indo-Aryan language spoken chiefly in the Hindi Belt region encompassing parts of northern, central, eastern, and western India. Hindi has been de ...
,
Kannada Kannada (; ಕನ್ನಡ, ), originally romanised Canarese, is a Dravidian language spoken predominantly by the people of Karnataka in southwestern India, with minorities in all neighbouring states. It has around 47 million native s ...
,
Malayalam Malayalam (; , ) is a Dravidian language spoken in the Indian state of Kerala and the union territories of Lakshadweep and Puducherry (Mahé district) by the Malayali people. It is one of 22 scheduled languages of India. Malayalam was des ...
, Oriya,
Punjabi Punjabi, or Panjabi, most often refers to: * Something of, from, or related to Punjab, a region in India and Pakistan * Punjabi language * Punjabi people * Punjabi dialects and languages Punjabi may also refer to: * Punjabi (horse), a British Th ...
,
Tamil Tamil may refer to: * Tamils, an ethnic group native to India and some other parts of Asia ** Sri Lankan Tamils, Tamil people native to Sri Lanka also called ilankai tamils **Tamil Malaysians, Tamil people native to Malaysia * Tamil language, nati ...
,
Telugu Telugu may refer to: * Telugu language, a major Dravidian language of India *Telugu people, an ethno-linguistic group of India * Telugu script, used to write the Telugu language ** Telugu (Unicode block), a block of Telugu characters in Unicode S ...
and
Urdu Urdu (;"Urdu"
''
User Data Header User Data Header (UDH) is a binary structure which may be present at the start of a short message in the Short Message Service in GSM. It does not contain any text, but it specifies how the message should be formatted and processed. UDH can be use ...
. The non-segmented message using national language shift table(s) may carry up to 155 (or 153) 7-bit characters. The
Data Coding Scheme Data Coding Scheme is a one-octet field in Short Messages (SM) and Cell Broadcast Messages (CB) which carries a basic information how the recipient handset should process the received message. The information includes: * the character set or mess ...
(TP-DCS) field contains primarily information about message encoding. GSM recognizes only 2 encodings for text messages and 1 encoding for binary messages: * GSM 7-bit default alphabet (which includes using of National language shift tables as well) * UCS-2 * 8-bit data The TP-DCS octet has a complex syntax to allow carrying of other information; the most notable are message classes: Flash messages are received by a mobile phone even though it has full memory. They are not stored in the phone, they just displayed on the phone display. Another feature available through TP-DCS is Automatic Deletion: after reading the message is deleted from the phone. Message Waiting Indication group of DCS values can set or reset flags of indicating presence of unread
voicemail A voicemail system (also known as voice message or voice bank) is a computer-based system that allows users and subscribers to exchange personal voice messages; to select and deliver voice information; and to process transactions relating to ind ...
, fax, e-mail or other messages. A special DCS values also allows message compression, but it perhaps is not used by any operator. The values of TP-DCS are defined in GSM recommendation 03.38. Messages sent via this encoding can be encoded in the default GSM 7- bit alphabet, the 8-bit data alphabet, and the 16-bit UCS-2 alphabet.3GPP TS 23.038
Alphabets and language-specific information.


Discharge Time

The TP-DT field indicates the time and date associated with a particular TP-ST outcome: * if the message has been delivered or, more generally, other transaction completed (TP-ST is 0-31), the TP-DT is the time of the completion of the transaction * if the SMSC is still trying to deliver the message (TP-ST is 32-63), the TP-DT is the time of the last delivery attempt * if the SMSC is not making any more delivery attempts (TP-ST is 64-127), the TP-DT is either the time of the last delivery attempt or the time at which the SMSC disposed the message


Parameter Indicator

The TP-PI field indicates presence of further fields in the SUBMIT-REPORT, DELIVER-REPORT or SMS-STATUS-REPORT TPDU. As currently there are still four free bits in TP-PI, it can be expected that the extension bit will be zero even in the future, which helps to distinguish TP-PI field from TP-FCS field when information whether TPDU is part of positive or negative response is not available: if the most significant bit of the second octet of TPDU is 1, the second octet is TP-FCS (in a negative response), otherwise it is TP-PI (in a positive response).


See also

*
Short Message Service Short Message/Messaging Service, commonly abbreviated as SMS, is a text messaging service component of most telephone, Internet and mobile device systems. It uses standardized communication protocols that let mobile devices exchange short text ...
*
GSM 03.38 In mobile telephony GSM 03.38 or 3GPP 23.038 is a character encoding used in GSM networks for SMS (Short Message Service), CB (Cell Broadcast) and USSD (Unstructured Supplementary Service Data). The 3GPP TS 23.038 standard (originally GSM recommend ...
*
Data Coding Scheme Data Coding Scheme is a one-octet field in Short Messages (SM) and Cell Broadcast Messages (CB) which carries a basic information how the recipient handset should process the received message. The information includes: * the character set or mess ...
*
User Data Header User Data Header (UDH) is a binary structure which may be present at the start of a short message in the Short Message Service in GSM. It does not contain any text, but it specifies how the message should be formatted and processed. UDH can be use ...
*
Concatenated SMS In the cellular phone industry, mobile phones and their networks sometimes support concatenated short message service (or concatenated SMS) to overcome the limitation on the number of characters that can be sent in a single SMS text message transmis ...
* Short message service technical realisation (GSM) * Enhanced Messaging Service *
Multimedia Messaging Service Multimedia Messaging Service (MMS) is a standard way to send messages that include multimedia content to and from a mobile phone over a cellular network. Users and providers may refer to such a message as a PXT, a picture message, or a multimedia ...
* Short Message Peer-to-Peer *
Universal Computer Protocol {{refimprove, date=March 2019 External Machine Interface (EMI), an extension to Universal Computer Protocol (UCP), is a protocol primarily used to connect to short message service centres (SMSCs) for mobile telephones. The protocol was developed by ...


References

{{Reflist GSM standard