<div dir="ltr">Hello Daniel,<div><br></div><div>Thank you for the hints. I made a very simple configuration and Kamailio v5.6 started without a problem. I will be looking into my current configuration.<br><br>Test config:<br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">loadmodule "tm.so"</font></div><div><font face="monospace">loadmodule "tmx.so"</font></div><div><font face="monospace">loadmodule "sl.so"</font></div><div><font face="monospace">loadmodule "pv.so"</font></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace"><br></font></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">loadmodule "secsipid.so"</font></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace"><br></font></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace">request_route {</font></div></blockquote><div><font face="monospace"><br></font></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace"> if ($si == "127.0.0.1") {</font></div><div><font face="monospace"> $var(secsipid_x5u) = "<a href="https://xyz/123K">https://xyz/123K</a>";</font></div><div><font face="monospace"> $var(secsipid_keyPath) = "/var/kamailio/stir-shaken/rule-aaa/132.key.pem";</font></div><div><font face="monospace"> secsipid_add_identity("$fU", "$rU", "A", "", "$var(secsipid_x5u)", "$var(secsipid_keyPath)");</font></div><div><font face="monospace"> }</font></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace"><br></font></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace"> else {</font></div><div><font face="monospace"> if (!secsipid_check_identity("")) {</font></div><div><font face="monospace"> sl_send_reply("403", "Forbidden");</font></div><div><font face="monospace"> exit;</font></div><div><font face="monospace"> }</font></div><div><font face="monospace"> }</font></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="monospace"><br></font></div><div><font face="monospace"> t_relay();</font></div><div><font face="monospace">}</font></div></blockquote></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вт, 27 вер. 2022 р. о 18:42 Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> пише:<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>
<p>You can use the 5.6 branch, secsipid module should be the same as
in master branch.</p>
<p>Otherwise, C99 should be required to be supported by the compiler
because of code in many other components, is rpm build script
enforcing an older C standard in the compiler?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 27.09.22 17:31, Володимир Іванець
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">I will try the master branch too. Unfortunately
there is a problem with the RPM build procedure. I will try a
different approach and update you when I have something. Thank
you for your help!
<div><br>
</div>
<div><br>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><font face="monospace">In file included from
core/ppcfg.c:37:0:</font></div>
<div><font face="monospace">core/utils/snexpr.h: In function
'snexpr_op':</font></div>
<div><font face="monospace">core/utils/snexpr.h:272:2: error:
'for' loop initial declarations are only allowed in C99
mode</font></div>
<div><font face="monospace"> for(unsigned int i = 0; i <
sizeof(OPS) / sizeof(OPS[0]); i++) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h:272:2: note:
use option -std=c99 or -std=gnu99 to compile your code</font></div>
<div><font face="monospace">core/utils/snexpr.h: In function
'snexpr_parse_number':</font></div>
<div><font face="monospace">core/utils/snexpr.h:286:2: error:
'for' loop initial declarations are only allowed in C99
mode</font></div>
<div><font face="monospace"> for(unsigned int i = 0; i <
len; i++) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h: In function
'snexpr_func_find':</font></div>
<div><font face="monospace">core/utils/snexpr.h:322:2: error:
'for' loop initial declarations are only allowed in C99
mode</font></div>
<div><font face="monospace"> for(struct snexpr_func *f =
funcs; f->name; f++) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h: In function
'snexpr_convert_num':</font></div>
<div><font face="monospace">core/utils/snexpr.h:398:3:
warning: implicit declaration of function 'asprintf'
[-Wimplicit-function-declaration]</font></div>
<div><font face="monospace">
asprintf(&e->param.stz.sval, "%g", value);</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h: In function
'snexpr_create':</font></div>
<div><font face="monospace">core/utils/snexpr.h:1193:6: error:
'for' loop initial declarations are only allowed in C99
mode</font></div>
<div><font face="monospace"> for(struct snexpr_var *v =
vars->head; v; v = v->next) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h:1217:7: error:
'for' loop initial declarations are only allowed in C99
mode</font></div>
<div><font face="monospace"> for(int j = 0; j <
sne_vec_len(&arg.args); j++) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h:1231:15:
error: redefinition of 'j'</font></div>
<div><font face="monospace"> for(int j = 1; j <
sne_vec_len(&m.body); j++) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h:1217:15: note:
previous definition of 'j' was here</font></div>
<div><font face="monospace"> for(int j = 0; j <
sne_vec_len(&arg.args); j++) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h:1231:7: error:
'for' loop initial declarations are only allowed in C99
mode</font></div>
<div><font face="monospace"> for(int j = 1; j <
sne_vec_len(&m.body); j++) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">core/utils/snexpr.h: In function
'snexpr_destroy':</font></div>
<div><font face="monospace">core/utils/snexpr.h:1412:3: error:
'for' loop initial declarations are only allowed in C99
mode</font></div>
<div><font face="monospace"> for(struct snexpr_var *v =
vars->head; v;) {</font></div>
<div><font face="monospace"> ^</font></div>
<div><font face="monospace">make[1]: Leaving directory
`/builddir/build/BUILD/kamailio-5.7.0-dev1/src'</font></div>
<div><font face="monospace">make[1]: *** [core/ppcfg.o] Error
1</font></div>
<div><font face="monospace">make: *** [default] Error 2</font></div>
<div><font face="monospace">error: Bad exit status from
/var/tmp/rpm-tmp.I4sU6o (%build)</font></div>
<div><font face="monospace"> Bad exit status from
/var/tmp/rpm-tmp.I4sU6o (%build)</font></div>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><font face="monospace"><br>
</font></div>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><font face="monospace"><br>
</font></div>
<div><font face="monospace">RPM build errors:</font></div>
<div><font face="monospace">ERROR:
Exception(../../kamailio-5.7.0-dev1.0.el7.centos.src.rpm)
Config(epel-7-x86_64) 1 minutes 45 seconds</font></div>
<div><font face="monospace">INFO: Results and/or logs in:
/var/lib/mock/epel-7-x86_64/result</font></div>
<div><font face="monospace">ERROR: Command failed. See logs
for output.</font></div>
<div><font face="monospace"> # bash --login -c
/usr/bin/rpmbuild -bb --target x86_64 --nodeps
/builddir/build/SPECS/kamailio.spec</font></div>
<div><font face="monospace">make: *** [rpm] Error 1</font></div>
</blockquote>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">вт, 27 вер. 2022 р. о 17:50
Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>>
пише:<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>
<p>Hello,</p>
<p>I just tested with git master branch using:</p>
<p>secsipid_check_identity("");<br>
</p>
<p>and started fine. Maybe is something else wrong in your
config.<br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 27.09.22 13:58, Володимир Іванець wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Daniel,
<div><br>
</div>
<div>Sorry for the delayed response. I can confirm that
I get the "unknown command, missing loadmodule?" error
when using an empty parameter <i>if
(secsipid_check_identity(""))</i>.</div>
<div><br>
</div>
<div>And thank you for the clarification about the file
with the certificate.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пн, 26 вер. 2022 р. о
19:50 Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>>
пише:<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>
<p>Hello,</p>
<p>secsipid_check_identity("") should be ok, because
the parameter is empty, but
secsipid_check_identity() is not ok, because is no
parameter.</p>
<p>Isn't it working when you have
secsipid_check_identity("")?</p>
<p>It has to be one certificate, which corresponds
to the key that was used to generate the identity
header. The function does not expect many
certificates and loop to see if one of them
corresponds to the key.<br>
</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 26.09.22 17:53, Володимир Іванець wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Daniel!
<div><br>
</div>
<div>I started with a simpler configuration: <i>if
(secsipid_check_identity()) {</i> and <i>if
(secsipid_check_identity("")) {</i> -
according to documentation: <i>If the
parameter is empty, the function is
downloading the key using the URL from
"info" parameter of the Identity header,
using the value od "timeout" parameter to
limit the download time.</i> If this
matters, I did not configure modparam "expire"
and "timeout".</div>
<div><br>
</div>
<div>When I called secsipid_check_identity with
a path to the certificate, Kamailio started as
expected.</div>
<div><br>
</div>
<div>Is there something else I need to do or the
function <i>secsipid_check_identity</i> must
receive a path to certificate as parameter?
Also, is it safe to assume that this file can
contain multiple certificates?</div>
<div><br>
</div>
<div>Thank you very much!</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">пн, 26 вер.
2022 р. о 17:36 Daniel-Constantin Mierla
<<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>>
пише:<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>
<p>Hello,</p>
<p>maybe the function is provided with
invalid parameters? What's the line 47
in the file?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 26.09.22 15:54, Володимир Іванець
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello everyone!
<div><br>
</div>
<div>I'm testing calls with
STIR/SHAKEN with a Secsipid module
on a Kamailio version 5.6.1 and ran
into a problem. Outbound calls work
fine when the function <i>secsipid_add_identity</i>
with appropriate parameters is
called. But as soon as I add
function <i>secsipid_check_identity</i> to
my configuration, Kamilio would not
start. Here is an error message I
get:</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><i>kamailio:
CRITICAL: <core>
[core/cfg.y:3791]: yyerror_at():
parse error in config file
/etc/kamailio/include/registrar.cfg,
line 47, column 39: unknown
command, missing loadmodule?</i></blockquote>
<div><i><br>
</i></div>
<i>loadmodule "secsipid.so"</i> is
present and is above the function <i>secsipid_check_identity</i> call.
Both secsipid.so and secsipid_proc.so
module files are the correct version
and present on the system.
<div><br>
</div>
<div><br>
</div>
<div>Another question is related to
the rpm package build. How do you
build additional modules? I made
adjustment to
the pkg/kamailio/Makefile file. In
the <b>cfg</b> section changed <i>$(MAKE)
-C ../../src cfg</i> with <i>$(MAKE)
FLAVOUR=kamailio
include_modules="secsipid
secsipid_proc" -C ../../src cfg</i>.
Required modules appeared in
the modules.lst file but their rpm
packages were not built.</div>
<div><br>
</div>
<div>Thank you very much!</div>
</div>
<br>
<fieldset></fieldset>
<pre>__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
* <a 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 cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
Nov 7-10, 2022 (Europe Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote>
</div>
</div>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
Nov 7-10, 2022 (Europe Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
Nov 7-10, 2022 (Europe Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
Nov 7-10, 2022 (Europe Timezone)
* <a href="https://www.asipto.com/sw/kamailio-advanced-training-online/" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
</div>
</blockquote></div>