delivery reports and EMI [known bug issue]

Andreas Fink <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hello folks,

There's a know bug in EMI which causes delivery reports to sometimes  
fail under high load.

the issue is the following

You sent two or more messages in the same second to the same SMSC.
The EMI/UCP SMSC will respond with the same timestamp for both messages.

You get a delivery report for one of the messages. Now you have to  
match it to one of the DLR entries in memory or in the MySQL DB. You  
don't know which one so you might end up sending a delivery report to  
the wrong URL who just happened to have sent a message in the same  
second.

The fix for this is to make phonenumber + timestamp the key instead  
only the timestamp.
The DLR code is ready for that but there's an issue.

Here is an example:

I'm sending out a message to myself.
My gateway ALWAYS sends in international format
So + is being replaced with 00.

so the destination number in the EMI 51 packet will contain  
0041792457333 as my number.
the acknowledgement of the EMI51 looks like this:

	<92/00046/R/51/A//0041792457333:121102143948/E5>

0041792457333 is the destination number
121102143948 is the timestamp

so Kannel saves this information into DLR storage.

Now the message gets delivered and a delivery report arrives:
we get:
	<09/00297/O/53/30069/0792457333/////////////121102143948/0/000/ 
121102143952/3// 
4D65737361676520666F7220303739323435373333332C2077697468206964656E746966 
69636174696F6E2030323131313231343339343820686173206265656E2064656C697665 
726564206F6E20323030322D31312D31322061742031343A33393A35322E/////////// 
//0A>

the problem here is that the number now became suddendly a national  
number by removing the 00 and 41 (country code) and replace it with a  
national long distance prefix 0.
to fix this is easy. We re-internationalize the number again. However,  
some users might not want to have it this way. So another config  
variable has to be added maybe which I really want to avoid.

Does anyone has some brilliant ideas how we can solve this "always  
unify the number format" for EMI without making configuration of the  
SMSC a nightmare of config variables?
Should we simply replace incoming number with 0 with 00+ country code?  
But whats the country code -> config variable again?





Andreas Fink
Fink-Consulting

------------------------------------------------------------------
Tel: +41-61-6666332 Fax: +41-61-6932729  Mobile: +41-79-2457333
Address: A. Fink, Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  [email protected]  Homepage: http://www.finkconsulting.com
------------------------------------------------------------------
Something urgent? Try http://www.smsrelay.com/  Nickname afink
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.