jookies / jasmin

Jasmin - Open source SMS gateway
http://jasminsms.com
Other
1.04k stars 558 forks source link

"DLRMapNotFound: Got a DLR for an unknown message id" on multipart messages #1190

Open hartois opened 6 months ago

hartois commented 6 months ago

Hello I have a problem with receiving DLR for some multipart messages. As I was able to determine, the problem occurs when responses to submit_sm do not arrive in the order in which the parts of the message follow.

image

As you can see, the first part of the message has seq = 37, the second part has seq = 38.

Responses:

image image

In responses (packets # 27,28), the first packet with seq = 38 (the second part of the message) arrives, and after it the packet with seq = 37 (the first part of the message).

In log I see:

2024-04-19 05:22:02 INFO     1 SMS-MT [cid:XXXXX] [queue-msgid:639749e1-5de6-4597-956f-cb26bd045fde] [smpp-msgid:b'8e88b4a'] [status:CommandStatus.ESME_ROK] [prio:0] [dlr:RegisteredDeliveryReceipt.SMSC_DELIVERY_RECEIPT_REQUESTED] [validity:none] [from:b'XXXXXXXXXXX'] [to:b'XXXXXXXXXXXXX'] [content:b"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
2024-04-19 05:22:07 DEBUG    1 code_dlr_msgid: 479ab700 coded to 479AB700
2024-04-19 05:22:07 ERROR    1 [msgid:479AB700] (retrials: 1/2) DLRMapNotFound: Got a DLR for an unknown message id: 479ab700 (coded:479AB700)
2024-04-19 05:22:07 DEBUG    1 Requeuing Content[479AB700] with delay: 10 seconds
2024-04-19 05:22:17 ERROR    1 [msgid:479AB700] (final) DLRMapNotFound: Got a DLR for an unknown message id: 479ab700 (coded:479AB700)

Jasmin use msgid 8e88b4a from second packet, that have seq=37, instead of msgid 479ab700 from first packet with large seq = 38

hartois commented 6 months ago

I'm trying investigate problem, but does not understand submit_sm processing for multi-pdu responses. Help me please...

hartois commented 6 months ago

See PR, please...