Hi list,

as David Chkhartisvili has reported on 2008-10-29, we don't proxy correctly the
DLR request indication when doing SMPP based re-routing of MOs to MTs. We simply
omit any deliver_sm.registered_delivery value.

Please find attached a simple patch, that ensures we handle the value in the
pdu_to_msg() function, so that a later re-routing and re-injection to the smsc
routing can take care of the DLR mask and re-apply the registered_delivery 
value.

Please have a fast glance and vote.

Thanks,
Stipe

-- 
-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture      Kannel Software Foundation (KSF)
http://www.tolj.org/              http://www.kannel.org/

mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------
### Eclipse Workspace Patch 1.0
#P gateway-cvs-head
Index: ChangeLog
===================================================================
RCS file: /home/cvs/gateway/ChangeLog,v
retrieving revision 1.3007
diff -u -r1.3007 ChangeLog
--- ChangeLog   25 Jan 2009 21:30:54 -0000      1.3007
+++ ChangeLog   26 Jan 2009 14:53:17 -0000
@@ -1,3 +1,11 @@
+2009-01-26  Stipe Tolj  <stolj at kannel.org>
+    * gw/smsc/smsc_smpp.c: fixed DLR request indication for re-routed 
+      messages. We need to read the deliver_sm.registered_delivery value
+      and addapt it to our own DLR mask in the msg struct, so that the MT
+      processing can again apply the submit_sm.registered_delivery value.
+      Thanks to David Chkhartisvili <datoch at magtigsm dot ge> for reporting.
+      [Msg-Id: <[email protected]>]
+      
 2009-01-25  Stipe Tolj  <stolj at kannel.org>
     * gwlib/http.c: add function recover_absolute_uri() to handle partly
       incomplete absoluteURI values in redirect HTTP headers.
Index: gw/smsc/smsc_smpp.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.111
diff -u -r1.111 smsc_smpp.c
--- gw/smsc/smsc_smpp.c 21 Jan 2009 15:50:17 -0000      1.111
+++ gw/smsc/smsc_smpp.c 26 Jan 2009 14:53:19 -0000
@@ -417,7 +417,7 @@
 static Msg *pdu_to_msg(SMPP *smpp, SMPP_PDU *pdu, long *reason)
 {
     Msg *msg;
-    int ton, npi;
+    int ton, npi, rd;
 
     gw_assert(pdu->type == deliver_sm);
 
@@ -559,6 +559,13 @@
 
     /* set priority flag */
     msg->sms.priority = pdu->u.deliver_sm.priority_flag;
+    
+    /* set DLR mask */
+    rd = pdu->u.deliver_sm.registered_delivery;
+    if (rd == 1 || rd == 4 || rd == 8)
+        msg->sms.dlr_mask = (DLR_SUCCESS | DLR_FAIL);
+    else if (rd == 2)
+        msg->sms.dlr_mask = DLR_FAIL;
 
     if (msg->sms.meta_data == NULL)
         msg->sms.meta_data = octstr_create("");

Reply via email to