On 12/11/09 8:50 PM, Iñaki Baz Castillo wrote:
El Viernes, 11 de Diciembre de 2009, David escribió:
I am guessing that cflags represents the bflags?
Yes. In the table cflags mean "contact flags" while in the script bflag means "branch flags". Whe doing lookup for a registered user both mean the same :)
So if I have a value of 192, does that mean flags 7 and 8 are set ? This confuses me cause I set flags 6 and 7.
Is 2^7 + 2^8 == 192 ?
The index for flags starts from 0 going up to 31
http://www.kamailio.org/dokuwiki/doku.php/tutorials:openser-flag-operations
Cheers, Daniel
Do the bflags appear magically in the routing scripts or is there a command that I have to execute for the script to have the bflags?
You can set a bflag for a branch with "setbflag(N)". Also when detecting NAT you set a nat flag, so you see the bflag again with "setbflag(NATTED_CONTACT)" and it stores the same flag into "location" table "cflags" column.