<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 <goup2010@gmail.com><br> <b><span style="font-weight: bold;">Till:</span></b> OpenSIPS users mailling list <users@lists.opensips.org> <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> </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> </div><div>How to setup Opensips to remove traced_user=empty ?</div>
<div>Here is part of opensips.cfg:</div><div> </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")) {<br>..... receive $avp(trace_id) from radius_send_auth .......</div>
<div> if ( $avp(trace_id) ) {<br> xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");<br> sip_trace();<br> }</div><div>.....<br>}</div><div> </div><div>Best regards,</div><div>PlayMen</div>
<div> </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>