详谈短信开发-SMPP的长短信协议展开格式

长短信的SMPP的协议展开格式如下:   

No.     Time                       Source                Destination           Protocol Length Info
    496 2020-11-09 17:15:43.544923 192.168.2.176         192.168.2.176         SMPP     263    SMPP Deliver_sm (Short Message fragment 1 of 3)

Frame 496: 263 bytes on wire (2104 bits), 263 bytes captured (2104 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 192.168.2.176 (192.168.2.176), Dst: 192.168.2.176 (192.168.2.176)
Transmission Control Protocol, Src Port: 32942 (32942), Dst Port: 30000 (30000), Seq: 1, Ack: 1, Len: 197
Short Message Peer to Peer, Command: Deliver_sm, Seq: 8388637, Len: 197
    Length: 197
    Operation: Deliver_sm (0x00000005)
    Sequence #: 8388637
    Service type: (Default)
    Type of number (originator): International (0x01)
    Numbering plan indicator (originator): ISDN (E163/E164) (0x01)
    Originator address: 85257499868
    Type of number (recipient): International (0x01)
    Numbering plan indicator (recipient): ISDN (E163/E164) (0x01)
    Recipient address: 8617318040001
    .... ..00 = Messaging mode: Default SMSC mode (0x00)
    ..00 00.. = Message type: Default message type (0x00)
    01.. .... = GSM features: UDHI indicator (0x01)
    Protocol id.: 0x00
    Priority level: GSM: None      ANSI-136: Bulk         IS-95: Normal (0x00)
    Scheduled delivery time: Immediate delivery
    Validity period: SMSC default validity period
    .... ..01 = Delivery receipt: Delivery receipt requested (for success or failure) (0x01)
    .... 00.. = Message type: No recipient SME acknowledgement requested (0x00)
    ...0 .... = Intermediate notif: No intermediate notification requested (0x00)
    .... ...0 = Replace: Don't replace (0x00)
    Data coding: 0x08
        SMPP Data Coding Scheme: UCS2 (ISO/IEC-10646) (0x08)
        GSM SMS Data Coding
        0000 .... = DCS Coding Group for SMS: SMS DCS: General Data Coding indication - Uncompressed text, no message class (0x00)
        ..0. .... = DCS Text compression: Uncompressed text
        ...0 .... = DCS Class present: No message class
        .... 10.. = DCS Character set: UCS-2 (16-bit) data (0x02)
        GSM CBS Data Coding
        0000 .... = DCS Coding Group for CBS: CBS DCS: Language using the GSM 7-bit default alphabet (0x00)
        ..00 1000 = DCS CBS Message language: Portuguese (0x08)
    Predefined message: 0
    Message length: 140
    Message
GSM Short Message Service User Data
    UDH Length: 5
        IE Id: SMS - Concatenated short messages, 8-bit reference number (0x00): message 254, part 1 of 3
            Message identifier: 254
            Message parts: 3
            Message part number: 1
    Unreassembled Short Message fragment 1 of 3

将Submit或Deliver消息中的esm_class设置为0X40,指示短信体内还有消息头

长短信的消息头:

splitedRef是指短信的序列号1~255;splitedMax是指拆分长短信的条数,splitedSeq是指长短信的第几条。

猜你喜欢

转载自blog.csdn.net/lzyzuixin/article/details/111271395