<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt"><div><span style="font-family: arial,helvetica,sans-serif;"><span>Hi,</span></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;"><span>Do it like this:</span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;">if (is_avp_set("$avp(trace_id)"){</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;"># Do tracing<br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family:
 arial,helvetica,sans-serif;">}</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;">or like this :</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;">If (!avp_check("$avp(trace_id)", "re/<code><span class="pun">^</span><span class="pln">$</span></code>/")){</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;"># Do tracing<br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color:
 transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;">}</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;">where "<code><span class="pun">/^</span><span class="pln">$/</span></code>" regex pattern matches an empty string</span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; background-color: transparent; font-style: normal;"><span style="font-family: arial,helvetica,sans-serif;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">// Binan<br></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial"
 size="2"> <hr size="1">  <b><span style="font-weight:bold;">Från:</span></b> Dragomir Haralambiev &lt;goup2010@gmail.com&gt;<br> <b><span style="font-weight: bold;">Till:</span></b> OpenSIPS users mailling list &lt;users@lists.opensips.org&gt; <br> <b><span style="font-weight: bold;">Skickat:</span></b> tisdag, 9 oktober 2012 22:55<br> <b><span style="font-weight: bold;">Ämne:</span></b> [OpenSIPS-Users] duplicate information in sip_trace table<br> </font> </div> <br>
<div id="yiv222382302"><div>Hello ,</div><div>&nbsp;</div><div>I see duplicate information in sip_trace table (Opensips: 1.8.1): <br>one line with traced_user=empty;<br>other traced_user=$avp(trace_id).</div><div>&nbsp;</div><div>How to setup Opensips to remove traced_user=empty ?</div>
<div>Here is part of opensips.cfg:</div><div>&nbsp;</div><div>modparam("siptrace", "db_url", "mysql://user:password@localhost/opensips")<br>modparam("siptrace", "trace_on", 1) <br>
modparam("siptrace", "enable_ack_trace", 1) <br>modparam("siptrace", "traced_user_avp", "$avp(trace_id)")</div><div>......<br>if (is_method("INVITE"))&nbsp;{<br>..... receive $avp(trace_id) from radius_send_auth .......</div>
<div>&nbsp; &nbsp;if ( $avp(trace_id) ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sip_trace();<br>&nbsp;&nbsp;&nbsp; }</div><div>.....<br>}</div><div>&nbsp;</div><div>Best regards,</div><div>PlayMen</div>
<div>&nbsp;</div>
</div><br>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br><br> </div> </div>  </div></body></html>