Re: [PATCH] dlr_mem.c & dlr_sdb.c check for dst

Nicholas Rahn <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Would this work as a general rule:

sent:                          +49123456789
dlr stores (db):               +49123456789
dlr received (from operator):  0049123456789
                          or:  0123456789
                          or:  +49123456789
dlr-find: where dst like '%49123456789'
      or: where dst like '%123456789'
      or: where dst like '%49123456789'

so we save original sent number.  in dlr_find, remove any "00", "0" or
"+" from the dlr received from the operator and use this "normalized"
number in the like clause.

i don't think this is perfect, but it allows us to avoid another
configuration variable.

any comments?
thx
nick


On Fri, 2004-04-02 at 13:55, Robert Galach wrote:
> > no, You have't got a point... We need original destination, because it
> will be
> > copied into dlr message that going to the user back... So the user should
> > always get "right" destination number back (means destination that was
> > supplied by him).
> > How want you normalize number if you have loss a original number?
> > Just as example:
> > sent: +49123456789
> > dlr-store: 123456789
> > dlr-find: WHERE dst='123456789'
> > dlr-msg: ???? how to normalize ??? +49123456789 or +44123456789
> 
> Right, I see that without config-file changes it will not work.
> But, the the magic You proposed will also fail in similar case.
> If operator sends full number with country code in dlr.
> There are country codes with the same last digit of country code,
> so possible is, eg:
> 
> sent: +49123456789
> dlr-store: 49123456789
> dlr-find: WHERE dst like '9123456789'
> 
> and again what is the number: +49123456789 or  other +x9123456789 ?
> more: some countries have three-digit code, it may happen that 2 last digits
> are the same too.
> 
> so maybe it is worth to add another config directive?
> 
> Regards
> Robert
> 
> 
>
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.