[OpenSIPS-Users] bitwise comparison syntax problem

Jeff Pyle jpyle at fidelityvoice.com
Tue Feb 24 14:21:03 CET 2009


Hi Bogdan,

Yes, exactly.  The per-Gw flags.  I wasn't sure how to deal with them but I
believe you've answered that in an earlier email.  I'll test it and write
back.


Thanks,
Jeff



On 2/24/09 5:26 AM, "Bogdan-Andrei Iancu" <bogdan at voice-system.ro> wrote:

> Hi Jeff,
> 
> You mean per GW flags ?
>     http://www.opensips.org/html/docs/modules/1.4.x/lcr.html#id228367
> 
> Regards,
> Bogdan
> 
> Jeff Pyle wrote:
>> Fair Users,
>> 
>> Let me ask this another way.  I just noticed the flags field in the lcr
>> module.  If store values there, what's the mechanism to check to see if
>> certain flags are set?
>> 
>> 
>> Thanks,
>> Jeff
>> 
>> 
>> 
>> On 2/21/09 3:28 PM, "Jeff Pyle" <jpyle at fidelityvoice.com> wrote:
>> 
>>   
>>> Hello,
>>> 
>>> It appears I'm having some syntax issues doing a logical AND bitwise
>>> comparison in the Opensips script.  I'm looking to do much the same thing
>>> that flags do, I just need more flags than branch, script and their cousins
>>> allow.
>>> 
>>> While not my final application, I'm testing with the cflags (branch flags)
>>> value in the location table.  After a successful lookup() I'm trying to test
>>> $bf with the && operator.  My final application won't have a
>>> isbflagset-style function to check with unfortuantely.
>>> 
>>> I've verified $bf loads properly with the lookup().  If I'm checking for bit
>>> 5, for example, what's the proper way to do this?  I've tried variations on
>>> the following:
>>> 
>>> if ($bf && 16)
>>> if ([$bf && 16])
>>> ...and other, less sane approaches
>>> 
>>> 
>>> Thanks,
>>> Jeff
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>     
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>>   
> 




More information about the Users mailing list