Hi Alan,

good catch ;)

it's just a stupid bug in smsc_smpp module... see attached patch that I will
commit to cvs asap.

Alan McNatty wrote:

> Hi Alex,
> 
> One of the problems in the past with the DLR search using destination
> address is that it has been contrary to SMPP v3.4 specs. In section 2.11
> Message Types we can note:
> 
> 'The destination address will be taken from the source address of the
> original short message which generated the delivery receipt.'
> 
> We should actually be searching and matching the source address of the
> original message (not destination address as per your patch) to comply
> with specification. So this may also need to be configurable by SMSC
> connection so as to remain spec compliant and work for all.
> 
> Cheers,
> Alan
> 
> 
> 
> On Sun, 2004-09-26 at 07:28, Alexander Malysh wrote:
>> Hi,
>> 
>> attched you can find patch that includes destination address into dlr
>> lookup. This patch implements include all necessary changes for all dlr
>> storage types. Additionally this patch changes my email addr. from
>> @centrium.de to @kannel.org and does some cleanup for sql query
>> generation.
>> 
>> What this patch try to do is pretty simple and I hope to be generic
>> approach (picked from dlr.c):
>> /*
>>  * It's not possible to use the whole destination in sql query, so we
>>  just * strip country prefix and do DB lookup like 'like "%striped-dst"'
>>  and so * increase probability to find a right DB entry.
>>  * Example: for Germany dst=+491711234567 striped=1711234567
>>  * Example2: for Germany dst=01711234567 striped=1711234567
>>  */
>> 
>> This approach was used at centrium for years and workes just fine...
>> 
>> Comments/votes please!
>> 
>> P.S. Patch is only compile tested, but should work (changes are trivial
>> ;)).

-- 
Thanks,
Alex
Index: gw/smsc/smsc_smpp.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.73
diff -a -u -r1.73 smsc_smpp.c
--- gw/smsc/smsc_smpp.c	3 Sep 2004 12:42:32 -0000	1.73
+++ gw/smsc/smsc_smpp.c	26 Sep 2004 22:05:14 -0000
@@ -1080,7 +1080,7 @@
 
         dlrmsg = dlr_find(smpp->conn->id,
             tmp, /* smsc message id */
-            pdu->u.deliver_sm.destination_addr, /* destination */
+            pdu->u.deliver_sm.source_addr, /* destination */
             dlrstat);
 
         octstr_destroy(msgid);

Reply via email to