Sunday, December 7, 2008

PV and Transformation API Updates

Pseudo-variables and transformations implemented in core for Kamailio (OpenSER) versions <= 1.4.x are now moved in pv module.

This is part of cleaning up the core, in order to keep it slimmer and less exposed to bugs. There are modules and use cases that need no PVs, therefore no need of keeping the implementation of about 100 pseudo-variables and over 30 transformations in core.

Now the core includes only an API that allows to:
- register pseudo-variables
- parse name, evaluate and set value of pseudo-variable
- register transformations
- parse name and evaluate transformations in config file

$shv(...) - shared variables, and $time(...) - broken down time, were moved from cfgutils module to pv module ($shv(...) depends on $var(...)).

To summarise, for devel version (upcoming v1.5.0 release), if you need $ru, $avp(...), $var(...), a.s.o. in your config file you have to load pv module.

Two new pseudo-variables were introduced with this occasion, $TS and $TF, see more:
- http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#string_formatted_time_-_current
- http://www.kamailio.org/dokuwiki/doku.php/pseudovariables:devel#unix_time_stamp_-_current

No comments: