<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>you also have to be careful not to have such lines in comments or
      in the wrong order. Maybe just grep the lines starting with #! and
      be sure you have proper nesting of if[n]def and endif.<br>
    </p>
    <p>Another thing to check is if you have include/import files and if
      yes, that their content is correct.</p>
    <p>Otherwise, if you have the same config and you start it with the
      same kamailio parameters, then is rather strange. You have to make
      a minimal config that exposes the issue and send it over here so
      we can reproduce and troubleshoot.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 26.08.20 15:43, Noah Mehl wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:85EF40CD-57AE-49DB-829D-E48DC07CBF53@gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      Daniel,
      <div class=""><br class="">
      </div>
      <div class="">I have done this, but that’s why I’m confused,
        because sometimes it works, and sometimes it doesn’t (with no
        changes to the configs).</div>
      <div class=""><br class="">
      </div>
      <div class="">I ran a quick grep on the config:</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div style="margin: 0px; font-stretch: normal; font-size: 18px;
          line-height: normal; font-family: Menlo;" class=""><span
            style="font-variant-ligatures: no-common-ligatures" class="">root@inbound-kamailio-test-02:/usr/local/etc/kamailio#
            grep -i '#!if' kamailio.cfg | wc -l</span></div>
        <div style="margin: 0px; font-stretch: normal; font-size: 18px;
          line-height: normal; font-family: Menlo;" class=""><span
            style="font-variant-ligatures: no-common-ligatures" class="">61</span></div>
        <div style="margin: 0px; font-stretch: normal; font-size: 18px;
          line-height: normal; font-family: Menlo;" class=""><span
            style="font-variant-ligatures: no-common-ligatures" class="">root@inbound-kamailio-test-02:/usr/local/etc/kamailio#
            grep -i '#!end' kamailio.cfg | wc -l</span></div>
        <div style="margin: 0px; font-stretch: normal; font-size: 18px;
          line-height: normal; font-family: Menlo;" class=""><span
            style="font-variant-ligatures: no-common-ligatures" class="">61</span></div>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">But again, it fails randomly.  If it really was that
        the #if[n]def’s didn’t match up with the #!endif’s, it would
        fail consistently?</div>
      <div class=""><br class="">
      </div>
      <div class="">~Noah</div>
      <div class=""><br class="">
        <div><br class="">
          <blockquote type="cite" class="">
            <div class="">On Aug 25, 2020, at 9:30 AM, Daniel-Constantin
              Mierla <<a href="mailto:miconda@gmail.com" class=""
                moz-do-not-send="true">miconda@gmail.com</a>> wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta http-equiv="Content-Type" content="text/html;
                charset=UTF-8" class="">
              <div class="">
                <p class="">Hello,</p>
                <p class="">in such cases, check the config file content
                  and be sure you have corresponding "#!endif" for each
                  #!ifdef or #!ifndef.</p>
                <p class="">Cheers,<br class="">
                  Daniel<br class="">
                </p>
                <div class="moz-cite-prefix">On 20.08.20 17:46, Noah
                  Mehl wrote:<br class="">
                </div>
                <blockquote type="cite"
                  cite="mid:E6D44AB2-4076-47FF-B825-1C05433530B0@gmail.com"
                  class="">
                  <pre class="moz-quote-pre" wrap="">All,

I have built branch 5.4 from source, and I’m working with the default config.  However, from time to time I get this error when launching kamailio:

root@inbound-kamailio-test-02:~# /usr/local/sbin/kamailio -P /run/kamailio/kamailio.pid -f /usr/local/etc/kamailio/kamailio.cfg -m 128 -M 64 -E
 0(1296) CRITICAL: <core> [core/cfg.y:3588]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 410, column 30-34: syntax error
 0(1296) CRITICAL: <core> [core/cfg.y:3588]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 410, column 30-34: Invalid arguments
 0(1296) CRITICAL: <core> [core/cfg.y:3591]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 410, column 35: 
ERROR: bad config file (3 errors)
 0(1296) ERROR: <core> [core/ppcfg.c:234]: pp_ifdef_level_error(): different number of preprocessor directives: 1 more #!if[n]def as #!endif

However, if I run a “make install” from the source directory, this error goes away.  Has anyone run into this issue before?

Configs attached.

Thanks!

~Noah


</pre>
                  <br class="">
                  <fieldset class="mimeAttachmentHeader"></fieldset>
                  <pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
                </blockquote>
                <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com/" moz-do-not-send="true">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
              </div>
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
  </body>
</html>