开发者

SMPP binary message

开发者 https://www.devze.com 2023-03-27 04:35 出处:网络
What are the parameters which differentiate开发者_JAVA百科s a text SMS and binary SMS in SMPP? I assume both the messages are encoded in submitSM object. If not please tell how SMPP binary messages ar

What are the parameters which differentiate开发者_JAVA百科s a text SMS and binary SMS in SMPP?

I assume both the messages are encoded in submitSM object. If not please tell how SMPP binary messages are encoded into a SMS.


Check data_coding parameter.

Here are some values:

 0 0 0 0 0 0 0 0 SMSC Default Alphabet
 0 0 0 0 0 0 0 1 IA5 (CCITT T.50)/ASCII (ANSI X3.4)
 0 0 0 0 0 0 1 0 Octet unspecified (8-bit binary)
 0 0 0 0 0 0 1 1 Latin 1 (ISO-8859-1)
 0 0 0 0 0 1 0 0 Octet unspecified (8-bit binary)
 0 0 0 0 0 1 0 1 JIS (X 0208-1990)
 0 0 0 0 0 1 1 0 Cyrllic (ISO-8859-5)
 0 0 0 0 0 1 1 1 Latin/Hebrew (ISO-8859-8)
 0 0 0 0 1 0 0 0 UCS2 (ISO/IEC-10646)
 0 0 0 0 1 0 0 1 Pictogram Encoding 
 0 0 0 0 1 0 1 0 ISO-2022-JP (Music Codes)
 0 0 0 0 1 0 1 1 reserved
 0 0 0 0 1 1 0 0 reserved
 0 0 0 0 1 1 0 1 Extended Kanji JIS(X 0212-1990)
 0 0 0 0 1 1 1 0 KS C 5601 
 0 0 0 0 1 1 1 1 reserved

Here you can see some values for binaries. For the full list check the SMPP v3.4 specification.


Useful reading

  • Data Coding Scheme


To add to Incognitos answer above, the other parameter that's important if you're sending binary messages is the esm_class.

The two most common values are:

  • 0x00 which is used for a standard text message
  • 0x40 which sets the User Data Header Indicator (UDHI)

If the UDHI is set you then need to parse a binary header at the start of the payload, made up of a User Data Header Length (UDHL) saying how many bytes should be read as headers, followed by the binary headers themselves.

See section 5.2.12 of the SMPP spec for all the possible values of the esm_class parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号