Hi,

Enver ALTIN wrote:

> Hi Alexander,
> 
> On Sat, 2004-09-25 at 21:28 +0200, Alexander Malysh wrote:
>>  * 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.
> 
> This approach seems to be a wee lot slower than direct lookup.

yes, it's a bit slower (note not a lot slower), but we have no other
possibility as use indirect lookup. Just as example:
1) send sms with destination +49 123 1234567
2) receive dlr with destination (note localized) 0 123 1234567

> 
> I believe avoiding use of `like` in SQL statements is better.

it's impossible to avoid `like` by indirect lookup... if it's possible,
please teach me ;)

> 
> Haven't looked at the patch yet, but let me ask, how do you strip
> country info? USA is +1 AFAIK, so how would a number like this:
> 
> +1 123 1234567
> 
> stripped? How reliable is the result?

that's pretty simple ;)
orig: +1 123 1234567 -> stripped: 123 1234567

reliability of result is better as current cvs...

> 
> A few years ago, I heard that Hong Kong switched to 8-digit phone
> numbers. What do you think about this? :)

with proposed patch should not be a problem ;)

-- 
Thanks,
Alex


Reply via email to