<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 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:"Consolas","serif";
        color:black;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 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 bgcolor=white lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hello Daniel,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>it works now:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>0(22097) DEBUG: &lt;core&gt; [sr_module.c:625]: find_export_record: found &lt;bind_textops&gt; in module textops [/usr/lib/kamailio/modules_k/textops.so]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>We are going to add some functionality to the siptrace module concerning distributed logging without writing the data to your local database. When using trace_send_duplicate we loose the information from fromip_column, toip_column and direction_column as well as the exact time. So we need to send this information, too. We have two approaches.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>First approach:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Instead of writing the data to the local database send all the database fields in one udp paket to another server and write them into database there. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Second approach:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Add 4 header fields containing the information to the sip-message and send the SIP message to another Kamailio server using trace_send_duplicate. There remove the 4 Header fields and write into the database. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Do you think there is a better way to achieve this?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span lang=EN-US style='color:#1F497D;mso-fareast-language:DE'>Kind regards<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D;mso-fareast-language:DE'>Timo Klecker </span><span lang=EN-US style='color:#1F497D;mso-fareast-language:DE'><o:p></o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:12.0pt;color:#1F497D;mso-fareast-language:DE'><o:p>&nbsp;</o:p></span></b></p><p class=MsoNormal><b><span lang=EN-US style='font-size:12.0pt;color:#1F497D;mso-fareast-language:DE'><o:p>&nbsp;</o:p></span></b></p></div><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE'> Daniel-Constantin Mierla [mailto:miconda@gmail.com] <br><b>Gesendet:</b> Donnerstag, 28. Juli 2011 13:25<br><b>An:</b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List<br><b>Cc:</b> Timo Klecker<br><b>Betreff:</b> Re: [SR-Users] Problem using textops API<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hello,<br><br>probably it was forgotten to export the internal API bind function. I just committed the fix on GIT master branch (devel version):<br><br><a href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=db188fbcf4d752a2afab2e298a2f081f836d7e92">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=db188fbcf4d752a2afab2e298a2f081f836d7e92</a><br><br>I couldn't test it for now, so if you can give it a try and report whether it is working ok or not, then I can backport the fix to 3.1.<br><br>Thanks,<br>Daniel<br><br>On 7/28/11 12:46 PM, Timo Klecker wrote: <o:p></o:p></p><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span lang=EN-US>I&#8217;m trying to extend a Kamailio Module and need to add and remove headers in a SIP Message. To do this I want to use the textops module and I am importing the api and trying to bind the textops module. </span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal>#include &quot;../textops/api.h&quot;<o:p></o:p></p><p class=MsoNormal>[..]<o:p></o:p></p><p class=MsoNormal>struct textops_binds tob;<o:p></o:p></p><p class=MsoNormal><span lang=EN-US>[..]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>/* register callbacks to TEXTOPS */</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>if (load_textops_api(&amp;tob)!=0)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>{</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LM_ERR(&quot;can't load textops api. Is module textops loaded?\n&quot;);</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -1;</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>}</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Later I use tob.append_hf to add a header field.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Everything compiles fine but on Kamailio startup there is a Error Message:</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>[..]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/ (nil)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/ (nil)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [sr_module.c:625]: find_export_record: found &lt;is_method&gt; in module textops [/usr/lib/kamailio/modules_k/textops.so]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/ (nil)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/ (nil)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [sr_module.c:625]: find_export_record: found &lt;is_method&gt; in module textops [/usr/lib/kamailio/modules_k/textops.so]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [route_struct.c:166]: ACTION_#25 #0/2: 9(9)/ (nil)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21782) DEBUG: &lt;core&gt; [route_struct.c:166]: ACTION_#25 #1/2: 3(3)/ (nil)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>[..]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21784) DEBUG: &lt;core&gt; [sr_module.c:625]: find_export_record: found &lt;t_release&gt; in module tm [/usr/lib/kamailio/modules/tm.so]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21784) DEBUG: &lt;core&gt; [sr_module.c:631]: find_export_record: &lt;load_textops&gt; not found</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21784) ERROR: siptrace [../../modules_k/textops/api.h:63]: Failed to import load_textops</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21784) ERROR: siptrace [siptrace.c:314]: can't load textops api. Is module textops loaded?</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21784) ERROR: &lt;core&gt; [sr_module.c:875]: init_mod(): Error while initializing module siptrace (/usr/lib/kamailio/modules_k/siptrace.so)</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>ERROR: error while initializing modules</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21784) DEBUG: tm [t_funcs.c:122]: DEBUG: tm_shutdown : start</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>0(21784) DEBUG: tm [t_funcs.c:125]: DEBUG: tm_shutdown : emptying hash table</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>[..]</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>I am running Kamailio 3.1.4.</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>Is this a bug in Kamailio or am I doing anything wrong in my approach to use textops?</span><o:p></o:p></p><p class=MsoNormal><span lang=EN-US>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Kind regards,</span><o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:DE'>Timo Klecker </span><o:p></o:p></p><p class=MsoNormal><b><span style='font-size:12.0pt;mso-fareast-language:DE'>&nbsp;</span></b><o:p></o:p></p><p class=MsoNormal><b><span style='font-size:12.0pt;mso-fareast-language:DE'>&nbsp;</span></b><o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><br><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<o:p></o:p></pre><pre><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><o:p></o:p></pre><pre><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:DE'><br><br><o:p></o:p></span></p><pre>-- <o:p></o:p></pre><pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre><pre>Kamailio Advanced Training, Oct 10-13, Berlin: <a href="http://asipto.com/u/kat">http://asipto.com/u/kat</a><o:p></o:p></pre><pre><a href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a href="http://twitter.com/miconda">http://twitter.com/miconda</a><o:p></o:p></pre></div></body></html>