<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Pyry,</p>
<p>Fantastic ! It works using both acc and acc_json with
cdr_enable=1. <br>
Thank you so much for the tip, it helps a lot !</p>
<p>Have a good day :)<br>
</p>
<pre class="moz-signature" cols="72">Alexis
</pre>
<div class="moz-cite-prefix">Le 07/10/2022 à 12:54, Pyry Aaltonen a
écrit :<br>
</div>
<blockquote type="cite" cite="mid:AM0PR09MB3236A606588001BEB417E893E45F9@AM0PR09MB3236.eurprd09.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:10.0pt;
font-family:"Calibri",sans-serif;}pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Consolas",serif;}span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="FI">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="FI"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US">Im not sure if this helps you with that problem
but I noticed that when I use acc_json, I needed to enable
cdr also in the acc—module.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US">So try to add modparam("acc", "cdr_enable", 1)
and see if it helps.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US" lang="EN-US">-Pyry<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">sr-users
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users-bounces@lists.kamailio.org"><sr-users-bounces@lists.kamailio.org></a> on behalf of
Alexis Prodhomme <a class="moz-txt-link-rfc2396E" href="mailto:alexis.prodhomme@sewan.fr"><alexis.prodhomme@sewan.fr></a><br>
<b>Date: </b>Friday, 7. October 2022 at 12.53<br>
<b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:sr-users@lists.kamailio.org"><sr-users@lists.kamailio.org></a><br>
<b>Subject: </b>[SR-Users] cannot register ACC CDR JSON
engine when using acc_json module<o:p></o:p></span></p>
</div>
<p>Hi everyone,<o:p></o:p></p>
<p>I have some troubles using acc_json module. I can't load it
and I don't understand why it fails.<br>
The configuration is quite basic: Debian 10 and Kamailio
(fails in 5.5 and 5.6) installed using APT repository.<o:p></o:p></p>
<p>Here is parts of my config: <o:p></o:p></p>
<pre>loadmodule "kex.so"<o:p></o:p></pre>
<pre>loadmodule "corex.so"<o:p></o:p></pre>
<pre>loadmodule "tm.so"<o:p></o:p></pre>
<pre>loadmodule "tmx.so"<o:p></o:p></pre>
<pre>loadmodule "rr.so"<o:p></o:p></pre>
<pre>loadmodule "pv.so"<o:p></o:p></pre>
<pre>loadmodule "dialog.so"<o:p></o:p></pre>
<pre>loadmodule "acc.so"<o:p></o:p></pre>
<pre>loadmodule "acc_json.so"<o:p></o:p></pre>
<pre>modparam("acc_json", "cdr_enable", 1)<o:p></o:p></pre>
<p>I also tried with those 4 additionnal settings with no
success:<o:p></o:p></p>
<pre>modparam("acc_json", "cdr_output_syslog", 1)<o:p></o:p></pre>
<pre>modparam("acc_json", "cdr_log_facility", "LOG_LOCAL3")<o:p></o:p></pre>
<pre>modparam("acc_json", "cdr_enable", 1)<o:p></o:p></pre>
<pre>modparam("acc_json", "cdr_expired_dlg_enable", 1)<o:p></o:p></pre>
<p>As soon as I set cdr_enable to 1, it displays the "<b>cannot
register ACC CDR JSON engine</b>".<o:p></o:p></p>
<p>Here is logs:<o:p></o:p></p>
<pre> 0(2488) DEBUG: <core> [core/sr_module.c:969]: init_mod(): acc_json<o:p></o:p></pre>
<pre> 0(2488) DEBUG: <core> [core/sr_module.c:722]: find_mod_export_record(): found export of <bind_acc> in module acc [/usr/lib/x86_64-linux-gnu/kamailio/modules/acc.so]<o:p></o:p></pre>
<pre> 0(2488) INFO: acc_json [acc_json_mod.c:159]: mod_init(): janson version : 2.12<o:p></o:p></pre>
<pre> 0(2488) DEBUG: <core> [core/mem/q_malloc.c:374]: qm_malloc(): qm_malloc(0x7f0a6b154010, 56) called from acc: acc_mod.c: acc_register_engine(725)<o:p></o:p></pre>
<pre> 0(2488) DEBUG: <core> [core/mem/q_malloc.c:419]: qm_malloc(): qm_malloc(0x7f0a6b154010, 56) returns address 0x7f0a6b220b40 frag. 0x7f0a6b220b08 (size=56) on 1 -th hit<o:p></o:p></pre>
<pre> 0(2488) DEBUG: acc_json [acc_json_mod.c:269]: acc_json_init(): init ...<o:p></o:p></pre>
<pre> 0(2488) DEBUG: acc [acc_mod.c:741]: acc_register_engine(): new acc engine registered: json<o:p></o:p></pre>
<pre> 0(2488) DEBUG: <core> [core/sr_module.c:722]: find_mod_export_record(): found export of <load_dlg> in module dialog [/usr/lib/x86_64-linux-gnu/kamailio/modules/dialog.so]<o:p></o:p></pre>
<pre> 0(2488) ERROR: acc_json [acc_json_mod.c:245]: mod_init(): cannot register ACC CDR JSON engine<o:p></o:p></pre>
<pre> 0(2488) ERROR: <core> [core/sr_module.c:974]: init_mod(): Error while initializing module acc_json (/usr/lib/x86_64-linux-gnu/kamailio/modules/acc_json.so)<o:p></o:p></pre>
<pre>ERROR: error while initializing modules<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<p>May it be related to the Jansson version ? I use the native
one from Debian 10, v2.12.<br>
Do you have any advice, or some tips to debug my issue ?<o:p></o:p></p>
<p>I don't really want to use acc module and parse CDRs manually
from syslog, json is far easiest for this job.<o:p></o:p></p>
<p>Thank you<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Alexis<o:p></o:p></pre>
<pre>R&D<o:p></o:p></pre>
<pre>Sewan<o:p></o:p></pre>
</div>
</blockquote>
</body>
</html>