Just reading the SMPP specs, and BUFFRED doesn't technically exist as a DLR status. I'm not a C hacker at all, but would the attached do the trick?
 
Alex
 
----- Original Message -----
From: Alex Kinch
Sent: Monday, November 03, 2003 7:26 PM
Subject: Kannel deleting DLRs with "BUFFRED" status

Hi,
 
Noticed something interesting. Kannel seems to be deleting messages from the DLR db with a status of "BUFFRED". I would imagine it should be updating them to status = 4. By the way my dlr-mask is 31, and the messages are being sent via http using sendsms on Kannel.
 
Heres a DLR message:
 
2003-11-03 17:14:39 [34] DEBUG:      data: 69 64 3a 32 38 32 32 36 37 37 20 73 75 62 3a 30   id:2822677 sub:0
2003-11-03 17:14:39 [34] DEBUG:      data: 30 31 20 64 6c 76 72 64 3a 30 30 31 20 73 75 62   01 dlvrd:001 sub
2003-11-03 17:14:39 [34] DEBUG:      data: 6d 69 74 20 64 61 74 65 3a 30 33 31 31 30 33 31   mit date:0311031
2003-11-03 17:14:39 [34] DEBUG:      data: 37 31 34 20 64 6f 6e 65 20 64 61 74 65 3a 30 33   714 done date:03
2003-11-03 17:14:39 [34] DEBUG:      data: 31 31 30 33 31 37 31 34 20 73 74 61 74 3a 42 55   11031714 stat:BU
2003-11-03 17:14:39 [34] DEBUG:      data: 46 46 52 45 44 20 65 72 72 3a 30 30 34 20 74 65   FFRED err:004 te
2003-11-03 17:14:39 [34] DEBUG:      data: 78 74 3a 20 00                                    xt: .
and here's what Kannel does with it:
 
2003-11-03 17:14:39 [34] DEBUG: sql: DELETE FROM dlr WHERE smsc='xxxx' AND ts='2822677' LIMIT 1;
 
So when we later get:
 
2003-11-03 18:30:41 [34] DEBUG:      data: 69 64 3a 32 38 32 32 36 37 37 20 73 75 62 3a 30   id:2822677 sub:0
2003-11-03 18:30:41 [34] DEBUG:      data: 30 31 20 64 6c 76 72 64 3a 30 30 31 20 73 75 62   01 dlvrd:001 sub
2003-11-03 18:30:41 [34] DEBUG:      data: 6d 69 74 20 64 61 74 65 3a 30 33 31 31 30 33 31   mit date:0311031
2003-11-03 18:30:41 [34] DEBUG:      data: 38 33 30 20 64 6f 6e 65 20 64 61 74 65 3a 30 33   830 done date:03
2003-11-03 18:30:41 [34] DEBUG:      data: 31 31 30 33 31 38 33 30 20 73 74 61 74 3a 44 45   11031830 stat:DE
2003-11-03 18:30:41 [34] DEBUG:      data: 4c 49 56 52 44 20 65 72 72 3a 30 30 30 20 74 65   LIVRD err:000 te
2003-11-03 18:30:41 [34] DEBUG:      data: 78 74 3a 20 00                                    xt: .
Kannel can't find it, as it's already deleted it from the DLR db.
 
2003-11-03 18:30:41 [34] ERROR: SMPP[xxxx]: got DLR but could not find message or was not interested in
it
 
Any thoughts?
 
Alex
Index: gw/smsc/smsc_smpp.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.53
diff -u -r1.53 smsc_smpp.c
--- gw/smsc/smsc_smpp.c 17 Oct 2003 22:57:50 -0000      1.53
+++ gw/smsc/smsc_smpp.c 3 Nov 2003 19:50:50 -0000
@@ -943,6 +943,7 @@
                     dlrstat = DLR_SUCCESS;
                 else if (stat != NULL && (octstr_compare(stat, octstr_imm("ACKED")) 
== 0 ||
                              octstr_compare(stat, octstr_imm("ENROUTE")) == 0 ||
+                            octstr_compare(stat, octstr_imm("BUFFRED")) == 0 ||
                              octstr_compare(stat, octstr_imm("ACCEPTD")) == 0))
                     dlrstat = DLR_BUFFERED;
                 else

Reply via email to