Docs

Encodings

data_coding

0x00 GSM 7-bit (default), 0x08 UCS-2. With 0x00 we read the text as GSM 7-bit. Use 0x08 for text with characters outside GSM 7-bit, such as emoji or Chinese.

Encodingdata_codingOne partEach part of a long text
GSM 7-bit0x00160 characters153 characters
UCS-20x0870 characters67 characters
  • GSM 7-bit: write one character per byte (unpacked septets), not packed. A character from the extension table, € [ ] { } ^ ~ | \ and form feed, is an escape byte 0x1B and one more, so it counts as 2.
  • UCS-2: two bytes per character, big-endian. Use it for any character outside GSM 7-bit, such as an emoji or a non-Latin letter. An emoji takes two UCS-2 characters.

The sizes for a long text assume the 6-byte UDH with an 8-bit reference, below. The 16-bit reference takes one byte more: 152 GSM 7-bit or 66 UCS-2 characters a part.

Long messages

Send each part as its own submit_sm. A UDH in the text carries a reference, a total and a part number (8-bit or 16-bit reference), or you can use the sar_* TLVs. Each part is accepted, and charged, as its own segment. You can also put the long text in the message_payload TLV.

  • UDH: set esm_class to 0x40 and start short_message with the UDH: 05 00 03 + reference + total + part number (8-bit reference), or 06 08 04 + 2-byte reference + total + part number (16-bit reference).
  • SAR TLVs: sar_msg_ref_num, sar_total_segments and sar_segment_seqnum on each part, with esm_class 0x00.

Use one reference for all the parts of one text, and a new one for the next text. Each part gets its own message_id and, if you ask for receipts, its own receipt. In the webhook, every part has the same multipart_id, with part and parts.

Over the REST API, Telrioz splits the text for you, up to 10 parts: see Send a message.