如何在smpp中使用用户数据? [英] How to use User Data in smpp?

查看:113
本文介绍了如何在smpp中使用用户数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在smpp中使用用户数据(UDH)?现在,我要发送短信指定的端口.

How to use User Data(UDH) in smpp? Now I want to send sms specified port.

我将OpenSMPP用作项目库.

I use OpenSMPP as my project lib..

推荐答案

请按照以下步骤通过SMPP发送UDH:

Follow these steps to send UDH over SMPP:

  • 在esm_class字段上将UDHI位置1.最简单的方法-esm_class = esm_class | 0x40.
  • 将UDH放在short_message字段的开头.请继续阅读以获取快速摘要.请参阅参考资料以详细了解如何编码UDH.

以下是对UDH进行编码的方法:

Here is how to encode UDH:

  • UDH的第一个字节必须提及UDH其余部分的长度(以字节为单位).由于您可能不知道这一点,因此您可能需要稍后进行计算.
  • 然后遵循一个或多个IE(信息元素).每个IE均包含3个部分:
    • 第一个字节:IEI(IE指示器).标识要编码的元素.已经建立了IEI.
    • 第二个字节:IEIDL(IEI数据长度).标识保存数据部分的字节数.每个已建立的IEI对此字段均具有固定值.
    • 第三字节和其余部分:IEID(IEI数据):保存数据部分.每个已建立的IEI都有固定的数据格式.
    • The first byte of UDH must mention the length (in bytes) of remaining part of UDH. Since you may not know this ahead, you may have to calculate it later on.
    • Then follows one or more IE (Information Element). Each IE has 3 parts:
      • First byte: IEI (IE Indicator). Identifies the element you want to encode. There are established IEI.
      • Second byte: IEIDL (IEI Data Length). Identifies the number of bytes that holds the data part. Each established IEI has fixed value for this field.
      • Third byte and rest part: IEID (IEI Data): Holds the data part. Each established IEI has fixed format of the data.

      要发送SMS到零件,可以使用IEI 0x04或0x05.我只看到使用0x05.

      For sending SMS to a part, you can use IEI 0x04 or 0x05. I have only seen 0x05 being used.

      • 3GPP specification: 23.040
      • User Data Header

      这篇关于如何在smpp中使用用户数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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