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 <[email protected]>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 <[email protected]> >> *Till:* OpenSIPS users mailling list <[email protected]> >> *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 >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> >> >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> >> > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
