I use named flags very extensively, but only in the uncontroversial contexts Daniel mentions.
-- Sent from my iPad
On Mar 26, 2019, at 9:46 PM, Joel Serrano joel@textplus.com wrote:
I was just about to ask exactly about that as I didn't understand the differences... :)
I guess I'll take the #!define way to do it!
Thanks Daniel!!
On Tue, Mar 26, 2019 at 6:21 PM Daniel-Constantin Mierla miconda@gmail.com wrote: Bringing in few more details ...
The named flags feature was added by SER developer during 2005-2008, when Kamailio (well, openser at that time) and SER were different projects. In 2008, as we started merging the source trees of Kamailio and SER back in one repo (which became what is not Kamailio project), named flags were propagated.
However, as for a personal experience, I never took the time to play with them to see if they can be used "everywhere" -- for sure you can use then in setflag/resetflag/isflagset functions, but I am not sure if they work for branch flags and module parameters, or other places where a flag index is expected.
In Kamailio we had the #!define feature that allowed to give a "name" for a flag and that's how we have in default kamailio.cfg -- somewhere at the top you can see #!define for FLT_* and FLB_* flags.
Cheers, Daniel
On 27.03.19 00:22, Joel Serrano wrote: Wonderful!!!
This is perfect: http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#names_for_ro...
Thanks Alex :)
On Tue, Mar 26, 2019 at 4:15 PM Alex Balashov abalashov@evaristesys.com wrote: Hi Joel,
Yes, this is a gap in the core cookbook documentation.
I learned about named flags back in the day:
http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x
-- Alex
On Tue, Mar 26, 2019 at 04:04:29PM -0700, Joel Serrano wrote:
Hi,
I saw in the Kazoo default.cfg this:
... ####### Flags ####### flags FLAG_INTERNALLY_SOURCED: 1, FLAG_ASSOCIATE_SERVER: 2, FLAG_SKIP_NAT_CORRECTION: 3, FLAG_ASSOCIATE_USER: 4, FLAG_TRUSTED_SOURCE: 5, FLAG_SESSION_PROGRESS: 6, FLAG_IS_REPLY: 7, FLAG_SIP_TRACE: 8; ...
So then I went here to read about it: https://www.kamailio.org/wiki/cookbooks/5.2.x/core#flags
I found out it's not documented... is this a drop-in alternative for a: #!define FLAG_NAME FLAG_BIT?
Sorry, first time I see this if not I would update the docs myself... :(
Thanks, Joel.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- www.asipto.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users