Module: sip-router
Branch: master
Commit: 9061cf2a85ac89cf403910b7b4fa93b29dccb350
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9061cf2…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: Tue Aug 13 11:45:02 2013 +0200
modules/debugger: refresh README
---
modules/debugger/README | 65 ++++++++++++++++++++++++++++++++++------------
1 files changed, 48 insertions(+), 17 deletions(-)
diff --git a/modules/debugger/README b/modules/debugger/README
index 03e069d..3a51c02 100644
--- a/modules/debugger/README
+++ b/modules/debugger/README
@@ -10,7 +10,7 @@ Daniel-Constantin Mierla
<miconda(a)gmail.com>
- Copyright (c) 2010 Daniel-Constantin Mierla (
asipto.com)
+ Copyright © 2010 Daniel-Constantin Mierla (
asipto.com)
__________________________________________________________________
Table of Contents
@@ -41,6 +41,7 @@ Daniel-Constantin Mierla
4.1. dbg_breakpoint(mode)
4.2. dbg_pv_dump([mask] [, level])
+ 4.3. reset_msgid (int)
5. Exported RPC Functions
@@ -48,6 +49,7 @@ Daniel-Constantin Mierla
5.2. dbg.trace
5.3. dbg.bp
5.4. dbg.mod_level
+ 5.5. dbg.reset_msgid
6. Usage
@@ -66,6 +68,7 @@ Daniel-Constantin Mierla
1.11. Set log_assign parameter
1.12. dbg_breakpoint usage
1.13. dbg_pv_dump usage
+ 1.14. Set reset_msgid parameter
Chapter 1. Admin Guide
@@ -95,6 +98,7 @@ Chapter 1. Admin Guide
4.1. dbg_breakpoint(mode)
4.2. dbg_pv_dump([mask] [, level])
+ 4.3. reset_msgid (int)
5. Exported RPC Functions
@@ -102,6 +106,7 @@ Chapter 1. Admin Guide
5.2. dbg.trace
5.3. dbg.bp
5.4. dbg.mod_level
+ 5.5. dbg.reset_msgid
6. Usage
@@ -164,7 +169,7 @@ Chapter 1. Admin Guide
startup. You can change the value at runtime without restart, globally
or per process.
- Default value is "0" (disabled).
+ Default value is “0” (disabled).
Example 1.1. Set cfgtrace parameter
...
@@ -176,7 +181,7 @@ modparam("debugger", "cfgtrace", 1)
Control whether every line (global) breakpoint is enabled or disabled
at startup.
- Default value is "0" (disabled).
+ Default value is “0” (disabled).
Example 1.2. Set breakpoint parameter
...
@@ -187,7 +192,7 @@ modparam("debugger", "breakpoint", 1)
What log level is to be used to print module-specific messages.
- Default value is "-1" (L_ERR).
+ Default value is “-1” (L_ERR).
Example 1.3. Set log_level parameter
...
@@ -200,7 +205,7 @@ modparam("debugger", "log_level", 1)
using this setting, you can configure syslog to send debug messages to
a separate log channel, like a specific kamailio-debug log file.
- Default value is "NULL" (default from core).
+ Default value is “NULL” (default from core).
Example 1.4. Set log_facility parameter
...
@@ -211,7 +216,7 @@ modparam("debugger", "log_facility",
"LOG_DAEMON")
String to print before any module-specific messages.
- Default value is "*** cfgtrace:".
+ Default value is “*** cfgtrace:”.
Example 1.5. Set log_prefix parameter
...
@@ -223,7 +228,7 @@ modparam("debugger", "log_prefix",
"from-debugger-with-love:")
Microseconds to sleep before checking for new commands when waiting at
a breakpoint.
- Default value is "100000" (that is 0.1 sec).
+ Default value is “100000” (that is 0.1 sec).
Example 1.6. Set step_usleep parameter
...
@@ -237,7 +242,7 @@ modparam("debugger", "step_usleep", 500000)
blocking RPC process forever in case the worker process 'forgets' to
write back a reply.
- Default value is "200".
+ Default value is “200”.
Example 1.7. Set step_loops parameter
...
@@ -251,7 +256,7 @@ modparam("debugger", "step_loops", 100)
slots). This parameter is accesible readonly via the Kamailio config
framework.
- Default value is "0" - feature disabled.
+ Default value is “0” - feature disabled.
Example 1.8. Set mod_hash_size parameter
...
@@ -263,7 +268,7 @@ modparam("debugger", "mod_hash_size", 5)
Enable or disable per module log level (0 - disabled, 1 - enabled).
This parameter is tunable via the Kamailio config framework.
- Default value is "0".
+ Default value is “0”.
Example 1.9. Set mod_level_mode parameter
...
@@ -287,7 +292,7 @@ modparam("debugger", "mod_level",
"tm=3")
Enable or disable log assign actions on config (0 - disabled, 1 -
enabled).
- Default value is "0".
+ Default value is “0”.
Example 1.11. Set log_assign parameter
...
@@ -298,8 +303,9 @@ modparam("debugger", "log_assign", 1)
4.1. dbg_breakpoint(mode)
4.2. dbg_pv_dump([mask] [, level])
+ 4.3. reset_msgid (int)
-4.1. dbg_breakpoint(mode)
+4.1. dbg_breakpoint(mode)
Anchor a breakpoint at the current line of the config (the one on which
this function is called). The 'mode' specifies whether the breakpoint
@@ -314,7 +320,7 @@ if($si=="10.0.0.10")
dbg_breakpoint("1");
...
-4.2. dbg_pv_dump([mask] [, level])
+4.2. dbg_pv_dump([mask] [, level])
Prints the content of pv_cache on json format. Defaults are mask=31 and
level = "L_DBG"
@@ -359,14 +365,27 @@
vp(x)":[{"different":["foo"]},{"other":[2,1],"more":["hi","bye"]}],"$T_branch_id
x":0,"$var(empty)":0}
...
+4.3. reset_msgid (int)
+
+ Used to enable or disable the ability to reset the msgid ($mi) through
+ the dbg.reset_msgid RPC command. (0 - disabled, 1 - enabled).
+
+ Default value is “0” - feature disabled.
+
+ Example 1.14. Set reset_msgid parameter
+...
+modparam("debugger", "reset_msgid", 1)
+...
+
5. Exported RPC Functions
5.1. dbg.ls
5.2. dbg.trace
5.3. dbg.bp
5.4. dbg.mod_level
+ 5.5. dbg.reset_msgid
-5.1. dbg.ls
+5.1. dbg.ls
List Kamailio processes with info related to interactive debugging.
@@ -380,7 +399,7 @@ x":0,"$var(empty)":0}
dbg.ls
dbg.ls 1234
-5.2. dbg.trace
+5.2. dbg.trace
Control config script running trace.
@@ -397,7 +416,7 @@ x":0,"$var(empty)":0}
dbg.trace off
dbg.trace on 1234
-5.3. dbg.bp
+5.3. dbg.bp
Control breakpoints and config execution.
@@ -435,7 +454,7 @@ x":0,"$var(empty)":0}
dbg.bp eval 1234 $fu
dbg.bp move 1234
-5.4. dbg.mod_level
+5.4. dbg.mod_level
Specify module log level.
@@ -449,6 +468,18 @@ x":0,"$var(empty)":0}
dbg.mod_level core 3
dbg.mod_level tm 3
+5.5. dbg.reset_msgid
+
+ 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.
+
+ Name: dbg.reset_msgid
+
+ Examples of use with kamcmd:
+ dbg.reset_msgid
+
6. Usage
A common usage is to investigate the execution path for a specific SIP