<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    maybe it is postrges client printing hexa because the typo of column
    is blob?!?<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 02/10/14 23:24, Bruno Emer wrote:<br>
    </div>
    <blockquote
cite="mid:CANSN5OUV5U1EzJ78BLDPaRUcPyfUZsOxs55i2PPLBZcue4nEgg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello!
        <div><br>
        </div>
        <div>I just got some kamailio servers working with websockets
          using jssip in my clients and now I want to get the SIP
          Messages to better understand how it flows between my servers.</div>
        <div><br>
        </div>
        <div>I have enabled the "siptrace" module, and I can now save
          information on my database, but the problem is that I can't
          read the SIP Messages there, as it saves some strings in my
          database.</div>
        <div><br>
        </div>
        <div>The SIP messages appears like this store in the sip_trace
          table:</div>
        <div><br>
        </div>
        <div>\x41434b207369703a616c69636540656e74657270726973652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203137322e33312e34352e3139393b6272616e63683d7a39684734624b303537322e30363339656237323563616464373463313534633365663639626135643731332e300d0a4d61782d466f7277617264733a2036380d0a546f3a203c7369703a616c69636540656e74657270726973652e636f6d3e3b7461673d6c65673061356e6d62310d0a46726f6d3a203c7369703a626f6240656e74657270726973652e636f6d3e3b7461673d636d6e6b66766e6935680d0a43616c6c2d49443a20396f716e6c7369746e666c7166726765676f63740d0a435365713a20313233302041434b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a</div>
        <div><br>
        </div>
        <div>I am currently using postgres as my database, and to get
          this I just have:</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>- Define "WITH_SIP_TRACE" in the beginning of my
          configuration file:</div>
        <div><br>
        </div>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div>#!KAMAILIO</div>
          <div>#!define WITH_PGSQL</div>
          <div>##!define WITH_DEBUG</div>
          <div>#!define WITH_SIP_TRACE</div>
          <div><br>
          </div>
        </blockquote>
        <div>- loadmodule:</div>
        <div><br>
        </div>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div>
            <div>#!ifdef WITH_SIP_TRACE</div>
          </div>
          <div>
            <div>loadmodule "siptrace.so"</div>
          </div>
          <div>
            <div>#!endif</div>
          </div>
        </blockquote>
        <div>
          <div>
            <div dir="ltr">
              <div><span style="background-color:rgb(255,255,255)"><font
                    color="#000000"><strong style="font-family:Arial"><u><br>
                      </u></strong></font></span></div>
              <div>- Configure SIP_TRACE params:</div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div>
            <div>
              <div>
                <div>
                  <div>#!ifdef WITH_SIP_TRACE</div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div># ---- sip_trace params ----</div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div>modparam("siptrace", "db_url",
                    "postgres://kamailio:kamailiorw@localhost/kamailio")</div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div>modparam("siptrace", "trace_on", 1)</div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div>modparam("siptrace", "trace_flag", 22)</div>
                </div>
              </div>
            </div>
          </div>
          <div>
            <div>
              <div>
                <div>
                  <div>#!endif</div>
                </div>
              </div>
            </div>
          </div>
          <div><br>
          </div>
        </blockquote>
        - Get the messages:
        <div><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div>
            <div>request_route {</div>
          </div>
          <div>
            <div>        sip_trace();</div>
          </div>
          <div>
            <div>        setflag(22);</div>
          </div>
          <div>
            <div>           route(REQINIT);</div>
          </div>
          <div>
            <div>        ...</div>
          </div>
          <div><br>
          </div>
        </blockquote>
        Does anyone knows if is there something wrong in this
        configuration, or what can I do to fix this and have the SIP
        messages stored in my database?
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Thanks!<br>
          <div>
            <div>
              <div>
                <div dir="ltr">
                  <div><span style="background-color:rgb(255,255,255)"><font
                        color="#000000"><strong
                          style="font-family:Arial"><u><br>
                          </u></strong></font></span></div>
                  <div><span style="background-color:rgb(255,255,255)"><font
                        color="#000000"><strong
                          style="font-family:Arial"><u>Bruno Emer</u></strong></font></span></div>
                  <div><font
                      style="font-size:small;font-family:sans-serif"
                      color="#00a1e6"><br>
                    </font></div>
                  <div>Mobile: +55 11 96540-0044 </div>
                  <div>email: <a moz-do-not-send="true"
                      href="mailto:brunoemer@gmail.com" target="_blank">brunoemer@gmail.com</a></div>
                  <div><span
                      style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif"></span>
                    <div
style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;margin-top:5px"><a
                        moz-do-not-send="true"
                        href="https://www.facebook.com/bruno.emer.5"
                        style="font-size:small;outline:none"
                        target="_blank"><img moz-do-not-send="true"
                          src="http://images.wisestamp.com/facebook.png"
                          style="border: none;" width="16"></a><span
                        style="font-size:small"> </span><a
                        moz-do-not-send="true"
                        href="https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic"
                        style="font-size:small;outline:none"
                        target="_blank"><img moz-do-not-send="true"
                          src="http://images.wisestamp.com/linkedin.png"
                          style="border: none;" width="16"></a><span
                        style="font-size:small"> </span><a
                        moz-do-not-send="true"
                        href="https://twitter.com/brunoemer_"
                        style="font-size:small;outline:none"
                        target="_blank"><img moz-do-not-send="true"
                          src="http://images.wisestamp.com/twitter.png"
                          style="border: none;" width="16"></a><span
                        style="font-size:small"> </span><a
                        moz-do-not-send="true"
                        href="https://www.flickr.com/photos/122070309@N03/"
                        style="font-size:small;outline:none"
                        target="_blank"><img moz-do-not-send="true"
                          src="http://images.wisestamp.com/flickr.png"
                          style="border: none;" width="16"></a><span
                        style="font-size:small"> </span><a
                        moz-do-not-send="true"
                        href="http://google.com/+BrunoEmer"
                        style="font-size:small;outline:none"
                        target="_blank"><img moz-do-not-send="true"
                          src="http://images.wisestamp.com/googleplus.png"
                          style="border: none;" width="16"></a><span
                        style="font-size:small"> </span><a
                        moz-do-not-send="true"
                        href="http://instagram.com/brunoemer_"
                        style="font-size:small;outline:none"
                        target="_blank"><img moz-do-not-send="true"
                          src="http://images.wisestamp.com/instagram.png"
                          style="border: none;" width="16"></a></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </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://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>