Skip to content

Multipart Sms


By design, SMS is developed to send up to 140 bytes of user data. For default encoding, because SMS text messages are encoded using 7-bit characters, you can send up to 160 characters in a single SMS message. When sending Unicode SMS messages, you can only send 70 characters per single SMS message.

It is, however, possible to split up and send them using multiple SMS messages. The receiving headset will be able to combine the messages to the original message. This is called Segmentation and Reassembly (SAR). When sending multipart SMS messages you will be charged for every single SMS message part sent.

The easy way: Message Payload via TLV

Since we have support the optional message payload, just leave the short_message field blank, and copy the whole message data 12 to optional message payload field. All segmentation will be handled by the automatically.

Using User Data Header

On submit_sm PDU, the User Data Header Indicator (UDHI) in the esm_class parameter must be set:

esm_class = 0x40

The concatenation UDH values are inserted at the start of the message body.

For example

Message 1 (UDH+153 chars length message):

esm_class = 0x40

short_message = 0x05 0x00 0x03 0x05 0x02 0x01 First message up to 153 chars

Message 2 (UDH+rest of the message):

esm_class = 0x40

short_message =  0x05 0x00 0x03 0x05 0x02 0x02 part 2 / rest of the message content.

Esme->SMSC: bind_receiver
SMSC->>Esme: bind_receiver_resp
Note left of SMSC: Multipart SMS
Esme->SMSC: submit_sm (part 1)
SMSC->>Esme: submit_sm_resp (part 1)
Esme->SMSC: submit_sm (part 2)
SMSC->>Esme: submit_sm_resp (part 2)
Esme->SMSC: submit_sm (part n)
SMSC->>Esme: submit_sm_resp (part n)
Note right of Message Center: A message delivery \nhappens @ 📱
SMSC-->Message Center: Network Delivery
Message Center-->>SMSC: ACK
SMSC-->>Esme: deliver_sm (one for all parts)
Esme->SMSC: deliver_sm_resp

Concatenation UDH structure:

Value Byte Description
05 01 Length of UDH (5 bytes)
00 02 IE Indicator for concatenated message
03 03 IE Data Length (3 bytes)
B4 04 IE Data: message identification - can be any hexadecimal number but must be same for all parts of a message
02 05 IE Data: Number of pieces of the concatenated message (2)
01 06 IE Data: Number of this part (½)

Encodings and message lengths with UDH

If no other UDH indicator element used, the UDH for message concatenation will only take 5 bytes, so there are 135 bytes left for the message payload. When sending concatenated text messages, you can send:

  • 153 characters for 7-bit encoding (e.g. Latin-1 and GSM8)
  • 134 characters for 8-bit encoding (Binary)
  • 67 characters for 16-bit encoding (Unicode)

  1. Optional message payload supports up to 65536 bytes 

  2. We support up to 7 segmented messages