[Serusers] How to block m_dump() for some users
Vaclav Kubart
vaclav.kubart at iptel.org
Mon Jun 18 09:23:15 CEST 2007
I guess, that expressions are evaluated from left to right, but I'm not
sure...
Vaclav
On Mon, Jun 18, 2007 at 09:08:56AM +0200, tzieleniewski wrote:
> Thanks :),
>
> How are the regular expression evaluated in ser.cfg??
> Are they evaluated from right to left??
>
> For instance if I have: if( A && B)
> is it like this that B is evaluated first and if B evaluates to logical FALSE A is not evaluated at all??
>
> Cheers
> Tomasz
>
> > On Pá, 2007-06-15 at 10:45 +0200, Vaclav Kubart wrote:
> > > Hi Tomasz,
> > >
> > > > if (@ruri == "sip:name at domain") ?
> > >
> > > something like this could work. Try it and you will see. :-)
> >
> > Yes, or use (@ruri.name == "name")
> >
> > > > There would be nice to have such functionality that when UA registers
> > > > and there is no MESSAGE message indicated in the Allow header field
> > > > the offline messages are not dumped to the UA.
> > >
> > > You can do such test in your config script before calling m_dump (if
> > > triggered by REGISTER). It is possible to search using regular
> > > expression (look for 'search' function usage in example config files).
> >
> > if (@msg.header["Allow"] =~ "mwi") might be faster and more elegant way
> >
> > Michal
> >
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
More information about the sr-users
mailing list