Hi:<div><br></div><div>I&#39;m trying to configure a Kamailio 3.2 server as a Redirect Server.</div><div><br></div><div>A softswitch we own will send a SIP INVITE for some calls like this &quot;INVITE <a href="mailto:sip%3A102@sipwise.telecentro.net.ar">sip:102@sipwise.telecentro.net.ar</a> SIP/2.0&quot;.</div>

<div>Once detected the B number &quot;102&quot; (in this example), the kamailio server will search in a sqlite3 database the transltated number the call should be directed.</div><div>And then the server will send a 300 Redirect with the new request uri. Like this &quot;SIP/2.0 300 Redirect /.../ Contact: <a href="mailto:sip%3A63793266@voip.telecentro.net.ar">sip:63793266@voip.telecentro.net.ar</a>&quot;.</div>

<div>And the softswitch will let the call go to the right number.</div><div>The translation desition is made based on the geographic area where the A party is located.</div><div><br></div><div>If the translated number is like 63793266 or 1557311721 the system is working ok. So the .cfg file seems to be OK.</div>

<div><br></div><div>But if the translated number is like 8003330303 the variable holding the SQL return is set to &quot;-486604289&quot;.</div><div><br></div><div>I think this is related to data types.</div><div>In the logs I can see that kamailio is defaulting datatypes to INT (I&#39;ve tested varchar, int, and bigint in sqlite3), but I don&#39;t know how large could an integer be in Kamailio. According to sqlite3 documentation the number 8003330303 is not long enough and in fact the number is in the database.</div>

<div><br></div><div>Has anybody seen something like this?</div><div>Can anyone help?</div><div><br></div><div>I can provide the hole script and database if this helps.</div><div><br></div><div>Regards,</div><div>Sebastian Ferguson</div>