如何在SMPP中正确表示消息类 [英] How to correctly represent message class in SMPP

查看:171
本文介绍了如何在SMPP中正确表示消息类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试找出SMPP中如何正确表示sms类.但是,到目前为止,我对该标准及其文档完全感到困惑.

I am currently trying to figure out how sms classes are correctly represented in SMPP. However I am by now completely confused by the standard and it's documentation.

在正常短信中,我们有

  • Class0:Flash短信,显示在显示屏上
  • Class1:普通短信,存储在sim卡上或内部存储在设备中

查看SMPP规范,我首先在submit_sm操作中找到参数data_coding,该参数用于设置通过MAP发送的DCS.据我了解,如果要显式设置消息类别,则需要将此参数的前四位设置为1,然后两位指示编码,然后再两位指示消息类别.因此,对于Class1 Sms,我们将设置1111xx01.到目前为止,这是正确的吗?

Looking at the SMPP spec, I first find the parameter data_coding in the submit_sm operation, which is used to set the DCS sent via MAP. As far as I understand this, if we want to explicitly set the message class we need to set the first four bits of this parameter to ones, then two bits indicating the coding and then another two bits indicating the message class. So for Class1 Sms, we would set 1111xx01. Is this correct so far?

如果尝试设置此DCS,但是当前我们还将数据编码设置为"8位数据".看来,有几部手机无法理解这一点.是否在任何地方都指定了此消息,我们是否可以更改它,还是在发送其他消息类时需要特殊的编码?

If we try to set this DCS, however currently we also set the data coding to "8-Bit data". It seems, several phones are not able to understand this. Is this specified anywhere, and can we just change this, or is a special coding needed when sending other message classes.

当我们尝试使用SMPPv3.4建议的设置Message类的方式时,会引起更多的混乱.从3.4开始,在submit_sm操作中有一个可选参数,称为dest_addr_subunit.根据标准,对于未知,此参数应设置为0,对于MS-Display,此参数应设置为1,对于移动设备,此参数应设置为2. Class0编码为1,Class1编码为2,依此类推.这是正确的,还是背后有更复杂的映射?

More confusion arises, when we try to use the SMPPv3.4 recommended way of setting the Message class. Since 3.4 there is an optional parameter in the submit_sm operation, called dest_addr_subunit. According to the standard this parameter should be set to 0 for unknown, 1 for MS-Display, 2 for Mobile equipment, etc. If I look at this, it seems the parameters are shifted by one compared to GSM message classes. Class0 is encoded as 1, Class1 is encoded as 2 and so on. Is this correct or is there any more complicated mapping behind this?

此外,如果我们设置dest_addr_subunit,是否还必须设置DCS,还是可以仅将此参数保留为默认值?

Also, if we set dest_addr_subunit, do we still have to set DCS as well, or can we just leave this parameter at it's default value?

推荐答案

我建议阅读

I recommend to read 3GPP TS 23.038 specification with detailed DCS (Data Coding Scheme) description.

如果DCS的7654位为00xx,则应检查DCS的第4位值.

In case of DCS bits 7654 are 00xx, you should check DCS for bit 4 value.

  • 位4 == 0-此消息没有消息类别(位1和0保留)
  • 位4 == 1-位1和0包含消息类别

因此,您应根据3GPP TS 23.038规范设置 data_coding SMPP参数,以正确处理message_class.

So you should set data_coding SMPP parameter in accordance to 3GPP TS 23.038 specification to handle message_class properly.

默认情况下,GSM SMS消息没有message_class,这与message_class = 1不同.

By default GSM SMS message has no message_class and this is not the same as message_class = 1.

这篇关于如何在SMPP中正确表示消息类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆