Hi Timo:<div><br></div><div>I've tryied with varchar(20) (lowercase) before I sent the original e-mail and it doesn't work. And I have tryied storing data as a number and as a stirng (I know that sqlite has not stict type definitios).</div>
<div><br></div><div>After your e-mail I've built the database again like this (all uppercase as you recommend (and as it should be ;-)):</div><div><br></div><div><div><font face="'courier new', monospace">sqlite> CREATE TABLE traducciones('zona' VARCHAR(25), 'e100' VARCHAR(20), 'e101' VARCHAR(20), 'e102' VARCHAR(20));</font></div>
<div><font face="'courier new', monospace">sqlite> INSERT INTO traducciones VALUES("caballito","1557311721","1557311721","08103330303");</font></div><div><font face="'courier new', monospace">sqlite> INSERT INTO traducciones VALUES("flores","63793266","08103330303","1557311721");</font></div>
<div><font face="'courier new', monospace">sqlite> select * from traducciones;</font></div><div><font face="'courier new', monospace">caballito|1557311721|1557311721|08103330303</font></div><div><font face="'courier new', monospace">flores|63793266|08103330303|1557311721</font></div>
</div><div><font face="'courier new', monospace"><br></font></div><div>AND NOW IT's WORKING!!!!!</div><div><br></div><div>The production table will have all emergency numbers in Argentina (10x, 13x, 911).</div>
<div><br></div><div>Best regards and thank you very much!!!</div><div>Sebastián Ferguson</div><div><br></div><div><br><div class="gmail_quote">On Thu, May 17, 2012 at 1:45 PM, Timo Teras <span dir="ltr"><<a href="mailto:timo.teras@iki.fi" target="_blank">timo.teras@iki.fi</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, 16 May 2012 18:06:08 -0300 Sebastian Ferguson<br>
<<a href="mailto:sebastian.ferguson@gmail.com">sebastian.ferguson@gmail.com</a>> wrote:<br>
<br>
> I think this is related to data types.<br>
> In the logs I can see that kamailio is defaulting datatypes to INT<br>
> (I've tested varchar, int, and bigint in sqlite3), but I don't know<br>
> how large could an integer be in Kamailio. According to sqlite3<br>
> documentation the number 8003330303 is not long enough and in fact<br>
> the number is in the database.<br>
<br>
</div>Yes. Sounds definitely like it's treated as INT instead of string or<br>
BIGINT. Since it's address part, it should be string (as there can be<br>
letters too).<br>
<br>
SQLite is a little bit unusual on how the typing system works. It does<br>
not really care about how you define your tables, it just stores the<br>
data there as given. That is, even if your table is specified as INT,<br>
it can still have STRING in it.<br>
<br>
I wrote the SQLite driver to consult the table declaration to see what<br>
there should be. So the driver tries to do the right thing, but<br>
apparently can go wrong in certain circumstances.<br>
<br>
However, I think either your table declaration is wrong. If the column<br>
is VARCHAR or TEXT it should work. Also, some of the tests are<br>
case-sensitive (strstr function used). Could you try if using uppercase<br>
VARCHAR or TEXT fixes it? If it does, I need to fix<br>
decltype_to_dbtype() to be case-insensitive.<br>
<br>
If possible, can I see the related table schema?<br>
<span class="HOEnZb"><font color="#888888"><br>
- Timo<br>
</font></span></blockquote></div><br></div>