[SR-Users] Storing an integer value into AVP from REDIS string
Daniel-Constantin Mierla
miconda at gmail.com
Tue May 21 08:34:21 CEST 2019
Hello,
to convert a string value stored in a variable to integer, use the
{s.int} transformation, like:
$avp(intval) = $(var(strval){s.int});
See more about transformations at:
* https://www.kamailio.org/wiki/cookbooks/devel/transformations#sint
Cheers,
Daniel
On 20.05.19 13:52, Stephen Bucklin wrote:
> Hi,
> Any quick thoughts. I am using a REDIS "GET" to retrieve a JSON obj as
> a string from REDIS and then the JANSSON get value to extract a key
> value from the string and pop it into an AVP ($avp(val)) and wish to
> ensure the value is an integer in the AVP. New to this, be kind :-)
> Steve
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190521/4923f71e/attachment.html>
More information about the sr-users
mailing list