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 Octet | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Value | 04 | 0B | 02 | 00 | 08 | 20 | D3 |
Meaning | UDH Length | IEI: Predefined sound | IE Length | Position | Chord high | 6 lower bits of the 1st char + 2 fill bits | 7 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 | Meaning | Classification | Length | May repeat |
00 | Concatenated short messages, 8-bit reference number | SMS Control | 3 | no |
01 | Special SMS Message Indication | SMS Control | 2 | yes |
02 | Reserved | N/A | N/A | yes |
03 | Not used to avoid misinterpretation as | N/A | N/A | yes |
04 | Application port addressing scheme, 8 bit address | SMS Control | 2 | no |
05 | Application port addressing scheme, 16 bit address | SMS Control | 4 | no |
06 | SMSC Control Parameters | SMS Control | 1 | no |
07 | UDH Source Indicator | SMS Control | 1 | yes |
08 | Concatenated short message, 16-bit reference number | SMS Control | 4 | no |
09 | Wireless Control Message Protocol | SMS Control | 1-255 | yes |
0A | Text Formatting | EMS Control | 3-4 | yes |
0B | Predefined Sound | EMS Content | 2 | yes |
0C | User Defined Sound | EMS Content | 2-129 | yes |
0D | Predefined Animation | EMS Content | 2 | yes |
0E | Large Animation | EMS Content | 129 | yes |
0F | Small Animation | EMS Content | 33 | yes |
10 | Large Picture | EMS Content | 129 | yes |
11 | Small Picture | EMS Content | 33 | yes |
12 | Variable Picture | EMS Content | 4-255 | yes |
13 | User prompt indicator | EMS Control | 1 | yes |
14 | Extended Object | EMS Content | 7-255 | yes |
15 | Reused Extended Object | EMS Control | 3 | yes |
16 | Compression Control | EMS Control | 3-255 | no |
17 | Object Distribution Indicator | EMS Control | 2 | yes |
18 | Standard WVG object | EMS Content | 1-255 | yes |
19 | Character Size WVG object | EMS Content | 1-255 | yes |
1A | Extended Object Data Request Command | EMS Control | 0-255 | no |
1B | Reserved for future EMS features | N/A | 0-255 | yes |
1C | Reserved for future EMS features | N/A | 0-255 | yes |
1D | Reserved for future EMS features | N/A | 0-255 | yes |
1E | Reserved for future EMS features | N/A | 0-255 | yes |
1F | Reserved for future EMS features | N/A | 0-255 | yes |
20 | RFC 822 E-Mail Header | SMS Control | 1 | no |
21 | Hyperlink format element | SMS Control | 0-255 | yes |
22 | Reply Address Element | SMS Control | 1-255 | no |
23 | Enhanced Voice Mail Information | SMS Control | 0-255 | no |
24 | National Language Single Shift | SMS Control | 1 | no |
25 | National Language Locking Shift | SMS Control | 1 | no |
26 – 6F | Reserved for future use | N/A | 0-255 | N/A |
70 – 7F | SIM Toolkit Security Headers | SMS Control | 0-255 | ? |
80 – 9F | SME to SME specific use | SMS Control | 0-255 | ? |
A0 – BF | Reserved for future use | N/A | 0-255 | ? |
C0 – DF | SC specific use | SMS Control | 0-255 | ? |
E0 – FF | Reserved for future use | N/A | 0-255 | ? |