Hi,
I would like to block messages for particular UAs because some of my phones behave in such a manner that they do not respond to MESSAGE message. I would like to make I filter basing on the ruri. How can I compare ruri namepart with a particular value?? will something like this work if (@ruri == "sip:name@domain") ?
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.
Cheers Thanks in advanced Tomasz
Hi Tomasz,
if (@ruri == "sip:name@domain") ?
something like this could work. Try it and you will see. :-)
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).
Vaclav
Cheers Thanks in advanced Tomasz _______________________________________________ Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
On Pá, 2007-06-15 at 10:45 +0200, Vaclav Kubart wrote:
Hi Tomasz,
if (@ruri == "sip:name@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
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@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
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@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@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Hi,
Michal when I check the condition for Allow header I get the following: Jun 18 09:15:08 rd ser[20567]: Unable to resolve select 'Allow' at level 2 Jun 18 09:15:08 rd ser[20567]: BUG: route.c:358: Unable to resolve select
Cheers Tomasz
On Pá, 2007-06-15 at 10:45 +0200, Vaclav Kubart wrote:
Hi Tomasz,
if (@ruri == "sip:name@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
Hi Tomasz,
its strange, I'll check when I get some time for it. Do you use 2.0.rcX or HEAD?
Anyway, you can temporarilly use @hf_value from textops for the same purpose...
Expressions are evalueated form left to right, so if (A && B) - if A is false, B is not evaluated at all...
Michal
On Po, 2007-06-18 at 09:20 +0200, tzieleniewski wrote:
Hi,
Michal when I check the condition for Allow header I get the following: Jun 18 09:15:08 rd ser[20567]: Unable to resolve select 'Allow' at level 2 Jun 18 09:15:08 rd ser[20567]: BUG: route.c:358: Unable to resolve select
Cheers Tomasz
On Pá, 2007-06-15 at 10:45 +0200, Vaclav Kubart wrote:
Hi Tomasz,
if (@ruri == "sip:name@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