User Data Header


User Data Header 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 used to form Concatenated SMS, to enrich the content of the message with colors, text formatting, small pictures and animations and simple music which are used in Enhanced Messaging Service, to convey port numbers which may cause start of an application in the mobile phone, which is used for Multimedia Messaging Service or to indicate using of national language shift tables.
UDH is defined in 3GPP 23.040.

Technical Realization

Presence of User Data Header is indicated by the TP-UDHI bit - 6th bit of the first octet of the GSM 03.40 or 3GPP 23.040 message.
If UDH is present, it is at the beginning of the TP-UD field and it always starts with an UDHL octet. The rest of UDH is a sequence of Tag-Length-Value triplets. The Tag is named Information-Element-Identifier and is always 1 octet long, the Length octet is always 1 octet long and it specifies the length of the Information Element Data.
UDH uses space intended for the message payload. The longer the UDH, the less space remains for the message text or other contents. When TP-UD contains seven-bit data, the length of TP-UD is given in septets and the UDH is filled to a septet boundary with 0-6 zero bits. The next table shows how a TP-UD of a message in the GSM 7 bit default alphabet containing text 'Hi' with a predefined sound 'Chord high' will be encoded:
TP-UD Octet1234567
Value 040B02000820D3
MeaningUDH LengthIEI: Predefined soundIE LengthPositionChord high6 lower bits of the 1st char + 2 fill bits7 lower bits of the 2nd char + 1 upper bit of the first char

The total message length TP-UDL will be 8. = 40 bits, 2 bits is the padding as

UDH Information Elements

IEI MeaningClassificationLengthMay repeat
00Concatenated short messages, 8-bit reference numberSMS Control3no
01Special SMS Message IndicationSMS Control2yes
02ReservedN/AN/Ayes
03Not used to avoid misinterpretation as characterN/AN/Ayes
04Application port addressing scheme, 8 bit addressSMS Control2no
05Application port addressing scheme, 16 bit addressSMS Control4no
06SMSC Control ParametersSMS Control1no
07UDH Source IndicatorSMS Control1yes
08Concatenated short message, 16-bit reference numberSMS Control4no
09Wireless Control Message ProtocolSMS Control1-255yes
0AText FormattingEMS Control3-4yes
0BPredefined SoundEMS Content2yes
0CUser Defined Sound EMS Content2-129yes
0DPredefined AnimationEMS Content2yes
0ELarge Animation EMS Content129yes
0FSmall Animation EMS Content33yes
10Large Picture EMS Content129yes
11Small Picture EMS Content33yes
12Variable PictureEMS Content4-255yes
13User prompt indicatorEMS Control1yes
14Extended ObjectEMS Content7-255yes
15Reused Extended ObjectEMS Control3yes
16Compression ControlEMS Control3-255no
17Object Distribution IndicatorEMS Control2yes
18Standard WVG objectEMS Content1-255yes
19Character Size WVG objectEMS Content1-255yes
1AExtended Object Data Request CommandEMS Control0-255no
1BReserved for future EMS featuresN/A0-255yes
1CReserved for future EMS featuresN/A0-255yes
1DReserved for future EMS featuresN/A0-255yes
1EReserved for future EMS featuresN/A0-255yes
1FReserved for future EMS featuresN/A0-255yes
20RFC 822 E-Mail HeaderSMS Control1no
21Hyperlink format elementSMS Control0-255yes
22Reply Address ElementSMS Control1-255no
23Enhanced Voice Mail InformationSMS Control0-255no
24National Language Single ShiftSMS Control1no
25National Language Locking ShiftSMS Control1no
26 – 6FReserved for future useN/A0-255N/A
70 – 7FSIM Toolkit Security HeadersSMS Control0-255?
80 – 9FSME to SME specific useSMS Control0-255?
A0 – BFReserved for future useN/A0-255?
C0 – DFSC specific useSMS Control0-255?
E0 – FFReserved for future useN/A0-255?

Use in Other Protocols

The UDH is used in other protocols for short message transport - Short Message Peer-to-Peer, Universal Computer Protocol and in WEMT teleservice in CDMA2000.