diff options
author | Abyss777 <abyss@fox5.ru> | 2018-03-06 13:52:44 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-03-06 14:01:12 +0500 |
commit | 5ac0f773023a9c1c70524f1b63d2afc7d837a31f (patch) | |
tree | 23e8c877e8dd0823e24823c9ca07cb3b3fa92ed9 /src/org/traccar/smpp/ClientSmppSessionHandler.java | |
parent | 88456dc2e2b3cc5a618b2a041c43230ed550f12f (diff) | |
download | trackermap-server-5ac0f773023a9c1c70524f1b63d2afc7d837a31f.tar.gz trackermap-server-5ac0f773023a9c1c70524f1b63d2afc7d837a31f.tar.bz2 trackermap-server-5ac0f773023a9c1c70524f1b63d2afc7d837a31f.zip |
Implement additional way to detect SMPP delivery receipts
Diffstat (limited to 'src/org/traccar/smpp/ClientSmppSessionHandler.java')
-rw-r--r-- | src/org/traccar/smpp/ClientSmppSessionHandler.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java index 69ef9af41..3585f8376 100644 --- a/src/org/traccar/smpp/ClientSmppSessionHandler.java +++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java @@ -50,7 +50,14 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler { smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding())); Log.debug("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress); - if (!SmppUtil.isMessageTypeAnyDeliveryReceipt(((DeliverSm) request).getEsmClass())) { + boolean isDeliveryReceipt = false; + if (smppClient.getDetectDlrByOpts()) { + isDeliveryReceipt = request.getOptionalParameters() != null; + } else { + isDeliveryReceipt = SmppUtil.isMessageTypeAnyDeliveryReceipt(((DeliverSm) request).getEsmClass()); + } + + if (!isDeliveryReceipt) { TextMessageEventHandler.handleTextMessage(sourceAddress, message); } } |