[SR-Users] Enable SipTrace
Bruno Emer
brunoemer at gmail.com
Fri Oct 3 17:43:10 CEST 2014
Hello, Daniel!
Thanks for your support (AGAIN !!!)!
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:
select a.id, 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
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.
*Bruno Emer*
Mobile: +55 11 96540-0044
email: brunoemer at gmail.com
<https://www.facebook.com/bruno.emer.5>
<https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic>
<https://twitter.com/brunoemer_>
<https://www.flickr.com/photos/122070309@N03/>
<http://google.com/+BrunoEmer> <http://instagram.com/brunoemer_>
2014-10-02 18:24 GMT-03:00 Bruno Emer <brunoemer at gmail.com>:
> Hello!
>
> 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.
>
> 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.
>
> The SIP messages appears like this store in the sip_trace table:
>
>
> \x41434b207369703a616c69636540656e74657270726973652e636f6d205349502f322e300d0a5669613a205349502f322e302f554450203137322e33312e34352e3139393b6272616e63683d7a39684734624b303537322e30363339656237323563616464373463313534633365663639626135643731332e300d0a4d61782d466f7277617264733a2036380d0a546f3a203c7369703a616c69636540656e74657270726973652e636f6d3e3b7461673d6c65673061356e6d62310d0a46726f6d3a203c7369703a626f6240656e74657270726973652e636f6d3e3b7461673d636d6e6b66766e6935680d0a43616c6c2d49443a20396f716e6c7369746e666c7166726765676f63740d0a435365713a20313233302041434b0d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
>
> I am currently using postgres as my database, and to get this I just have:
>
>
> - Define "WITH_SIP_TRACE" in the beginning of my configuration file:
>
> #!KAMAILIO
> #!define WITH_PGSQL
> ##!define WITH_DEBUG
> #!define WITH_SIP_TRACE
>
> - loadmodule:
>
> #!ifdef WITH_SIP_TRACE
> loadmodule "siptrace.so"
> #!endif
>
>
> - Configure SIP_TRACE params:
>
> #!ifdef WITH_SIP_TRACE
> # ---- sip_trace params ----
> modparam("siptrace", "db_url", "postgres://kamailio:kamailiorw@localhost
> /kamailio")
> modparam("siptrace", "trace_on", 1)
> modparam("siptrace", "trace_flag", 22)
> #!endif
>
> - Get the messages:
>
> request_route {
> sip_trace();
> setflag(22);
> route(REQINIT);
> ...
>
> 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?
>
>
> Thanks!
>
> *Bruno Emer*
>
> Mobile: +55 11 96540-0044
> email: brunoemer at gmail.com
> <https://www.facebook.com/bruno.emer.5>
> <https://www.linkedin.com/profile/view?id=86461237&trk=spm_pic>
> <https://twitter.com/brunoemer_>
> <https://www.flickr.com/photos/122070309@N03/>
> <http://google.com/+BrunoEmer> <http://instagram.com/brunoemer_>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20141003/a7805791/attachment.html>
More information about the sr-users
mailing list