<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Hello,</p>
    <p>you have to put $tu inside double quotes:</p>
    <p>if (registered("kam_location", "$tu")) {</p>
    <p>The error says that the parameter is not expected in the format
      you set.</p>
    <p>The crash can be because of interpreter trying to go further
      parsing the config, something similar to:</p>
    <p>  - <a href="https://github.com/kamailio/kamailio/issues/2239">https://github.com/kamailio/kamailio/issues/2239</a></p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 14.08.20 10:23, Jon Bonilla (Manwe)
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20200814102332.0e881f45@multivac.sipdoc.net">
      <pre class="moz-quote-pre" wrap="">Hi

when I start kamailio in my dev system it fails to start and segfaults. 

Version: 5.4.0

CFG Line: if (registered("kam_location",$tu)) {

Log:
Aug 14 10:20:29 pekedev2 kamailio: CRITICAL: <core> [core/cfg.y:3588]:
yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 382,
column 34-36: function registered: parameter 2 is not constant#012 

Aug 14
10:20:29 pekedev2 kernel: [1501045.504630] kamailio[21276]: segfault at
6e6f6974 ip 00005566607d8887 sp 00007ffd6761b240 error 4 in
kamailio[55666079d000+431000] 

Aug 14 10:20:29 pekedev2 kernel: [1501045.504655]
Code: 89 bd 68 ff ff ff 64 48 8b 04 25 28 00 00 00 48 89 45 c8 31 c0 48 83 bd
68 ff ff ff 00 0f 84 f5 09 00 00 48 8b 85 68 ff ff ff <8b> 00 83 f8 01 0f 85 65
09 00 00 48 8b 85 68 ff ff ff 8b 40 0c 85


The coredump is not clear to me. I extracted using coredumpctl (fuck you
systemd) and running gdb. Is there a new method now that systemd has taken
control of my systems?


cheers,

Jon


-- 
PekePBX, the multitenant PBX solution
<a class="moz-txt-link-freetext" href="https://pekepbx.com">https://pekepbx.com</a>
</pre>
      <br>
      <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">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">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">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>