[sr-dev] Kamailio 3.1.4 Bitwise Operators?

Brandon Armstead brandon at cryy.com
Tue Aug 2 22:44:03 CEST 2011


Hello,

   It seems as if the bitwise operations in Kamailio 3.1.4 are broken?
 Please correct me if I am doing something wrong - however simple
evaluations such as:

$avp(s:my-test-bit) = 10;

$avp(s:my-test-bit) = (int)$avp(s:my-test-bit) & ~ 2;

Seems to result in $avp(s:my-test-bit) being equal to "2" rather than "8"

Any thoughts / Suggestions / Fixes?

I also wonder if this has any relation to !~ not working?

Thanks for all of your help in advance!

P.S. I sent this both to user list and to devel, please forgive me if they
do not belong in one of the lists.

Sincerely,
Brandon Armstead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20110802/6050f737/attachment.htm>


More information about the sr-dev mailing list