<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <tt>Hi Ali,<br>
      <br>
      Added on the list <a class="moz-txt-link-freetext" href="http://www.opensips.org/Main/Ver190#toc9">http://www.opensips.org/Main/Ver190#toc9</a> with a
      quite high priority ;).<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <br>
    On 11/08/2012 07:06 PM, Ali Pey wrote:
    <blockquote
cite="mid:CA+q4kR++WADhvRqNji9ftwMEtC7xAhD__cMgOWHsveAR+M5hjw@mail.gmail.com"
      type="cite">I second this as well. Named flags would make
      debugging and scripting quite simpler.
      <div><br>
      </div>
      <div>Regards,</div>
      <div>Ali</div>
      <div><br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Thu, Nov 8, 2012 at 11:23 AM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a
              moz-do-not-send="true" href="mailto:bogdan@opensips.org"
              target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">Hi Michael,<br>
            <br>
            You can already use names for the route, not only numerical
            IDs (without the need of defining).<br>
            <br>
            For flags, you can use only numbers, indeed - usually I use
            M4 as text preprocessor to do different complex ops over the
            script (like defines, ifdefs, etc).<br>
            But maybe a built in support for names of flags will not be
            a big issue, especially it is not a big deal.<br>
            <br>
            Regards,<br>
            <br>
            Bogdan-Andrei Iancu<br>
            OpenSIPS Founder and Developer<br>
            <a moz-do-not-send="true"
              href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a>
            <div class="HOEnZb">
              <div class="h5"><br>
                <br>
                <br>
                On 11/08/2012 01:22 PM, Michael Renzmann wrote:<br>
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  Hi all.<br>
                  <br>
                  I'm relatively new to OpenSIPS and still am at the
                  very beginning of<br>
                  learning how to tame this wonderful beast ;-).<br>
                  <br>
                  One thing that I, personally, find pretty
                  uncomfortable is that in various<br>
                  places in the opensips.cfg one needs to use plain
                  numbers to define or<br>
                  modify the behaviour. That easily results in
                  constructs like:<br>
                  <br>
                  === cut ===<br>
                  route {<br>
                  &nbsp; &nbsp; &nbsp;...<br>
                  &nbsp; &nbsp; &nbsp;route(42);<br>
                  &nbsp; &nbsp; &nbsp;...<br>
                  }<br>
                  <br>
                  route[42] {<br>
                  &nbsp; &nbsp; &nbsp;...<br>
                  &nbsp; &nbsp; &nbsp;setflag(8);<br>
                  &nbsp; &nbsp; &nbsp;...<br>
                  }<br>
                  === cut ===<br>
                  <br>
                  Obviously, it is possible to memorize the meaning of
                  the different numbers<br>
                  depending on the context they are used in - this is
                  what people do now<br>
                  when they work with OpenSIPS. But I guess things may
                  become pretty painful<br>
                  when you have a complex configuration and need to
                  urgently debug an issue<br>
                  in it which just has brought down a heavily loaded,
                  productively used<br>
                  OpenSIPS instance...<br>
                  <br>
                  Using comments certainly helps to relieve the problem
                  a bit, but they can<br>
                  not solve it. However, things would become much easier
                  if one could use<br>
                  "speaking names" instead of plain numbers:<br>
                  <br>
                  === cut ===<br>
                  define(ROUTE_NAT_DETECTION, 42);<br>
                  define(FLAG_NAT_DETECTED, 8);<br>
                  <br>
                  route {<br>
                  &nbsp; &nbsp; ...<br>
                  &nbsp; &nbsp; route(ROUTE_NAT_DETECTION);<br>
                  &nbsp; &nbsp; ...<br>
                  }<br>
                  <br>
                  route[ROUTE_NAT_DETECTION] {<br>
                  &nbsp; &nbsp; ...<br>
                  &nbsp; &nbsp; setflag(FLAG_NAT_DETECTED);<br>
                  &nbsp; &nbsp; ...<br>
                  }<br>
                  === cut ===<br>
                  <br>
                  Yes, I am aware that this could also be achieved by
                  using an external<br>
                  macro preprocessor such as M4. But that would add
                  another dependency - one<br>
                  which could be avoided if OpenSIPS had built-in
                  support for simple macro<br>
                  definitions like those shown in the example above.<br>
                  <br>
                  Bye, Mike<br>
                  <br>
                  _______________________________________________<br>
                  Users mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:Users@lists.opensips.org"
                    target="_blank">Users@lists.opensips.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                    target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
                  <br>
                </blockquote>
                <br>
                _______________________________________________<br>
                Users mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                  target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>