[Users] unified pseudo-variables in avpops and xlog

Daniel-Constantin Mierla daniel at voice-system.ro
Thu Jun 23 20:29:46 CEST 2005


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 sr-users mailing list