Hello,
On 22/11/2016 06:03, Alex Balashov wrote: > Hi, > > I have this set up in my configuration boilerplate: > > -- > flags > DUMMY : 1, > PDD_DAMPEN : 2, > PROXY_MEDIA_SET : 3, > #!ifdef WITH_NAT_TRAVERSAL > SIPPING : 4, > #!endif > DUMMY2 : 12 > -- > > I then use these aliases in transaction flags, e.g. setflag(PDD_DAMPEN). > > But I can honestly say I don't remember how I arrived at this > approach. I wrote it somewhere in early 3.x days. However, when I look > at the core documentation for the 'flags' declaration, all I find is: > > http://www.kamailio.org/wiki/cookbooks/4.4.x/core#flags > > Or namely: > > -- > flags > > Alias name: bool > -- > > And there is no entry for "bool". So, I couldn't have possibly arrived > at this usage from the documentation. > > Can anyone help me reverse-engineer this historical phenomenon? And, > given that the documentation doesn't support it particularly, is it > still an encouraged practice? Or should one use #!defined constants > instead, as in the stock config? Aliasing names to flags is inherited from SER project via the merge of core done back in 2008. I am not familiar with the code to be able to comment more specific, but setflag/isflagset/resetflag should work fine, not sure if they work to be set to modparams, probably yes. As I got used to the Kamailio way of using defines, I stayed with this approach. Cheers, Daniel -- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users