[SR-Users] $var binary operation

Jijo realjijo at gmail.com
Thu Feb 13 15:14:08 CET 2014


Hi

I tried the binary operation using $var as per the documentation and its
seems not working. Can somebody help me to understand it.

http://kamailio.org/dokuwiki/doku.php/pseudovariables:3.1.x

$var(a) = 3 + (7&(~2));

if( [ $var(a) & 4 ] ) {
  xlog("var a has third bit set\n");
}


The format with square bracket in the conditional statement is showing
parse error when i load the cfg. So it tried like below and that too not
working

$var(a) = 8;

if( $var(a) & 4 ) {
  xlog("var a has third bit set\n");
}

Please let me know if something missing here.?


Thanks
Jijo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140213/c69b1266/attachment.html>


More information about the sr-users mailing list