aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp/SmppClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/smpp/SmppClient.java')
-rw-r--r--src/org/traccar/smpp/SmppClient.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index 602087a65..0f7d2cf6d 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -61,7 +61,8 @@ public class SmppClient {
private String sourceAddress;
private String commandSourceAddress;
private int submitTimeout;
- private boolean requestDrl;
+ private boolean requestDlr;
+ private boolean detectDlrByOpts;
private String notificationsCharsetName;
private byte notificationsDataCoding;
private String commandsCharsetName;
@@ -92,7 +93,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");
+ requestDlr = Context.getConfig().getBoolean("sms.smpp.requestDlr");
+ detectDlrByOpts = Context.getConfig().getBoolean("sms.smpp.detectDlrByOpts");
notificationsCharsetName = Context.getConfig().getString("sms.smpp.notificationsCharset",
CharsetUtil.NAME_UCS_2);
@@ -153,6 +155,10 @@ public class SmppClient {
}
}
+ public boolean getDetectDlrByOpts() {
+ return detectDlrByOpts;
+ }
+
protected synchronized void reconnect() {
try {
disconnect();
@@ -213,7 +219,7 @@ public class SmppClient {
byte[] textBytes;
textBytes = CharsetUtil.encode(message, command ? commandsCharsetName : notificationsCharsetName);
submit.setDataCoding(command ? commandsDataCoding : notificationsDataCoding);
- if (requestDrl) {
+ if (requestDlr) {
submit.setRegisteredDelivery(SmppConstants.REGISTERED_DELIVERY_SMSC_RECEIPT_REQUESTED);
}
submit.setShortMessage(textBytes);