Long SMS Messages
image ©bulksms.com



A standard SMS message will send messages of at most 160 7-bit characters to a recipient. But what if the message to be sent is longer than this. The PDU SMS protocol allows for this and the message is split into many SMS messages. These are then combined back together by the receiver. These are called long or concatenated SMS messages. When the message to be sent is longer than 160 7-bit characters then the sending App splits the long message into the correct number of SMS messages and sends these as individual SMS messages. The receiving app will receive the individual SMS messages, and piece together the full long message for display on the receiver's device. Note that the receiver will not necessarily receive the individual messages in the correct order.

In the SMS message header the second octlet is set to 11 for an SMS message, this is changed to 41 for a concatenated or long SMS message, on each of the SMS messages making up the long message.

The UDH (User Data Header) in a Long SMS message takes up the space of 7 [7-bit] characters, split into 6 8-bit values. Decoding the header of a Long SMS using the example '050003A60201' for the User Date Header (UDH) :

05Length of the header
00Type of Message
03Length of header data
A6Unique number for SMS message
02How many parts
01Part Number

Within this UDH there is a value 00 to FF to indicate the number of SMS messages making up the long message and a second number indicating the sequence number of this data. This allows the receiver to put the message back together correctly. For messages that are part of a long SMS, each part can have 153 7-bit characters. Theoretically a message of 37788 characters can be sent over SMS as a single Long SMS but a more realistic limit is 5 SMS messages or 760 characters.