Hi Timo:<div><br></div><div>I&#39;ve tryied with varchar(20) (lowercase) before I sent the original e-mail and it doesn&#39;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&#39;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="&#39;courier new&#39;, monospace">sqlite&gt; CREATE TABLE traducciones(&#39;zona&#39; VARCHAR(25), &#39;e100&#39; VARCHAR(20), &#39;e101&#39; VARCHAR(20), &#39;e102&#39; VARCHAR(20));</font></div>

<div><font face="&#39;courier new&#39;, monospace">sqlite&gt; INSERT INTO traducciones VALUES(&quot;caballito&quot;,&quot;1557311721&quot;,&quot;1557311721&quot;,&quot;08103330303&quot;);</font></div><div><font face="&#39;courier new&#39;, monospace">sqlite&gt; INSERT INTO traducciones VALUES(&quot;flores&quot;,&quot;63793266&quot;,&quot;08103330303&quot;,&quot;1557311721&quot;);</font></div>

<div><font face="&#39;courier new&#39;, monospace">sqlite&gt; select * from traducciones;</font></div><div><font face="&#39;courier new&#39;, monospace">caballito|1557311721|1557311721|08103330303</font></div><div><font face="&#39;courier new&#39;, monospace">flores|63793266|08103330303|1557311721</font></div>

</div><div><font face="&#39;courier new&#39;, monospace"><br></font></div><div>AND NOW IT&#39;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">&lt;<a href="mailto:timo.teras@iki.fi" target="_blank">timo.teras@iki.fi</a>&gt;</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>
&lt;<a href="mailto:sebastian.ferguson@gmail.com">sebastian.ferguson@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I think this is related to data types.<br>
&gt; In the logs I can see that kamailio is defaulting datatypes to INT<br>
&gt; (I&#39;ve tested varchar, int, and bigint in sqlite3), but I don&#39;t know<br>
&gt; how large could an integer be in Kamailio. According to sqlite3<br>
&gt; documentation the number 8003330303 is not long enough and in fact<br>
&gt; the number is in the database.<br>
<br>
</div>Yes. Sounds definitely like it&#39;s treated as INT instead of string or<br>
BIGINT. Since it&#39;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>