[Devel] unified pseudo-variables in avpops and xlog

Miguel Angel Villar mavilla at redvoiss.net
Fri Jun 24 00:11:30 CEST 2005


Hi Daniel
	This is a really nice feature. I had been looking for something like
this in the textops module. Implementing pseudo-variables in subst_uri() and
subst() functions will give power tools for doing dynamic number/domain
translation of URI. Conbined with avpops module the transformation can be
based on external database, Great!

Regards.
MaV.-

>Hello,
>
>the avpops and xlog module are using now same format for specifiers to 
>print formatted strings. avpops has a new function avp_printf(dest, 
>format) which stores in the AVP 'dest' the string resulted after 
>substitution of the specifiers from "format" parameter.
>
>The old marker for specifiers '%' has been replaced by '$' which is more 
>common for variables. To specify a header or an AVP you have to use now 
>$hdr(header_name[index]) or $avp(avp_id[index]). The list with all 
>available pseudo-variables in OpenSER is posted at:
>http://openser.org/docs/pseudo-variables.html
>
>avp_printf() allow to compose a value from many parts of a SIP message, 
>other avps and many other values taken from system. For example:
>avp_printf("i:20", "the time is $Tf, the request is a $rm and has the 
>from header $hdr(from)");
>
>The documentation for avpops and xlog module has been updated on CVS, 
>too. Note that these features are available only on CVS head 
>(development version - http://openser.org/index.php#download).
>Online documentation site for modules (http://openser.org/docs/) has 
>been split in 0.9x (stable) and 0.10.x (devel) directories.
>
>Follows the integration of same format for pseudo-variables in textops, 
>acc and tm. We will appreciate any feedback.
>
>Daniel




More information about the Devel mailing list