12
12
with hep. All hep parameters moved inside proto_hep.
13
13
</para >
14
14
<para >
15
- The 2.2 version of &osips; came with a major improvement in siptrace module.
16
- Now all you have to do is call <emphasis >sip_trace ()</emphasis > function
15
+ The 2.2 version of &osips; came with a major improvement in tracer module.
16
+ Now all you have to do is call <emphasis >trace ()</emphasis > function
17
17
with the proper parameters and it will do the job for you. Now you can trace
18
18
messages, transactions and dialogs with the same function. Also, you can trace
19
19
to multiple databases, multiple hep destinations and sip destinations using
20
20
only one parameter. All you need now is defining <emphasis >trace_id</emphasis >
21
21
parameters in modparam section and switch between them in
22
- siptrace function. Also you cand turn tracing on
22
+ tracer function. Also you cand turn tracing on
23
23
and off using <emphasis >trace_on</emphasis > either globally(for all trace_ids)
24
24
or for a certain trace_id.
25
25
</para >
32
32
The tracing tracing can be turned on/off using fifo command.
33
33
</para >
34
34
<para >
35
- opensips-cli -x mi sip_trace on
36
- opensips-cli -x mi sip_trace [some_trace_id] on
35
+ opensips-cli -x mi trace on
36
+ opensips-cli -x mi trace [some_trace_id] on
37
37
</para >
38
38
<para >
39
- opensips-cli -x mi sip_trace off
40
- opensips-cli -x mi sip_trace [some_trace_id] off
39
+ opensips-cli -x mi trace off
40
+ opensips-cli -x mi trace [some_trace_id] off
41
41
</para >
42
42
</section >
43
43
<section id =" dependencies" xreflabel =" Dependencies" >
103
103
<title >Set <varname >trace_on</varname > parameter</title >
104
104
<programlisting format =" linespecific" >
105
105
...
106
- modparam("siptrace ", "trace_on", 1)
106
+ modparam("tracer ", "trace_on", 1)
107
107
...
108
108
</programlisting >
109
109
</example >
@@ -128,22 +128,22 @@ modparam("siptrace", "trace_on", 1)
128
128
<programlisting format =" linespecific" >
129
129
...
130
130
#Resulting address: udp:10.1.1.1:5064
131
- modparam("siptrace ", "trace_local_ip", "10.1.1.1:5064")
131
+ modparam("tracer ", "trace_local_ip", "10.1.1.1:5064")
132
132
...
133
133
134
134
...
135
135
#Resulting address: tcp:10.1.1.1:5060
136
- modparam("siptrace , "trace_local_ip", "tcp:10.1.1.1")
136
+ modparam("tracer , "trace_local_ip", "tcp:10.1.1.1")
137
137
...
138
138
139
139
...
140
140
#Resulting address: tcp:10.1.1.1:5064
141
- modparam("siptrace ", "trace_local_ip", "tcp:10.1.1.1:5064")
141
+ modparam("tracer ", "trace_local_ip", "tcp:10.1.1.1:5064")
142
142
...
143
143
144
144
...
145
145
#Resulting address: udp:10.1.1.1:5060
146
- modparam("siptrace ", "trace_local_ip", "10.1.1.1")
146
+ modparam("tracer ", "trace_local_ip", "10.1.1.1")
147
147
...
148
148
</programlisting >
149
149
</example >
@@ -168,7 +168,7 @@ modparam("siptrace", "trace_local_ip", "10.1.1.1")
168
168
One can declare multiple types of tracing under the same trace
169
169
id, being identified by their name. So if you define two
170
170
database url, one hep uri and one sip uri with the same name,
171
- when calling sip_trace () with this name tracing shall be done
171
+ when calling trace () with this name tracing shall be done
172
172
to all the destinations.
173
173
</para >
174
174
<para >
@@ -185,19 +185,19 @@ modparam("siptrace", "trace_local_ip", "10.1.1.1")
185
185
<programlisting format =" linespecific" >
186
186
...
187
187
/*DB trace id*/
188
- modparam("siptrace ", "trace_id",
188
+ modparam("tracer ", "trace_id",
189
189
"[tid]
190
190
uri=mysql://xxxx:
[email protected] /opensips;
191
191
table=new_sip_trace;")
192
192
/* hep trace id with the hep id defined in proto_hep; check proto_hep docs
193
193
* for more information */
194
194
modparam("proto_hep", "hep_id", "[hid]10.10.10.10")
195
- modparam("siptrace ", "trace_id", "[tid]uri=hep:hid")
195
+ modparam("tracer ", "trace_id", "[tid]uri=hep:hid")
196
196
/*sip trace id*/
197
- modparam("siptrace ", "trace_id",
197
+ modparam("tracer ", "trace_id",
198
198
"[tid]uri=sip:10.10.10.11:5060")
199
199
/* notice that they all have the same name
200
- * meaning that calling sip_trace ("tid",...)
200
+ * meaning that calling trace ("tid",...)
201
201
* will do sql, sip and hep tracing */
202
202
...
203
203
</programlisting >
@@ -208,14 +208,15 @@ modparam("siptrace", "trace_id",
208
208
209
209
<section id =" exported_functions" xreflabel =" exported_functions" >
210
210
<title >Exported Functions</title >
211
- <section id =" func_sip_trace " xreflabel =" sip_trace ()" >
211
+ <section id =" func_trace " xreflabel =" trace ()" >
212
212
<title >
213
- <function moreinfo =" none" >sip_trace (trace_id, [scope, [type, [trace_attrs]]])</function >
213
+ <function moreinfo =" none" >trace (trace_id, [scope, [type, [trace_attrs]]])</function >
214
214
</title >
215
+ <para >This function has replaced the <emph >sip_trace()</emph > in &osips; 3.0.</para >
215
216
<para >
216
217
Store or replocate current processed SIP message,transaction or dialogin database.
217
218
It is stored in the form prior applying chages made to it. The traced_user_avp
218
- parameter is now an argument to sip_trace () function. Since version 2.2, sip_trace()
219
+ parameter is now an argument to trace () function. Since version 2.2, this function
219
220
also catches internally generated replies in stateless mode(sl_send_reply(...)).
220
221
</para >
221
222
<para >
@@ -282,7 +283,7 @@ modparam("siptrace", "trace_id",
282
283
283
284
</itemizedlist >
284
285
<example >
285
- <title ><function >sip_trace ()</function > usage</title >
286
+ <title ><function >trace ()</function > usage</title >
286
287
<programlisting format =" linespecific" >
287
288
...
288
289
/* see declaration of tid in trace_id section */
@@ -295,35 +296,35 @@ modparam("siptrace", "trace_id",
295
296
match_dialog();
296
297
} else {
297
298
if (is_method("INVITE") {
298
- sip_trace ("$var(trace_id)", "d", "sip|xlog", "$var(user)");
299
+ trace ("$var(trace_id)", "d", "sip|xlog", "$var(user)");
299
300
}
300
301
}
301
302
...
302
303
/* Example 2: how to trace initial INVITE and BYE, sip and rest */
303
304
if (has_totag()) {
304
305
if (is_method("BYE")) {
305
- sip_trace ("$var(trace_id)", "m", "sip|rest", "$var(user)");
306
+ trace ("$var(trace_id)", "m", "sip|rest", "$var(user)");
306
307
}
307
308
} else {
308
309
if (is_method("INVITE")) {
309
- sip_trace ("$var(trace_id)", "m", "sip|rest", "$var(user)");
310
+ trace ("$var(trace_id)", "m", "sip|rest", "$var(user)");
310
311
}
311
312
}
312
313
313
314
...
314
315
/* Example 3: trace initial INVITE transaction's only xlog and rest, no sip */
315
316
if (!has_totag()) {
316
317
if (is_method("INVITE")) {
317
- sip_trace ("$var(trace_id)", "t", "xlog|rest", "$var(user)");
318
+ trace ("$var(trace_id)", "t", "xlog|rest", "$var(user)");
318
319
}
319
320
}
320
321
...
321
322
/* Example 4: stateless transaction aware mode!*/
322
323
/* tm module must not be loaded */
323
324
if (is_method("REGISTER")) {
324
- sip_trace ("$var(trace_id)", "t", "xlog|rest", "$var(user)");
325
+ trace ("$var(trace_id)", "t", "xlog|rest", "$var(user)");
325
326
if (!www_authorize("", "subscriber")) {
326
- /* siptrace will also catch the 401 generated by www_challenge() */
327
+ /* tracer will also catch the 401 generated by www_challenge() */
327
328
www_challenge("", "1");
328
329
}
329
330
}
@@ -334,32 +335,32 @@ modparam("siptrace", "trace_id",
334
335
335
336
<section id =" exported_mi_functions" xreflabel =" Exported MI Functions" >
336
337
<title >Exported MI Functions</title >
337
- <section id =" mi_sip_trace " xreflabel =" sip_trace " >
338
+ <section id =" mi_trace " xreflabel =" trace " >
338
339
<title >
339
- <function moreinfo =" none" >sip_trace </function >
340
+ <function moreinfo =" none" >trace </function >
340
341
</title >
341
342
<para >
342
343
Enable/disable tracing(globally or for a specific trace id) or dump
343
344
info about trace ids.
344
345
</para >
345
346
<para >
346
- Name: <emphasis >sip_trace </emphasis >
347
+ Name: <emphasis >trace </emphasis >
347
348
</para >
348
349
<para >
349
350
Parameters:
350
351
</para >
351
352
<itemizedlist >
352
353
<listitem >
353
354
<para >
354
- <emphasis >trace_id </emphasis > (optional) -
355
- a trace_id name. If this parameter is missing the command will
355
+ <emphasis >id </emphasis > (optional) - the name of the tracing instance.
356
+ If this parameter is missing the command will
356
357
either dump info for all tace ids(and return the global tracing state)
357
358
or set the global tracing state.
358
359
</para >
359
360
</listitem >
360
361
<listitem >
361
362
<para >
362
- <emphasis >trace_mode </emphasis > (optional) -
363
+ <emphasis >mode </emphasis > (optional) -
363
364
possible values are:
364
365
</para >
365
366
<itemizedlist >
@@ -377,7 +378,7 @@ modparam("siptrace", "trace_id",
377
378
If this parameter is missing but the first is set, the command will
378
379
only dump info about that specific trace id. If both parameters are
379
380
missing, the command will return the global tracing state and dump
380
- info for each trace_id .
381
+ info for each id .
381
382
</para >
382
383
</listitem >
383
384
</itemizedlist >
@@ -386,7 +387,7 @@ modparam("siptrace", "trace_id",
386
387
MI FIFO Command Format:
387
388
</para >
388
389
<programlisting format =" linespecific" >
389
- opensips-cli -x mi sip_trace tid2 on
390
+ opensips-cli -x mi trace tid2 on
390
391
</programlisting >
391
392
</section >
392
393
@@ -395,10 +396,10 @@ modparam("siptrace", "trace_id",
395
396
<section >
396
397
<title >Database setup</title >
397
398
<para >
398
- Before running &osips; with siptrace , you have to setup the database
399
+ Before running &osips; with tracer , you have to setup the database
399
400
tables where the module will store the data. For that, if the
400
401
table were not created by the installation script or you choose
401
- to install everything by yourself you can use the siptrace -create.sql
402
+ to install everything by yourself you can use the tracer -create.sql
402
403
<acronym >SQL</acronym > script in the database directories in the
403
404
opensips/scripts folder as template.
404
405
You can also find the complete database documentation on the
0 commit comments