[SR-Users] $null + 0 is not int

Daniel-Constantin Mierla miconda at gmail.com
Sun Dec 1 10:08:01 CET 2019


Probably is string, that's the default value type of PVs, as they
originated from xlog, where the output was a string to be printed.

"" + 0 should be "0"

Cheers,
Daniel

On 01.12.19 02:35, Juha Heinanen wrote:
> Why is it that $null + 0 is 0 but not int?  What is it?
>
> -- Juha
>
>     $avp(test) = $null + 0;
>     if (is_int("$avp(test)"))
>         INFO(test $avp(test) IS int);
>     else
>         INFO(test $avp(test) IS NOT int);
>
> Dec  1 02:46:01 salmon /usr/bin/sip-proxy[10138]: INFO: test 0 IS NOT int
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com




More information about the sr-users mailing list