Hi Both, Thank you both for the explanations. The cast addition to the query works perfectly! thanks very much. Jon
> Date: Wed, 6 Jan 2016 12:04:47 +0100 > From: d.tr...@pocos.nl > To: sr-users@lists.sip-router.org > Subject: Re: [SR-Users] Negative value returned when using sql_pvquery > > On Wed, Jan 06, 2016 at 10:48:38AM +0000, Jonathan Hunter wrote: > > Currently the field I am extracting the value from in the database is set > > to type; > > bigint(20) unsigned > > If I change to varchar for example it returns fine, my only issue is that > > the overflow only occurs on 10 digit numbers starting with 2 or 3. > > If I add a value for example 1785702370 or 7785702370 they are returned > > without issue without changing the DB value type. > > The problem you experience occurs for all numbers >= 2147483648 (2^31) > and <= 4294967296 (2^32). Looks like the auto conversion in kamailio is > doing funky stuff in this range :) Can you verify this? > > BTW You don't have to change the table, you can do (im|ex)plicit casts > in the query in kamailio. See > https://dev.mysql.com/doc/refman/5.5/en/type-conversion.html for > example. > > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users