Hello Dan.<br><br>I think I already understand. You are right.<br><br>So, what do you think whether I change the logic for the other idea I have, implementing a function which performs the tracing base in IP address? I think that feature is not already implemented.<br>
<br>Thanks and regards.<br><br>Sergio Gutierrez.<br><br><div class="gmail_quote">On Mon, Oct 27, 2008 at 2:50 PM, Dan Pascu <span dir="ltr">&lt;<a href="mailto:dan@ag-projects.com">dan@ag-projects.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Monday 27 October 2008, Sergio Gutierrez wrote:<br>
</div><div class="Ih2E3d">&gt; Hello Dan.<br>
&gt;<br>
&gt; Thanks a lot for your feedback.<br>
&gt;<br>
&gt; If I understand well the code, the approach using the avp is not<br>
&gt; exclusive with the global tracing, so the whole messages get stored<br>
&gt; into the table, at least that a different table be defined, as stated<br>
&gt; in documentation;<br>
<br>
</div>I think there is a misunderstanding. While the AVP can be set even when<br>
global tracing is on, it makes little sense to do so, since all messages<br>
are logged anyway in that case.<br>
<br>
However if you only want to trace certain users, you can turn global<br>
tracing off and set the AVP. In this case only messages for that user<br>
will be traced.<br>
<br>
Maybe is not obvious from the docs, but the trace_on modparam only<br>
controls global tracing. You can set that to 0 and user tracing will<br>
still work if the AVP is set.<br>
<br>
The condition is like:<br>
<br>
if (trace_on || is_set_avp(traced_user_avp) { do_trace(); }<br>
<div><div></div><div class="Wj3C7c"><br>
&gt;<br>
&gt; Although my approach does use the same table, it is thought to work in<br>
&gt; an exclusive way, avoiding to trace the whole messages processed, and<br>
&gt; storing only the messages of the users defined as traced.<br>
&gt;<br>
&gt; Again thanks in advance for your attention, and I will be awaiting any<br>
&gt; other suggestion you have.<br>
&gt;<br>
&gt; Best regards.<br>
&gt;<br>
&gt; Sergio Gutierrez.<br>
&gt;<br>
&gt; On Mon, Oct 27, 2008 at 1:51 PM, Dan Pascu &lt;<a href="mailto:dan@ag-projects.com">dan@ag-projects.com</a>&gt; wrote:<br>
&gt; &gt; The siptrace module already has the ability to record messages for a<br>
&gt; &gt; given user, by setting an AVP. That avp can be read from a property<br>
&gt; &gt; in the subscriber table (automatically loaded when the subscriber is<br>
&gt; &gt; loaded or by putting a subscriber in a group or by loading it<br>
&gt; &gt; explicitly from a different table). The real problem is not the<br>
&gt; &gt; inability to do this already, is the fact that is difficult to do it<br>
&gt; &gt; for all messages within dialog. By making the siptrace module work on<br>
&gt; &gt; top of the dialog module to automatically trigger tracing all<br>
&gt; &gt; messages within a dialog once the dialog was marked for tracing, this<br>
&gt; &gt; issue should be solved.<br>
&gt; &gt;<br>
&gt; &gt; So what does you approach add in addition to the existing behavior<br>
&gt; &gt; that cannot be done already?<br>
&gt; &gt;<br>
&gt; &gt; On Monday 27 October 2008, Sergio Gutierrez wrote:<br>
&gt; &gt; &gt; Hello to all members in the list.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I would like to put on your consideration a contribution for the<br>
&gt; &gt; &gt; siptrace module;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; My contribution consists in adding two new functions to module;<br>
&gt; &gt; &gt; this contribution in particular is a new function called<br>
&gt; &gt; &gt; sip_trace_user();<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; This function would enable the trace of the sip requests originated<br>
&gt; &gt; &gt; from a particular user, in the same as sip_trace() does it in a<br>
&gt; &gt; &gt; global way. &nbsp;The param trace_user has to be defined as 1 to enable<br>
&gt; &gt; &gt; the feature. The list of traced users would be stored on a table in<br>
&gt; &gt; &gt; database, and this list could be reloaded or cleared at execution<br>
&gt; &gt; &gt; time, by MI commands. sip_trace_user() uses the existing logic<br>
&gt; &gt; &gt; within the module, and it was only necessary implement helper<br>
&gt; &gt; &gt; functions for FROM USER URI manipulation, and the ones required to<br>
&gt; &gt; &gt; handle the list (load , clear and reload).<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; In the way that the function is currently implemented, it is<br>
&gt; &gt; &gt; limited to 512 traced users simultaneously; the modification of<br>
&gt; &gt; &gt; this limit would have to be performed at compilation time.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The feature request has been registered on the tracker with the<br>
&gt; &gt; &gt; number 2200068. Currently, the function is in BETA state, but it is<br>
&gt; &gt; &gt; completely functional, and I have tested it on OpenSIPS trunk<br>
&gt; &gt; &gt; version. It is pending to implement the MI commands to<br>
&gt; &gt; &gt; enable/disable the tracing, and a command to clear the traced users<br>
&gt; &gt; &gt; list.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I would thank any comments, corrections or suggestions you have<br>
&gt; &gt; &gt; regarding to this contribution. As it is my first one, I think<br>
&gt; &gt; &gt; there must be a lot of things to improve.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks in advance all for your attention.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Best regards.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Sergio Gutierrez<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Dan<br>
<br>
<br>
<br>
</div></div>--<br>
<font color="#888888">Dan<br>
</font></blockquote></div><br>