<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">I use named flags very extensively, but only in the uncontroversial contexts Daniel mentions.<div><br><div id="AppleMailSignature" dir="ltr">--<div>Sent from my iPad</div></div><div dir="ltr"><br>On Mar 26, 2019, at 9:46 PM, Joel Serrano <<a href="mailto:joel@textplus.com">joel@textplus.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">I was just about to ask exactly about that as I didn't understand the differences... :)<div><br></div><div>I guess I'll take the #!define way to do it!</div><div><br><div>Thanks Daniel!! <br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 26, 2019 at 6:21 PM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <p>Bringing in few more details ...</p>
    <p>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.</p>
    <p>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.</p>
    <p>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.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="gmail-m_2749266505999268341moz-cite-prefix">On 27.03.19 00:22, Joel Serrano wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">Wonderful!!!
          <div><br>
          </div>
          <div>This is perfect: <a href="http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#names_for_route_blocks_and_flags" target="_blank">http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x#names_for_route_blocks_and_flags</a></div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Thanks Alex :)</div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, Mar 26, 2019 at 4:15
          PM Alex Balashov <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi
          Joel,<br>
          <br>
          Yes, this is a gap in the core cookbook documentation. <br>
          <br>
          I learned about named flags back in the day:<br>
          <br>
          <a href="http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x" rel="noreferrer" target="_blank">http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x</a><br>
          <br>
          -- Alex<br>
          <br>
          On Tue, Mar 26, 2019 at 04:04:29PM -0700, Joel Serrano wrote:<br>
          <br>
          > Hi,<br>
          > <br>
          > I saw in the Kazoo default.cfg this:<br>
          > <br>
          > ...<br>
          > ####### Flags #######<br>
          > flags<br>
          >     FLAG_INTERNALLY_SOURCED:  1,<br>
          >     FLAG_ASSOCIATE_SERVER:    2,<br>
          >     FLAG_SKIP_NAT_CORRECTION: 3,<br>
          >     FLAG_ASSOCIATE_USER:      4,<br>
          >     FLAG_TRUSTED_SOURCE:      5,<br>
          >     FLAG_SESSION_PROGRESS:    6,<br>
          >     FLAG_IS_REPLY:            7,<br>
          >     FLAG_SIP_TRACE:           8;<br>
          > ...<br>
          > <br>
          > <br>
          > So then I went here to read about it:<br>
          > <a href="https://www.kamailio.org/wiki/cookbooks/5.2.x/core#flags" rel="noreferrer" target="_blank">https://www.kamailio.org/wiki/cookbooks/5.2.x/core#flags</a><br>
          > <br>
          > I found out it's not documented... is this a drop-in
          alternative for a:<br>
          > #!define FLAG_NAME FLAG_BIT?<br>
          > <br>
          > Sorry, first time I see this if not I would update the
          docs myself... :(<br>
          > <br>
          > Thanks,<br>
          > Joel.<br>
          <br>
          > _______________________________________________<br>
          > Kamailio (SER) - Users Mailing List<br>
          > <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
          > <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
          <br>
          <br>
          -- <br>
          Alex Balashov | Principal | Evariste Systems LLC<br>
          <br>
          Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) <br>
          Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>,
          <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
          <br>
          _______________________________________________<br>
          Kamailio (SER) - Users Mailing List<br>
          <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
          <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="gmail-m_2749266505999268341mimeAttachmentHeader"></fieldset>
      <pre class="gmail-m_2749266505999268341moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="gmail-m_2749266505999268341moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="gmail-m_2749266505999268341moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="gmail-m_2749266505999268341moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="gmail-m_2749266505999268341moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="gmail-m_2749266505999268341moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="gmail-m_2749266505999268341moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 6-8, 2019 -- <a class="gmail-m_2749266505999268341moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a>
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- <a class="gmail-m_2749266505999268341moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a></pre>
  </div>

</blockquote></div>
</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>Kamailio (SER) - Users Mailing List</span><br><span><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></span><br><span><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br></div></blockquote></div></body></html>