S
S
SteepNET2021-12-14 19:52:37
PHP
SteepNET, 2021-12-14 19:52:37

Sending SMS via Yeastar gateway in Cyrillic?

Good afternoon! I'm trying to send sms via php script, everything is successful!
But SMS sends only 70 characters in Cyrillic, they somehow need to be glued together, for this you need to convert to PDU format as far as I know, but nothing comes out, can someone share their experience?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shurshur, 2021-12-14
@shurshur

The Cyrillic alphabet must be transmitted in UCS-2 encoding (UCS-2BE). Also, in the first 6 bytes (3 characters) put information about the gluing into the UDH (User Data Header). These bytes are:
05 00 03 xx yy zz
Here:
xx is a unique identifier (you can choose a random number from 0 to 255).
yy - total number of segments (n)
zz - segment number (1...n)
Also, usually somewhere you need to pass the data_coding of the message and a sign of the presence of gluing and / or UDH in the message body (in SMPP, for example, bit 0x40 is used for this in esm_class). I haven’t come across Yeastar, I don’t know how exactly it works there.
Due to the presence of UDH in the message body, the maximum segment length is reduced by 3 characters and is limited to 67 characters.
see also
https://en.wikipedia.org/wiki/Concatenated_SMS
https://en.wikipedia.org/wiki/User_Data_Header

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question