Hello, something similar can be done now with variables:
if($mf & 7) or if( $mf & ( (1<<2) | (1<<3) ) ) Anyhow, if anyone wants a dedicated function, it is ok, but might be better to add a new function, that can be in corex module to allow pv parameters. Could be actually two functions: - allflagsset(x) - match all the flags (e.g, $mf & 7 == 7) - anyflagset(x) -match any of the flags (e.g, $mf & 7 != 0) Cheers, Daniel On Mon, Sep 9, 2013 at 1:02 PM, Juha Heinanen <[email protected]> wrote: > currently isflagset core function accepts only one flag as argument. it > would be nice if more that one flag could be tested with one function > call, e.g., > > isflagset(1|2) or isflagset(1&2) > > since i'm not familiar with adding syntax related stuff to core, is it > ok if i create a tracker wish list item on this? > > -- juha > > _______________________________________________ > sr-dev mailing list > [email protected] > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev > -- Daniel-Constantin Mierla http://www.asipto.com
_______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
