aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp/SmppClient.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-01-24 23:59:23 +1300
committerGitHub <noreply@github.com>2018-01-24 23:59:23 +1300
commit1c915fa1360f416ec88f4095664a887ceea2bc15 (patch)
tree16716caf340a555232abb2f17b2b60cf56b67ceb /src/org/traccar/smpp/SmppClient.java
parent8b84c115ff396532159d4b890618a1a7bf2fe4cb (diff)
parent4fae45e28106aede04c7524d89a45a94c281576c (diff)
downloadtrackermap-server-1c915fa1360f416ec88f4095664a887ceea2bc15.tar.gz
trackermap-server-1c915fa1360f416ec88f4095664a887ceea2bc15.tar.bz2
trackermap-server-1c915fa1360f416ec88f4095664a887ceea2bc15.zip
Merge pull request #3737 from Abyss777/smpp_incoming_improve
Improve incoming SMS handling
Diffstat (limited to 'src/org/traccar/smpp/SmppClient.java')
-rw-r--r--src/org/traccar/smpp/SmppClient.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index 122bbaea1..7add1d97c 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -61,6 +61,7 @@ public class SmppClient {
private String sourceAddress;
private String commandSourceAddress;
private int submitTimeout;
+ private boolean requestDrl;
private String notificationsCharsetName;
private byte notificationsDataCoding;
private String commandsCharsetName;
@@ -90,6 +91,8 @@ public class SmppClient {
commandSourceAddress = Context.getConfig().getString("sms.smpp.commandSourceAddress", sourceAddress);
submitTimeout = Context.getConfig().getInteger("sms.smpp.submitTimeout", 10000);
+ requestDrl = Context.getConfig().getBoolean("sms.smpp.requestDrl");
+
notificationsCharsetName = Context.getConfig().getString("sms.smpp.notificationsCharset",
CharsetUtil.NAME_UCS_2);
notificationsDataCoding = (byte) Context.getConfig().getInteger("sms.smpp.notificationsDataCoding",
@@ -209,6 +212,9 @@ public class SmppClient {
byte[] textBytes;
textBytes = CharsetUtil.encode(message, command ? commandsCharsetName : notificationsCharsetName);
submit.setDataCoding(command ? commandsDataCoding : notificationsDataCoding);
+ if (requestDrl) {
+ submit.setRegisteredDelivery(SmppConstants.REGISTERED_DELIVERY_SMSC_RECEIPT_REQUESTED);
+ }
submit.setShortMessage(textBytes);
submit.setSourceAddress(command ? new Address(commandSourceTon, commandSourceNpi, commandSourceAddress)
: new Address(sourceTon, sourceNpi, sourceAddress));