[OpenSIPS-Users] Problem with sip_trace
Bogdan-Andrei Iancu
bogdan at opensips.org
Sun Oct 21 16:21:37 CEST 2012
Salut Dragomir,
This is because you set the user id AVP for tracing. If you look into
DB, you will see that one record is without trace_user and one with
trace_user.
If you do not set the trace_user AVP, you will get a single record.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 10/19/2012 12:10 AM, Dragomir Haralambiev wrote:
>
> Hello all,
>
> I see global problem when use sip_trace module.
> In sip_trace table is apear doble records.
> One traced_user is empty and otder traced_user=trace_number.
>
> Opensips: 1.8.1
> Revision 9342
>
> Here is 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();
> }
> .....
> }
>
> Here is openlisp log:
>
> sbin/opensips[2191]: Trace ON. Trace_id=8
> sbin/opensips[2191]: DBG:core:parse_headers: flags=40
> sbin/opensips[2191]: *DBG:siptrace:sip_trace: sip_trace called*
> sbin/opensips[2191]: DBG:siptrace:save_siptrace: saving siptrace
> sbin/opensips[2191]: DBG:siptrace:insert_siptrace_flag: storing info 1...
> sbin/opensips[2191]: DBG:db_mysql:has_stmt_ctx: ctx found for sip_trace
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query:
> conn=0x7f277f5fc4b8 (tail=139807617425128) MC=0x7f277f5f9f48
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: set
> values for the statement run
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (0):
> len=905; type=252; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (1):
> len=44; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (2):
> len=6; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (3):
> len=0; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (4):
> len=23; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (5):
> len=23; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (6):
> len=40; type=12; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (7):
> len=2; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (8):
> len=8; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (9):
> len=0; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: doing
> BIND_PARAM in...
> sbin/opensips[2191]: DBG:siptrace:insert_siptrace_avp: int val [8]
> sbin/opensips[2191]: DBG:siptrace:insert_siptrace_avp: storing info 14...
> sbin/opensips[2191]: DBG:db_mysql:has_stmt_ctx: ctx found for sip_trace
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query:
> conn=0x7f277f5fc4b8 (tail=139807617425128) MC=0x7f277f5f9f48
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_do_prepared_query: set
> values for the statement run
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (0):
> len=905; type=252; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (1):
> len=44; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (2):
> len=6; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (3):
> len=0; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (4):
> len=23; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (5):
> len=23; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (6):
> len=40; type=12; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (7):
> len=2; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (8):
> len=8; type=254; is_null=0
> sbin/opensips[2191]: DBG:db_mysql:db_mysql_val2bind: added val (9):
> len=1; type=254; is_null=0
>
> Best regards,
> PlayMen
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121021/e39dc2cc/attachment-0001.htm>
More information about the Users
mailing list