duplicate information in sip_trace table

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

duplicate information in sip_trace table

Dragomir Haralambiev
Hello ,
 
I see duplicate information in sip_trace table (Opensips: 1.8.1):
one line with traced_user=empty;
other traced_user=$avp(trace_id).
 
How to setup Opensips to remove traced_user=empty ?
Here is part of opensips.cfg:
 
modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "traced_user_avp", "$avp(trace_id)")
......
if (is_method("INVITE")) {
..... receive $avp(trace_id) from radius_send_auth .......
   if ( $avp(trace_id) ) {
        xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");
        sip_trace();
    }
.....
}
 
Best regards,
PlayMen
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: duplicate information in sip_trace table

Binan83
Hi,
Do it like this:
if (is_avp_set("$avp(trace_id)"){
# Do tracing
}
or like this :

If (!avp_check("$avp(trace_id)", "re/^$/")){
# Do tracing
}
where "/^$/" regex pattern matches an empty string

// Binan


Från: Dragomir Haralambiev <[hidden email]>
Till: OpenSIPS users mailling list <[hidden email]>
Skickat: tisdag, 9 oktober 2012 22:55
Ämne: [OpenSIPS-Users] duplicate information in sip_trace table

Hello ,
 
I see duplicate information in sip_trace table (Opensips: 1.8.1):
one line with traced_user=empty;
other traced_user=$avp(trace_id).
 
How to setup Opensips to remove traced_user=empty ?
Here is part of opensips.cfg:
 
modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "traced_user_avp", "$avp(trace_id)")
......
if (is_method("INVITE")) {
..... receive $avp(trace_id) from radius_send_auth .......
   if ( $avp(trace_id) ) {
        xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");
        sip_trace();
    }
.....
}
 
Best regards,
PlayMen
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
voipmagazine.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

duplicate information in sip_trace table

Binan83
In reply to this post by Dragomir Haralambiev
Hi,
Do it like this:
if (is_avp_set("$avp(trace_id)"){
# Do tracing
}
or like this :
If (!avp_check("$avp(trace_id)","re/^$/")){

# Do tracing
}
where "/^$/" regex pattern for empty string.

// Binan


Från: Dragomir Haralambiev <[hidden email]>
Till: OpenSIPS users mailling list <[hidden email]>
Skickat: tisdag, 9 oktober 2012 22:55
Ämne: [OpenSIPS-Users] duplicate information in sip_trace table

Hello ,
 
I see duplicate information in sip_trace table (Opensips: 1.8.1):
one line with traced_user=empty;
other traced_user=$avp(trace_id).
 
How to setup Opensips to remove traced_user=empty ?
Here is part of opensips.cfg:
 
modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "traced_user_avp", "$avp(trace_id)")
......
if (is_method("INVITE")) {
..... receive $avp(trace_id) from radius_send_auth .......
   if ( $avp(trace_id) ) {
        xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");
        sip_trace();
    }
.....
}
 
Best regards,
PlayMen
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
voipmagazine.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: duplicate information in sip_trace table

Dragomir Haralambiev
Hi,
 
Thanks for your replay.
The problem is not in IF operator.
 
When use sip_trace() Opnesips make two records in sip_trace.

Best regards,
PlayMen
2012/10/10
Hi,
Do it like this:
if (is_avp_set("$avp(trace_id)"){
# Do tracing
}
or like this :
If (!avp_check("$avp(trace_id)","re/^$/")){

# Do tracing
}
where "/^$/" regex pattern for empty string.

// Binan


Från: Dragomir Haralambiev <[hidden email]>
Till: OpenSIPS users mailling list <[hidden email]>
Skickat: tisdag, 9 oktober 2012 22:55
Ämne: [OpenSIPS-Users] duplicate information in sip_trace table

Hello ,
 
I see duplicate information in sip_trace table (Opensips: 1.8.1):
one line with traced_user=empty;
other traced_user=$avp(trace_id).
 
How to setup Opensips to remove traced_user=empty ?
Here is part of opensips.cfg:
 
modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "traced_user_avp", "$avp(trace_id)")
......
if (is_method("INVITE")) {
..... receive $avp(trace_id) from radius_send_auth .......
   if ( $avp(trace_id) ) {
        xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");
        sip_trace();
    }
.....
}
 
Best regards,
PlayMen
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: duplicate information in sip_trace table

Ali Pey
Did you try to add logs to make sure sip_trace() is not called twice?

Regards,
Ali Pey

On Wed, Oct 10, 2012 at 10:29 AM, Dragomir Haralambiev <[hidden email]> wrote:
Hi,
 
Thanks for your replay.
The problem is not in IF operator.
 
When use sip_trace() Opnesips make two records in sip_trace.

Best regards,
PlayMen
2012/10/10
Hi,
Do it like this:
if (is_avp_set("$avp(trace_id)"){
# Do tracing
}
or like this :
If (!avp_check("$avp(trace_id)","re/^$/")){

# Do tracing
}
where "/^$/" regex pattern for empty string.

// Binan


Från: Dragomir Haralambiev <[hidden email]>
Till: OpenSIPS users mailling list <[hidden email]>
Skickat: tisdag, 9 oktober 2012 22:55
Ämne: [OpenSIPS-Users] duplicate information in sip_trace table

Hello ,
 
I see duplicate information in sip_trace table (Opensips: 1.8.1):
one line with traced_user=empty;
other traced_user=$avp(trace_id).
 
How to setup Opensips to remove traced_user=empty ?
Here is part of opensips.cfg:
 
modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "traced_user_avp", "$avp(trace_id)")
......
if (is_method("INVITE")) {
..... receive $avp(trace_id) from radius_send_auth .......
   if ( $avp(trace_id) ) {
        xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");
        sip_trace();
    }
.....
}
 
Best regards,
PlayMen
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: duplicate information in sip_trace table

Dragomir Haralambiev
The sip_trace called only one, but opensips make two records.
 
Here is log:
 
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: Trace ON. Trace_id=8
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:core:parse_headers: flags=40
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:siptrace:sip_trace: sip_trace called
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:siptrace:save_siptrace: saving siptrace
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:siptrace:insert_siptrace_flag: storing info 1...
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:has_stmt_ctx: ctx found for sip_trace
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x7f277f5fc4b8 (tail=139807617425128) MC=0x7f277f5f9f48
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (0): len=905; type=252; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (1): len=44; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (2): len=6; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (3): len=0; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (4): len=23; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (5): len=23; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (6): len=40; type=12; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (7): len=2; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (8): len=8; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (9): len=0; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: doing BIND_PARAM in...
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:siptrace:insert_siptrace_avp: int val [8]
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:siptrace:insert_siptrace_avp: storing info 14...
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:has_stmt_ctx: ctx found for sip_trace
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: conn=0x7f277f5fc4b8 (tail=139807617425128) MC=0x7f277f5f9f48
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: set values for the statement run
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (0): len=905; type=252; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (1): len=44; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (2): len=6; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (3): len=0; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (4): len=23; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (5): len=23; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (6): len=40; type=12; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (7): len=2; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (8): len=8; type=254; is_null=0
Oct 12 00:34:47 routecall /usr/local/sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (9): len=1; type=254; is_null=0

2012/10/11 Ali Pey <[hidden email]>
Did you try to add logs to make sure sip_trace() is not called twice?

Regards,
Ali Pey


On Wed, Oct 10, 2012 at 10:29 AM, Dragomir Haralambiev <[hidden email]> wrote:
Hi,
 
Thanks for your replay.
The problem is not in IF operator.
 
When use sip_trace() Opnesips make two records in sip_trace.

Best regards,
PlayMen
2012/10/10
Hi,
Do it like this:
if (is_avp_set("$avp(trace_id)"){
# Do tracing
}
or like this :
If (!avp_check("$avp(trace_id)","re/^$/")){

# Do tracing
}
where "/^$/" regex pattern for empty string.

// Binan


Från: Dragomir Haralambiev <[hidden email]>
Till: OpenSIPS users mailling list <[hidden email]>
Skickat: tisdag, 9 oktober 2012 22:55
Ämne: [OpenSIPS-Users] duplicate information in sip_trace table

Hello ,
 
I see duplicate information in sip_trace table (Opensips: 1.8.1):
one line with traced_user=empty;
other traced_user=$avp(trace_id).
 
How to setup Opensips to remove traced_user=empty ?
Here is part of opensips.cfg:
 
modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)
modparam("siptrace", "traced_user_avp", "$avp(trace_id)")
......
if (is_method("INVITE")) {
..... receive $avp(trace_id) from radius_send_auth .......
   if ( $avp(trace_id) ) {
        xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");
        sip_trace();
    }
.....
}
 
Best regards,
PlayMen
 

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users