[OpenSIPS-Users] Formating issue for string that contains pv

Liviu Chircu liviu at opensips.org
Mon Oct 10 12:29:03 UTC 2022


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20221010/e0991598/attachment.html>


More information about the Users mailing list