submit_sm sequence number incorrect
edescourtis opened this issue · 2 comments
Looks like the sequence numbers are incorrect as soon as we send a submit_sm. We ran into this in production (sorry for not sending a wireshark trace we have privacy requirements) when a submit_sm was sent very close to a enquire_link message we received the enquire_link_resp in handle_resp/3 of our SMPPEX.Session implementation (which is unexpected).
From: ESME (SMPPEx) To: Remote SMSC (foreign implementation)
Short Message Peer to Peer, Command: Enquire_link, Seq: 16, Len: 16
Length: 16
Operation: Enquire_link (0x00000015)
Sequence #: 16
From: Remote SMSC (foreign implementation) To: ESME (SMPPEx)
Short Message Peer to Peer, Command: Enquire_link - resp, Status: "Ok", Seq: 16, Len: 16
Length: 16
Operation: Enquire_link - resp (0x80000015)
Result: Ok (0x00000000)
Sequence #: 16
From: ESME (SMPPEx) To: Remote SMSC (foreign implementation)
Short Message Peer to Peer, Command: Submit_sm, Seq: 18, Len: 140
Length: 140
Operation: Submit_sm (0x00000004)
Sequence #: 18
Service type: (Default)
Type of number (originator): International (0x01)
Numbering plan indicator (originator): ISDN (E163/E164) (0x01)
Originator address: xxxxxxxxxxx
Type of number (recipient): International (0x01)
Numbering plan indicator (recipient): ISDN (E163/E164) (0x01)
Recipient address: xxxxxxxxxxx
.... ..00 = Messaging mode: Default SMSC mode (0x0)
..00 00.. = Message type: Default message type (0x0)
00.. .... = GSM features: No specific features selected (0x0)
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
.... ..00 = Delivery receipt: No SMSC delivery receipt requested (0x0)
.... 00.. = Message type: No recipient SME acknowledgement requested (0x0)
...0 .... = Intermediate notif: No intermediate notification requested (0x0)
.... ...0 = Replace: Don't replace (0x0)
Data coding: 0x00
Predefined message: 0
Message length: 85
Message: ...
From: Remote SMSC (foreign implementation) To: ESME (SMPPEx)
Short Message Peer to Peer, Command: Submit_sm - resp, Status: "Ok", Seq: 18, Len: 25
Length: 25
Operation: Submit_sm - resp (0x80000004)
Result: Ok (0x00000000)
Sequence #: 18
Message id.: XXXXXXX
From: ESME (SMPPEx) To: Remote SMSC (foreign implementation)
Short Message Peer to Peer, Command: Enquire_link, Seq: 18, Len: 16
Length: 16
Operation: Enquire_link (0x00000015)
Sequence #: 18
From: Remote SMSC (foreign implementation) To: ESME (SMPPEx)
Short Message Peer to Peer, Command: Enquire_link - resp, Status: "Ok", Seq: 18, Len: 16
Length: 16
Operation: Enquire_link - resp (0x80000015)
Result: Ok (0x00000000)
Sequence #: 18
we have produced a fix here but we aren't sure if it is correct because we aren't familiar with the code base.
Fixed in #51