On 10.10.2022 12:43, Serdar GUCLUER wrote:

In my situation, i want to format string which contains pseudo-variables. These string are stored in db and cached with "cache_table" module.

I tried it like that;

$avp(value) = $sql_cached_value(caching_name:column_name:key);
pv_printf($var(formatted_value), 
$sql_cached_value(caching_name:column_name:key));
xlog("L_INFO", "*** Value: $avp(value) | Formatted Value: $var(formatted_value) 
***");

Hi Serdar,

I remember that at some point, there was some support for string evaluation added as part of the {s.eval} transformation[1].  Unfortunately, I don't recall an equivalent function, so you may have to play around with the transformation only.

[1]: https://www.opensips.org/Documentation/Script-Tran-3-4#s.eval

Best regards,

--
Liviu Chircu
www.twitter.com/liviuchircu  |www.opensips-solutions.com
OpenSIPS Summit 2022 Athens, Sep 27-30 |www.opensips.org/events
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to