[OpenSER-Users] test operator

Klaus Darilion klaus.mailinglists at pernau.at
Thu Sep 20 17:21:35 CEST 2007


Hi!

from the core cookbook of 1.2:

> If you want to evaluate arithmetic operations and test the value in 
> conditions, use the test operator ' [ ... ] ' . This is required to 
> convert the result to internal convention for drop, true and false.
> 
> if ( [ $var(a)&4 ] ) {
>    xlog("bit 3 is set in var a");
> }

Is there somewhere a detailed description of the test operator? Can it 
only be used to test for 0/1 or can I also do comparison like e.g.
if ([ $rd == "mydomain.at" ]) ?

regards
klaus




More information about the sr-users mailing list