<div dir="ltr">Hello, Daniel!<div>Thanks for your support (AGAIN !!!)!</div><div><br></div><div>I just have discovered how to fix this using PGADMIN. Here is the query that I'm using, so if someone else face this problem, it can help:</div><div><br></div><div><div>select <a href="http://a.id">a.id</a>, a.time_stamp, a.time_us, a.callid, a.traced_user, convert_from(msg::BYTEA, 'UTF8') as msg, a.method, a.status, a.fromip, a.toip, a.fromtag, a.direction from sip_trace a</div></div><div><br></div><div><br></div><div>The point to fix this is to use the function "convert_from", so it can get the data from the column and print as UTF8 text.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><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><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 color="#00a1e6" style="font-size:small;font-family:sans-serif"><br></font></div><div>Mobile: +55 11 96540-0044 </div><div>email: <a 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 href="https://www.facebook.com/bruno.emer.5" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/facebook.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/linkedin.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="https://twitter.com/brunoemer_" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/twitter.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="https://www.flickr.com/photos/122070309@N03/" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/flickr.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="http://google.com/+BrunoEmer" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/googleplus.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="http://instagram.com/brunoemer_" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/instagram.png" width="16" style="border:none"></a></div></div></div></div>
<br><div class="gmail_quote">2014-10-02 18:24 GMT-03:00 Bruno Emer <span dir="ltr"><<a href="mailto:brunoemer@gmail.com" target="_blank">brunoemer@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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 color="#00a1e6" style="font-size:small;font-family:sans-serif"><br></font></div><div>Mobile: <a href="tel:%2B55%2011%2096540-0044" value="+5511965400044" target="_blank">+55 11 96540-0044</a> </div><div>email: <a 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 href="https://www.facebook.com/bruno.emer.5" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/facebook.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/linkedin.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="https://twitter.com/brunoemer_" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/twitter.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="https://www.flickr.com/photos/122070309@N03/" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/flickr.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="http://google.com/+BrunoEmer" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/googleplus.png" width="16" style="border:none"></a><span style="font-size:small"> </span><a href="http://instagram.com/brunoemer_" style="font-size:small;outline:none" target="_blank"><img src="http://images.wisestamp.com/instagram.png" width="16" style="border:none"></a></div></div></div></div>
</div></div></div></div>
</blockquote></div><br></div>