[Users] Are pseudo variables supported in replace()?
bogdan at voice-system.ro
Mon Nov 7 13:31:55 CET 2005
the usage of pseudo-variables inside the regexp was avoided due
performance reasons - all regexp are compiled at startup, they being
only evaluated on runtime.
By having variables into regexp, the compilation of the expression will
must be done each time at runtime :(.
there is only one attempt in this direction - it might help you ; see
the fm operator in avp_check :
Federico Giannici wrote:
> Federico Giannici wrote:
>> Are pseudo variables sopposed to work in replace() function?
>> The pseudo variables documentation web page says that they are
>> supported only by avpops and xlog, but the OpenSER 1.0.0 announcement
>> web page says that they are supported by textops too...
>> Who is right?
> Looking at the examples I found that AVPs usage is supported at least
> on the "replacement" string of subst(), but it appears to me that it
> isn't supported in the regular expression.
> So, how can I make a regular expression with variable content?
> Something like the following:
> subst( "/^Proxy-Authorization:.*realm=\"$avp(s:realm)\".*\n//i" );
More information about the Users