[Users] Are pseudo variables supported in replace()?
daniel at voice-system.ro
Mon Nov 7 21:34:04 CET 2005
On 11/05/05 20:52, 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" );
this was not introduced because the regular expressions are pre-compiled
at startup. Otherwise there will be a lot of speed penalty. However, it
may be an option to allow such case, being admin decision whether to use
it or not -- first it has to be analyzed if it is simple to do it :-)
More information about the Users