Discussion:
[SR-Users] duplicate information in siptrace table
Fred
2014-10-08 15:16:31 UTC
Permalink
Hello,

I use Kamailio 4.1.3 with siptrace module. In the sip_trace table I see
duplicate information, one line with empty and one line with filled
traced_user column.
The empty lines are useless for me, I would like only entries with
traced_user information.

Here the siptrace part of kamailio.cfg:

#### Parameters for Siptrace module
modparam("siptrace", "db_url", DBURL)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_sl_acks", 0)
modparam("siptrace", "traced_user_avp", "$avp(s:user)")
modparam("siptrace", "trace_delayed", 0)

###### SIP Trace Config in main route
if (!is_method("OPTIONS")) {
if (!ds_is_from_list("2")) {
$avp(s:user) = $fU;
} else {
$avp(s:user) = $rU;
};
if (is_avp_set("$avp(s:user)")){
sip_trace();
#setflag(22);
};
};

Has anyone a tip for me how I can get rid of the empty traced_user lines?

Regards
Fred
Daniel-Constantin Mierla
2014-10-09 08:00:10 UTC
Permalink
Hello,

indeed the code is storing once as a global message and then one copy
for each value in traced_user_avp.

The purpose of traced_user_avp was to be able to enable tracing of a
user by some portal/api, byt the user itself, so the portal displays
only the records which have the value of the user column matching the
watcher.

It will require a patch to get this option (don't store the global
record) in siptrace module.

A solution for now is to use rtimer with sqlops to delete periodically
the records that have an empty user value.

Cheers,
Daniel
Post by Fred
Hello,
I use Kamailio 4.1.3 with siptrace module. In the sip_trace table I
see duplicate information, one line with empty and one line with
filled traced_user column.
The empty lines are useless for me, I would like only entries with
traced_user information.
#### Parameters for Siptrace module
modparam("siptrace", "db_url", DBURL)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_sl_acks", 0)
modparam("siptrace", "traced_user_avp", "$avp(s:user)")
modparam("siptrace", "trace_delayed", 0)
###### SIP Trace Config in main route
if (!is_method("OPTIONS")) {
if (!ds_is_from_list("2")) {
$avp(s:user) = $fU;
} else {
$avp(s:user) = $rU;
};
if (is_avp_set("$avp(s:user)")){
sip_trace();
#setflag(22);
};
};
Has anyone a tip for me how I can get rid of the empty traced_user lines?
Regards
Fred
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Loading...