v3 SMS SMPP
Sending Multipart Messages via SMPP
When sending a multipart message, SMPP requires you to send each message part using a separate request. Each request must include a UDH in the message text that indicates that it is part of a multipart message. The two relevant parameters in the PDU body are:
- esm_class — set the value to 0x40 (this is 64 in decimal) to indicate that there is a UDH.
- short_message — add the UDH information at the beginning of the message.
The UDH requires 6 bytes, which means that the number of characters you can send in each message part is reduced. The UDH required in each message part is described in this table.
Byte |
Description |
---|---|
05 |
Length of the rest of the UDH. This is "5" bytes. |
00 |
Indicates it is a multipart message. |
03 |
Length of the subheader; e.g., the rest of the UDH. This is "3" bytes. |
XX |
An identifier for the specific multipart message. This can be any hexadecimal number, as long as the value is the same for all of the message parts. In the example below, this is "44". |
YY |
Total number of parts in the multipart message. In the example below, there are "03" parts in total. |
ZZ |
The sequence number for the message part. This ensures that the message is reconstructed on the mobile phone in the right order. The numbering begins at 1. |
Example message with UDH
This example shows the short_message, including UDH, for a Shakespeare phrase that is 327 characters long. Our message is being sent to a UK number, so each part is up to 153 GSM characters. You can see that the first five bytes remain the same across all parts, while the sixth byte changes to indicate the sequence number.
Part one
0x05 0x00 0x03 0x44 0x03 0x01 I will not yield, to kiss the ground before young Malcolm's feet, and to be baited with the rabble's curse. Though Birnam wood be come to Dunsinane, and
Part two
0x05 0x00 0x03 0x44 0x03 0x02 thou opposed, being of no woman born, yet I will try the last. Before my body I throw my warlike shield. Lay on, Macduff, and damn'd be him that first cr
Part three
0x05 0x00 0x03 0x44 0x03 0x03 ies, 'Hold, enough!'
Character length and encoding differences between regions
You'll need to adjust the message length for each part based on the maximum number of characters the local mobile operators accept. In almost all countries, each part can be up to 153 characters (using GSM) or 67 characters (using UCS-2 / UTF-16). However, there are a few countries where the maximum size is smaller, such as Canada, Chile, Brazil and Ecuador. You can find out more about the message length limits, and what character set is predominantly used in a country, in the Global Coverage section of this site.
What happens when OpenMarket receives the request?
OpenMarket will check that the message length for each part before accepting or rejecting the part. If you are using GSM, then we may re-encode the message to Latin 1, as some mobile operators only accept this encoding. In all other instances, we forward on the message to the mobile operator using the encoding in your request.
In most cases, the mobile operator will then accept (and deliver) the message. However, an operator may reject the message if you have used Latin 1 with GSM escape characters, as the byte length for the escape characters is longer than Latin 1.