File: debugger_admin.xml

package info (click to toggle)
kamailio 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 56,100 kB
  • sloc: ansic: 552,832; xml: 166,484; sh: 8,659; makefile: 7,676; sql: 6,235; perl: 3,487; yacc: 3,428; python: 1,457; cpp: 1,219; php: 1,047; java: 449; pascal: 194; cs: 40; awk: 27
file content (792 lines) | stat: -rw-r--r-- 23,053 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>

<!-- Module User's Guide -->

<chapter>
    
    <title>&adminguide;</title>
    
    <section>
	<title>Overview</title>
	<para>
		This module provides an interactive config file debugger. It can print
		a trace of config script execution for a SIP message to log and set
		breakpoints on every script action, allowing step-by-step execution of 
		the routing and response scripts.
	</para>
	<para>
		Debugging can be done from local or remote host via RPC interface (e.g.,
		XMLRPC, &sercmd;, siremis).
	</para>
	<para>
		The framework to set breakpoints on specific actions and config lines
		is not exported to RPC. Each action can be accompanied by an
		breakpoint or you can use dbg_breakpoint() function to set a breakpoint
		at certain line. Global breakpoints can be enabled/disabled at runtime.
		The script running trace can also be enabled/disabled at runtime.
	</para>
	<para>
		When the SIP router process is stopped at a breakpoint, you can
		investigate the values of any pseudo-variables. Note that some of
		pseudo-variables may produce memory leaks; a fix is planned in the
		future (here fall pseudo-variables with dynamic name such as htable,
		sqlops). References to SIP message, avps, headers, script and shared
		variables are safe.
	</para>
    </section>
    <section>
	<title>Dependencies</title>
	<section>
	    <title>&kamailio; Modules</title>
	    <para>
		The following modules must be loaded before this module:
	    	<itemizedlist>
		    <listitem>
			<para>
			    <emphasis>none</emphasis>.
			</para>
		    </listitem>
	    	</itemizedlist>
	    </para>
	</section>
	<section>
	    <title>External Libraries or Applications</title>
	    <para>
		The following libraries or applications must be installed before running
		&kamailio; with this module loaded:
	    	<itemizedlist>
		    <listitem>
			<para>
			    <emphasis>None</emphasis>.
			</para>
		    </listitem>
	    	</itemizedlist>
	    </para>
	</section>
    </section>
    <section>
	<title>Parameters</title>
	<section id="dbg.p.cfgtrace">
	    <title><varname>cfgtrace</varname> (int)</title>
	    <para>
			Control whether the config script trace is enabled or disabled
			at startup. You can change the value at runtime without
			restart, globally or per process.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>0</quote> (disabled).
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>cfgtrace</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "cfgtrace", 1)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.breakpoint">
	    <title><varname>breakpoint</varname> (int)</title>
	    <para>
			Control whether every line (global) breakpoint is enabled
			or disabled at startup.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>0</quote> (disabled).
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>breakpoint</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "breakpoint", 1)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.log_level">
	    <title><varname>log_level</varname> (int)</title>
	    <para>
			What log level is to be used to print module-specific messages.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>-1</quote> (L_ERR).
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>log_level</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "log_level", 1)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.log_level_name">
	    <title><varname>log_level_name</varname> (str)</title>
	    <para>
			What log level name is to be used to print cfg trace messages.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>NULL</quote> (use default log names).
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>log_level_name</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "log_level_name", "exec")
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.log_facility">
	    <title><varname>log_facility</varname> (str)</title>
	    <para>
			Which log facility is to be used to print module-specific messages.
			By using this setting, you can configure syslog to send debug
			messages to a separate log channel, like a specific kamailio-debug log file.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>NULL</quote> (default from core).
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>log_facility</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "log_facility", "LOG_DAEMON")
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.log_prefix">
	    <title><varname>log_prefix</varname> (str)</title>
	    <para>
			String to print before any module-specific messages.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>*** cfgtrace:</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>log_prefix</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "log_prefix", "from-debugger-with-love:")
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.step_usleep">
	    <title><varname>step_usleep</varname> (int)</title>
	    <para>
			Microseconds to sleep before checking for new commands when
			waiting at a breakpoint.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>100000</quote> (that is 0.1 sec).
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>step_usleep</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "step_usleep", 500000)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.step_loops">
	    <title><varname>step_loops</varname> (int)</title>
	    <para>
			How many sleeps of 'step_usleep' the RPC process performs when
			waiting for a reply from a worker process before responding to RPC.
			This avoids blocking RPC process forever in case the worker
			process 'forgets' to write back a reply.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>200</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>step_loops</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "step_loops", 100)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.mod_hash_size">
	    <title><varname>mod_hash_size</varname> (int)</title>
	    <para>
		Used to compute power of two as size of internal hash table to store levels
		per module (e.g., if its set to 4, internal hash table has 16 slots). This
		parameter is accesible readonly via the Kamailio config framework.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>0</quote> - feature disabled.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>mod_hash_size</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "mod_hash_size", 5)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.mod_level_mode">
	    <title><varname>mod_level_mode</varname> (int)</title>
	    <para>
			Enable or disable per module log level (0 - disabled, 1 - enabled).
			This parameter is tunable via the Kamailio config framework.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>0</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>mod_level_mode</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "mod_level_mode", 1)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.mod_level">
	    <title><varname>mod_level</varname> (str)</title>
	    <para>
		Specify module log level - the value must be in the format:
		modulename=level. The parameter can be set many times. For core
		log level, use module name 'core'.
	    </para>
	    <example>
		<title>Set <varname>mod_level</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "mod_level", "core=3")
modparam("debugger", "mod_level", "tm=3")
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.log_assign">
	    <title><varname>log_assign</varname> (int)</title>
	    <para>
		Enable or disable log assign actions on config (0 - disabled, 1 - enabled).
	    </para>
		<para>
		<emphasis>
		    Default value is <quote>0</quote>.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>log_assign</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "log_assign", 1)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.cfgpkgcheck">
	    <title><varname>cfgpkgcheck</varname> (int)</title>
	    <para>
			If set, before each config action is done pkg memory check,
			useful to detect buffer overflows.
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>0</quote> (disabled).
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>cfgpkgcheck</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "cfgpkgcheck", 1)
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.p.reset_msgid">
	    <title><varname>reset_msgid</varname> (int)</title>
	    <para>
		Used to enable or disable the ability to reset the msgid ($mi)
		through the dbg.reset_msgid RPC command. (0 - disabled, 1 - enabled).
	    </para>
	    <para>
		<emphasis>
		    Default value is <quote>0</quote> - feature disabled.
		</emphasis>
	    </para>
	    <example>
		<title>Set <varname>reset_msgid</varname> parameter</title>
		<programlisting format="linespecific">
...
modparam("debugger", "reset_msgid", 1)
...
</programlisting>
	    </example>
	</section>

	</section>

    <section>
	<title>Functions</title>
 	<section id="dbg.f.db_breakpoint">
	    <title>
		<function moreinfo="none">dbg_breakpoint(mode)</function>
	    </title>
	    <para>
			Anchor a breakpoint at the current line of the config (the one
			on which this function is called). The 'mode' specifies whether 
			the breakpoint is enabled (1) or disabled (0) at startup.
	    </para>
		<para>
			Note that this version of the module does not export this anchors to RPC for
			interactive debugging (temporarily disabled).
	    </para>
		<example>
		<title><function>dbg_breakpoint</function> usage</title>
		<programlisting format="linespecific">
...
if($si=="10.0.0.10")
	dbg_breakpoint("1");
...
</programlisting>
	    </example>
	</section>

	<section id="dbg.f.dbg_pv_dump">
	    <title>
		<function moreinfo="none">dbg_pv_dump([mask] [, level])</function>
	    </title>
	    <para>
			Prints the content of pv_cache on json format.
			Defaults are mask=31 and level = "L_DBG"
	    </para>
		<para>
		</para>
		<itemizedlist>
			<para><emphasis>mask</emphasis> - Controls the content to dump:
			</para>
			<itemizedlist>
			<listitem><para>
			  1 - dump null values
			</para></listitem>
			<listitem><para>
			  2 - dump avp vars
			</para></listitem>
			<listitem><para>
			  4 - dump script vars
			</para></listitem>
			<listitem><para>
			  8 - dump xavp vars
			</para></listitem>
			<listitem><para>
			  16 - dump DP_OTHER vars
			</para></listitem>
			</itemizedlist>
			<para><emphasis>level</emphasis> - The level that will be used in LOG function. It can be:
			</para>
			<itemizedlist>
			<listitem><para>
				L_ALERT - log level -5
			</para></listitem>
			<listitem><para>
				L_BUG - log level -4
			</para></listitem>
			<listitem><para>
				L_CRIT - log level -3
			</para></listitem>
			<listitem><para>
				L_ERR - log level -1
			</para></listitem>
			<listitem><para>
				L_WARN - log level 0
			</para></listitem>
			<listitem><para>
				L_NOTICE - log level 1
			</para></listitem>
			<listitem><para>
				L_INFO - log level 2
			</para></listitem>
			<listitem><para>
				L_DBG - log level 3
				</para></listitem>
			</itemizedlist>
		</itemizedlist>
		<example>
		<title><function>dbg_pv_dump</function> usage</title>
		<programlisting format="linespecific">
...
$var(temp) = 1;
$avp(s:more_avp) = 2;
$avp(s:more_avp) = 3;
$xavp(x=>more) = "bye";
$xavp(x[0]=>more) = "hi";
$xavp(x[0]=>other) = 1;
$xavp(x[0]=>other) = 2;
$xavp(x=>different) = "foo";
$var(empty) = $null;

dbg_pv_dump(30, "L_DBG");
...
</programlisting>
		<para>Output</para>
		<programlisting format="linespecific">
...
 4(30943) DEBUG: debugger [debugger_api.c:1613]: dbg_dump_json(): {"$sp":37597,"$var(rc)":0,"$var(temp)":1,"$avp(more_avp)":[3,2],"$si":"127.0.0.1","$rc":0,"$xavp(x)":[{"different":["foo"]},{"other":[2,1],"more":["hi","bye"]}],"$T_branch_idx":0,"$var(empty)":0}
 ...
</programlisting>
	    </example>
	</section>

    </section>
	
	<section>
		<title>Exported RPC Functions</title>

	<section id="dbg.r.ls">
		<title>
		<function moreinfo="none">dbg.ls</function>
		</title>
		<para>
			List &kamailio; processes with info related to interactive
			debugging.
		</para>
		<para>
		Name: <emphasis>dbg.list</emphasis>
		</para>
		<para>Parameters:</para>
		<itemizedlist>
			<listitem><para>_pid_ : pid for which to list the details.  If 'pid' is
			omitted then will print for all processes.</para></listitem>	  
		</itemizedlist>
		<para>
		Examples of use with &sercmd;:
		</para>
        <programlisting  format="linespecific">
		dbg.ls
		dbg.ls 1234
		</programlisting>
    </section>

	<section id="dbg.r.trace">
		<title>
		<function moreinfo="none">dbg.trace</function>
		</title>
		<para>
			Control config script running trace.
		</para>
		<para>
		Name: <emphasis>dbg.trace</emphasis>
		</para>
		<para>Parameters:</para>
		<itemizedlist>
			<listitem><para>_cmd_ : command can be 'on' or 'off' to
				enable or disable tracing for one or all processes.</para>
		</listitem>
			<listitem><para>_pid_ : pid for which to list the details. If 'pid' is
				omitted, then details for all processes will be printed.</para>
		</listitem>
		</itemizedlist>
		<para>
		Examples for using with &sercmd;:
		</para>
        <programlisting  format="linespecific">
		dbg.trace on
		dbg.trace off
		dbg.trace on 1234
		</programlisting>
    </section>

	<section id="dbg.r.bp">
		<title>
		<function moreinfo="none">dbg.bp</function>
		</title>
		<para>
			Control breakpoints and config execution.
		</para>
		<para>
		Name: <emphasis>dbg.bp</emphasis>
		</para>
		<para>Parameters:</para>
		<itemizedlist>
			<listitem><para>_cmd_ : command, see next section for
			the list of available values.</para>
		</listitem>
		<listitem><para>_pid_ : process id for which to apply the command.
				If 'pid' is omitted, then the inner command will be applied 
				to all processes.</para>
		</listitem>
		<listitem><para>_params_ : extra params specific for each command.</para>
		</listitem>
		</itemizedlist>
		<para>Commands:</para>
		<itemizedlist>
		<listitem>
			<para>on - turn on breakpoints. Pid parameter is optional.
			</para>
		</listitem>
		<listitem>
			<para>off - turn off breakpoints. Pid parameter is optional.
			</para>
		</listitem>
		<listitem>
			<para>keep - keep breakpoints only for pid given as parameter
			</para>
		</listitem>
		<listitem>
			<para>release - disable breakpoints for processes that are
			not waiting at a breakpoint. Pid parameter is optional.</para>
		</listitem>
		<listitem>
			<para>next - run the action under breakpoint and stop at next one
			(step by step execution). Pid parameter is mandatory.
			</para>
		</listitem>
		<listitem>
			<para>move - run the action under breakpoint and remove the rest
			of breakpoints (continue execution without stopping again at next
			actions). Pid parameter is mandatory.</para>
		</listitem>
		<listitem>
			<para>show - print details about the current breakpoint for pid.
			Pid parameter is mandatory.</para>
		</listitem>
		<listitem>
			<para>eval - evaluate a pseudo-variable and print the result in RPC
			Pid parameter is mandatory.</para>
		</listitem>
		<listitem>
			<para>log - evaluate a pseudo-variable and print the result in SIP
			router logs. Pid parameter is mandatory.</para>
		</listitem>
		</itemizedlist>
		<para>
		Examples for using with &sercmd;:
		</para>
        <programlisting  format="linespecific">
		dbg.bp off
		dbg.bp on
		dbg.bp release
		dbg.bp on 1234
		dbg.bp eval 1234 $fu
		dbg.bp move 1234
		</programlisting>
    </section>

    <section id="dbg.r.mod_level">
		<title>
		<function moreinfo="none">dbg.mod_level</function>
		</title>
		<para>
			Specify module log level.
		</para>
		<para>
		Name: <emphasis>dbg.mod_level</emphasis>
		</para>
		<para>Parameters:</para>
		<itemizedlist>
			<listitem><para>_module_ : For core log
				level, use module name 'core'</para></listitem>
			<listitem><para>_level_ : integer</para></listitem>
		</itemizedlist>
		<para>
		Examples of use with &sercmd;:
		</para>
        <programlisting  format="linespecific">
		dbg.mod_level core 3
		dbg.mod_level tm 3
		</programlisting>
    </section>

	<section id="dbg.r.reset_msgid">
		<title>
		<function moreinfo="none">dbg.reset_msgid</function>
		</title>
		<para>
			Resets the message sequence ($mi). Internally there is no real change.
			This can be useful for unit test cases in order to be able to replicate
			exactly the same kamailio output.

			You need to set the debugger parameter reset_msgid to 1 to activate this
			functionallity.
		</para>
		<para>
		Name: <emphasis>dbg.reset_msgid</emphasis>
		</para>
		<para>
		Examples of use with &sercmd;:
		</para>
        <programlisting  format="linespecific">
		dbg.reset_msgid
		</programlisting>
    </section>

    </section>
	<section>
		<title>Usage</title>
		<para>
		A common usage is to investigate the execution path for a specific
		SIP message. Just enable cfg running trace, send the message and
		watch the logs.
		</para>
		<para>
		Another typical usage is to do interactive debugging and run
		each line of the route blocks of the configuration file step-by-step for a
		particular SIP message.
		</para>
		<para>
		You need to connect using &sercmd; (or other RPC client) to &kamailio;.
		Then you can enable cfg breakpoints and send the SIP message. One
		process will be in waiting state ('state' field different than 0 when
		you do dbg.ls). Calling dbg.release will set the other &kamailio;
		processes in no-breakpoint mode so they can process other SIP messages
		without need to interact with them.
		</para>
		<para>
		A process blocked at a breakpoint is waiting for a command. Use
		'dbg.bp next pid' to execute the current action and stop at the next
		one. 'dbg.bp eval pid PV' can be used to retrieve the value of PV. Once
		you are done and want to continue the execution of the config wihtout
		interaction use 'dbg.bp move pid'.
		</para>
		<para>
		Example of a session:
		</para>
<programlisting  format="linespecific">
...
&sercmd;> dbg.ls
{
	entry: 0
	pid: 6393
	set: 3
	state: 0
	in.pid: 0
	in.cmd: 0
}
{
	entry: 1
	pid: 6394
	set: 3
	state: 0
	in.pid: 0
	in.cmd: 0
}
...
{
	entry: 9
	pid: 6402
	set: 3
	state: 1
	in.pid: 0
	in.cmd: 0
}

&sercmd;> dbg.bp show 6402
at bkp [/etc/kamailio/debugger.cfg:369] a=6 n=route

&sercmd;> dbg.bp next 6402
exec [/etc/kamailio/debugger.cfg:369] a=6 n=route

&sercmd;> dbg.bp next 6402
exec [/etc/kamailio/debugger.cfg:462] a=17 n=if

&sercmd;> dbg.bp eval 6402 $fu
$fu : t=str v=sip:test@kamailio.org

&sercmd;> dbg.bp move 6402
200 ok
...
</programlisting>
		<para>
		Running the config trace looks like:
		</para>
<programlisting  format="linespecific">
...
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=368 a=6 n=route
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=461 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=456 a=26 n=mf_process_maxfwd_header
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=466 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=461 a=27 n=sanity_check
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=371 a=6 n=route
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=659 a=3 n=return
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=374 a=6 n=route
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=501 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=470 a=25 n=has_totag
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=386 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=379 a=26 n=is_method
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=386 a=25 n=t_check_trans
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=389 a=6 n=route
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=643 a=3 n=return
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=393 a=26 n=remove_hf
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=398 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=394 a=26 n=is_method
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=404 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=398 a=26 n=is_method
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=404 a=6 n=route
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=682 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=409 a=6 n=route
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=575 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=550 a=26 n=is_method
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=551 a=3 n=return
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=412 a=6 n=route
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=518 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=505 a=26 n=is_method
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=513 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=507 a=42 n=isflagset
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=516 a=17 n=if
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=513 a=26 n=save
 9(6285) ERROR: *** cfgtrace: c=[/etc/kamailio/debugger.cfg] l=516 a=3 n=exit
...
</programlisting>
		<para>
			The above example is for a registration with default config for
			version 3.1.0, without authentication. Listed fields are:
			'c' - config file; 'l' - line; 'a' - internal action id;
			'n' - name of executed action. 'ERROR' prefix is printed
			because these messages were sent to the L_ERR log level.
		</para>
    </section>

</chapter>