<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@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;}
@font-face
        {font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-ligatures:none;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Hello Everyone,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">I need your support to add tracer module in order to</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black;background:white">
 store incoming/outgoing SIP messages in database.<br>
I already add some configs to my opensips.cfg file:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Helvetica",sans-serif;color:black;background:white"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black;background:white">### Tracer ###<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black;background:white">loadmodule "tracer.so"<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black;background:white">modparam("tracer", "trace_on", 1)<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black;background:white">modparam("tracer", "trace_local_ip", "opensips:5060")<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black;background:white">modparam("tracer", "trace_id","[tid]uri=mysql://opensips:opensipsrw@ossdb/opensips;table=sip_trace;")<br>
</span></b><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">….<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">if ( is_method("INVITE")) {<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">                                  record_route();<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">                                  do_accounting("db|log", "cdr|missed", "acc");<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">                                  trace($var(trace_id), "d", "sip|xlog", $var(user));<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">                                 
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">                                  t_relay();<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">                                  exit;<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas">                              }<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">The error in Opensips logs is:<br>
<br>
ERROR:core:db_check_api: module db_mysql does not export db_use_table function<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] ERROR:tracer:get_db_struct:
<b>unable to bind database module</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] ERROR:tracer:parse_siptrace_id: Invalid parameters extracted!url <mysql://opensips:opensipsrw@ossdb/opensips>! table name
 <sip_trace>!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] ERROR:tracer:parse_trace_id:
<b>failed to parse tracer uri []</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:Traceback (last included file at the bottom):<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL: 0. /etc/opensips/opensips.cfg<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:core:yyerror: parse error in /etc/opensips/opensips.cfg:53:19-20:
<b>Parameter <trace_id> not found in module <tracer> - can't set<o:p></o:p></b></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:modparam("tracer", "trace_on", 1)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:modparam("tracer", "trace_local_ip", "opensips:5060")<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">2024-04-25 09:29:10 Apr 25 10:29:10 [52] CRITICAL:modparam("tracer", "trace_id","[tid]uri=mysql://opensips:opensipsrw@ossdb/opensips;table=sip_trace;")<br>
<br>
I think that the module should store the messages in sip_trace table but I didn’t understand how to configure properly the trace_id with mysql module.<br>
Could you help me please ?<br>
<br>
<br>
Thank you.<br>
Best Regards,<br>
Amel on behalf of my colleague Chaker</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
</body>
</html>