Concatenated SMS
As a standard SMS can only contain 160 7-bit GSM characters, concatenated SMS are used to send long SMS. Concatenation allows a sender to send more than one SMS which then get stuck together automatically by the phone to appear as one message.
For sending messages, our SMS API will automatically take care of the settings need to do this as long as the ‘Concat’ parameter is set when sending the message. The Concat parameter can take the value of 1, 2 or 3, and indicates how many SMS you are willing to use to attempt to send a message.
However, if you have messages which are sent from phones to your application (MO Messages), an understanding of how concatenation works can be useful if users are likely to send messages over 160 characters.
User Data Header (UDH)
The SMS that make up a concatenated SMS are related together by using the User Data Header (UDH) of an SMS. The UDH is a collection of bytes which can be put at the start of the SMS content. It can be used to control what happens to the rest of the content. For instance, it was used to send the older style of Nokia picture messages.
To indicate that the content contains a UDH, a flag on the SMS called the UDH Indicator (UDHI) must be turned on. This tells the phone that it must separate the UDH from the rest of the content.

The phone separates the UDH by reading the first byte of the content. The number in this byte is the length of the rest of UDH and is called the User Data Header Length (UDHL). The phone then knows how many bytes make up the UDH and can separate it from the rest of the message.
As already stated, a UDH can control various things and so can contain various commands. These commands are called Information Elements (IE’s). These IE’s always take the following format: an Identity Element Identifier (IEI) followed by the Length of the IE Data (IEDL) followed by the IE Data (IED). A UDH can contain 1 or more of these IE’s.
UDH’s for Concatenated SMS
For concatenated messages the IE’s that we are interested in are the ones with Identifiers (IEI) of 00 or 08. These indicate that the rest of the message is a concatenated message.
Let’s take an example of using the 00 Information Element Identifier.
The 00 IEI always has an IEDL of 03. That is, there are 3 bytes in the IE Data section.
The first byte is a reference number. This reference number must be the same for all SMS that make up a particular concatenated message.
The second byte is the total number of SMS that go to make up the concatenated message.
The third byte is the part number that this particular SMS is.
So if we have a message that is split across two SMS the bytes in the SMS may be:
1
2
First SMS: 05 00 03 A6 02 01 .. bytes that make up the first part text ..
Second SMS: 05 00 03 A6 02 02 .. bytes that make up the second part text ..
Bytes | Description |
---|---|
05 | The UDHL, or length of the UDH. So the following five bytes are UDH |
00 | This is the IEI. This identifier says this is a concatenated message |
03 | This is the IEDL. It says that next 3 bytes are the data for this IE. |
A6 | The reference number of this concatenated message. Each part must have the same reference number. |
02 | There are two parts to this concatenated message. |
01 or 02 | This indicates whether the SMS is the first or second part. |
The 08 identifier works the same way as the 00, but instead of a 1 byte reference number, it uses a 2 byte (16 bit) reference number. Therefore its IEDL is 04, there are 4 bytes in the IE Data section. These are as follows:
The first and second bytes make up the 16-bit reference number.
The third byte is the total number of SMS that go to make up the concatenated message.
The forth byte is the part number that this particular SMS is.
So another two SMS examples could be:
1
2
First SMS: 06 08 04 F4 2E 02 01 .. bytes that make up the first part text ..
Second SMS: 06 08 04 F4 2E 02 02 .. bytes that make up the second part text ..
Bytes | Description |
---|---|
06 | The UDHL, or length of the UDH. So the following six bytes are UDH |
08 | This is the IEI. This identifier says this is a concatenated message with 16-bit reference |
04 | This is the IEDL. It says that next 4 bytes are the data for this IE. |
F42E | The reference number of this concatenated message. Each part must have the same reference number. |
02 | There are two parts to this concatenated message. |
01 or 02 | This indicates whether the SMS is the first or second part. |
The API
As mentioned at the start of this article, our API will take care of all of this for sending messages. All you do is set the ‘Concat’ field to maximum SMS that you are willing to use to send a message.
For receiving messages, our API will forward through the individual SMS that make up a concatenated message. The UDH is already removed from the content and is present in the UDH parameter as the hex encoded bytes. The rest of the content is placed into the Payload parameter.
For most single SMS, a UDH parameter will not be present and so the parameter will be blank. But for concatenated SMS, the receiving script can check the UDH for the 00 or 08 IEI’s to allow it to piece together the original message.