Hello,
the textops module has now support for pseudo-variables in subst(),
subst_uri() and subst_user(). You can use any of the pseudo-variables
that OpenSER supports (
) in
the replacement part of the parameter given to subst*() -- the parameter
for these functions has the following format
"/regular_expression/replacement/flags". For more info, see the readme file:
Should be analyzed if worth to implement pseudo-variables support to
regular_expression part because it will slow down a lot the processing
since the regexp has to be compiled each time.
Daniel
On 06/24/05 01:11, Miguel Angel Villar wrote:
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
_______________________________________________
Devel mailing list
Devel(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel