Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question