<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 7/28/11 3:00 PM, Timo Klecker wrote:
    <blockquote
      cite="mid:assp.0190b1b500.001801cc4d26$64393af0$2cabb0d0$@decoit.de"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <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]-->
      <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 style="color:#1F497D" lang="EN-US">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 style="color:#1F497D" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Thanks!<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">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 style="color:#1F497D" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">First
            approach:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">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 style="color:#1F497D" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Second
            approach:<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">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 style="color:#1F497D" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
            lang="EN-US">Do you think there is a better way to achieve
            this?</span></p>
      </div>
    </blockquote>
    I know a company that based on db_flatstore, they have a module that
    instead of writing the db records to a local file, they are pushed
    via network to other applications.<br>
    <br>
    The second approach is better for our project point of view, it is a
    feature I would like to see in trunk -- this has the advantage of
    being able to use kamailio to receive the duplicates. But overall
    both are ok, so finally it is up to what is more convenient for you.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <blockquote
      cite="mid:assp.0190b1b500.001801cc4d26$64393af0$2cabb0d0$@decoit.de"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p>&nbsp;</o:p></span></p>
        <div>
          <p class="MsoNormal"><span
              style="color:#1F497D;mso-fareast-language:DE" lang="EN-US">Kind
              regards<o:p></o:p></span></p>
          <p class="MsoNormal"><span
              style="color:#1F497D;mso-fareast-language:DE" lang="EN-US">Timo
              Klecker </span><span
              style="color:#1F497D;mso-fareast-language:DE" lang="EN-US"><o:p></o:p></span></p>
          <p class="MsoNormal"><b><span
                style="font-size:12.0pt;color:#1F497D;mso-fareast-language:DE"
                lang="EN-US"><o:p>&nbsp;</o:p></span></b></p>
          <p class="MsoNormal"><b><span
                style="font-size:12.0pt;color:#1F497D;mso-fareast-language:DE"
                lang="EN-US"><o:p>&nbsp;</o:p></span></b></p>
        </div>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><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:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext;mso-fareast-language:DE">Von:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext;mso-fareast-language:DE">
                Daniel-Constantin Mierla [<a class="moz-txt-link-freetext" href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a>] <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 moz-do-not-send="true"
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 "../textops/api.h"<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("can't load textops api. Is module textops
            loaded?\n");</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:&quot;Times New
            Roman&quot;,&quot;serif&quot;;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 moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><o:p></o:p></pre>
        <pre><a moz-do-not-send="true" 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:&quot;Times New
            Roman&quot;,&quot;serif&quot;;mso-fareast-language:DE"><br>
            <br>
            <o:p></o:p></span></p>
        <pre>-- <o:p></o:p></pre>
        <pre>Daniel-Constantin Mierla -- <a moz-do-not-send="true" href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre>
        <pre>Kamailio Advanced Training, Oct 10-13, Berlin: <a moz-do-not-send="true" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a><o:p></o:p></pre>
        <pre><a moz-do-not-send="true" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" href="http://twitter.com/miconda">http://twitter.com/miconda</a><o:p></o:p></pre>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>