<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>probably the module code needs also some updates, it is rather
old and likely designed for db backends that enforce non-null
values, like in the create statement:</p>
<p> *
<a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/blob/master/utils/kamctl/mysql/dialplan-create.sql#L10">https://github.com/kamailio/kamailio/blob/master/utils/kamctl/mysql/dialplan-create.sql#L10</a></p>
<p>So it does not do much extra checks in the code, but these days
there are other db connectors that may not have strict schema
implementation like db_redis or db_mongodb.</p>
<p>For now, I pushed a push a patch to jsonrpcs module to print
'null' value in jsonrpc response, when the value passed from other
modules to it is C-NULL. This should prevent (hopefully) the crash
from happening, even you revert back to have null value in
database:</p>
<p> *
<a class="moz-txt-link-freetext" href="https://github.com/kamailio/kamailio/commit/c48e409b741821fa470788b3bca0ead32e4d6efc">https://github.com/kamailio/kamailio/commit/c48e409b741821fa470788b3bca0ead32e4d6efc</a><br>
</p>
<p> I will have to check the ctl and xmlrpc modules to see what they
do in similar cases, to cover also the use of kamcmd for the same
situation.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 22.02.21 13:50, Julia Bo wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAASaakb_v7pO5qXu1XOfOrb-rxVhgwhimMKpm39k0XoFe3Niaw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hello Daniel,
<div><br>
<div>I use mysqldb. </div>
<div>I have added the default value "" to column "attr" and
It's working now.</div>
<div><br>
</div>
<div>Thank you so much! <br>
</div>
<div>Julia.</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Feb 22, 2021 at 12:19
PM Daniel-Constantin Mierla <<a
href="mailto:miconda@gmail.com" moz-do-not-send="true">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>
<p>Hello,</p>
<p>did you change the database structure? Because the crash
seems to be because attrs field is NULL, but database
schema should prevent it. Or, maybe you use a database
backend that cannot enforce that, which one do you use
(db_myql, ...)?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 22.02.21 10:57, Daniel-Constantin Mierla wrote:<br>
</div>
<blockquote type="cite">
<p>Hello,</p>
<p>ohhh, indeed -- I thought it was the corefile itself,
which cannot be investigated on other system than the
one generating it.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 22.02.21 10:05, Julia Bo wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,
<div><br>
<div>The corefile has been already attached in
previous mail.</div>
<div>Send it again.</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Julia.</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Feb 22, 2021
at 10:22 AM Daniel-Constantin Mierla <<a
href="mailto:miconda@gmail.com" target="_blank"
moz-do-not-send="true">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>
<p>Hello,</p>
<p>are you able to get a core file for the crash?
If yes, then send here the output of gdb command
"bt full" to see where the crash happens and try
to fix it.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 21.02.21 16:11, Julia Bo wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hello,</div>
Kamailio version 5.4.4.<br>
Kamailio segmentation fault after <font
size="4">kamctl rpc dialplan.dump
<dpid></font>,<br>
when dialplan includes variables in the
replacement expression (repl_exp) field.<br>
Please see attached corefile.<br>
<div><br>
</div>
<div>Thank you,</div>
<div>Julia.</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote>
</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>