[SR-Users] Random number generation kamailio
Daniel Tryba
d.tryba at pocos.nl
Wed Mar 23 18:00:14 CET 2016
On Wed, Mar 23, 2016 at 04:49:09PM +0530, Cibin Paul wrote:
> $var(x) = 123456789012;
>
> $fU = $var(x);
> uac_replace_from("$var(x)","”);
>
>
> The above code is assigning cli with 2147483647. Could you please help me on this
Seeing the value 2147483647 should trigger some neurons (it is 2^31-1)
from now on.
You are looking at the wrapping of signed 32bit integers where 2^31-1 is
the max value. The workaround for these kind of problems is handling the
values as string instead of integers/longs/whatever numeric with
contrained storage space (like Daniel suggested).
More information about the sr-users
mailing list