4.2. dbg_pv_dump([mask] [, level])
4.3. dbg_sip_msg([log_level], [facility])
- 5. Exported RPC Functions
+ 5. Exported MI 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. set_dbg_mod_level mod_name level
+ 5.2. set_dbg_mod_facility mod_name facility
+ 5.3. get_dbg_mod_level mod_name
+ 5.4. get_dbg_mod_facility mod_name
- 6. Usage
+ 6. Exported RPC Functions
+
+ 6.1. dbg.ls
+ 6.2. dbg.trace
+ 6.3. dbg.bp
+ 6.4. dbg.mod_level
+ 6.5. dbg.reset_msgid
+ 6.6. dbg.set_mod_level
+ 6.7. dbg.set_mod_facility
+ 6.8. dbg.get_mod_level
+ 6.9. dbg.get_mod_facility
+
+ 7. Usage
List of Examples
1.18. dbg_breakpoint usage
1.19. dbg_pv_dump usage
1.20. dbg_sip_msg usage
+ 1.21. set_dbg_mod_level usage
+ 1.22. set_dbg_mod_facility usage
+ 1.23. get_dbg_mod_level usage
+ 1.24. get_dbg_mod_facility usage
Chapter 1. Admin Guide
4.2. dbg_pv_dump([mask] [, level])
4.3. dbg_sip_msg([log_level], [facility])
- 5. Exported RPC Functions
+ 5. Exported MI Functions
+
+ 5.1. set_dbg_mod_level mod_name level
+ 5.2. set_dbg_mod_facility mod_name facility
+ 5.3. get_dbg_mod_level mod_name
+ 5.4. get_dbg_mod_facility mod_name
- 5.1. dbg.ls
- 5.2. dbg.trace
- 5.3. dbg.bp
- 5.4. dbg.mod_level
- 5.5. dbg.reset_msgid
+ 6. Exported RPC Functions
- 6. Usage
+ 6.1. dbg.ls
+ 6.2. dbg.trace
+ 6.3. dbg.bp
+ 6.4. dbg.mod_level
+ 6.5. dbg.reset_msgid
+ 6.6. dbg.set_mod_level
+ 6.7. dbg.set_mod_facility
+ 6.8. dbg.get_mod_level
+ 6.9. dbg.get_mod_facility
+
+ 7. Usage
1. Overview
The following modules must be loaded before this module:
* none.
+ NOTE: Due to the debugger module child_init() function, one should load
+ the module first in the module sequence in order to initialize
+ _dbg_pid_list. Otherwise, another module (i.e. p_usrloc) forking a
+ process with rank != PROC_INIT will fail.
+
2.2. External Libraries or Applications
The following libraries or applications must be installed before
4.2. dbg_pv_dump([mask] [, level])
4.3. dbg_sip_msg([log_level], [facility])
-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
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"
x":0,"$var(empty)":0}
...
-4.3. dbg_sip_msg([log_level], [facility])
+4.3. dbg_sip_msg([log_level], [facility])
Prints how the sip message would look like if it would be sent out at
that point in the config(i.e. if the current lump lists would have been
------------------------------- SIP body diffs --------------------------------
-------------------------- END OF SIP message debug ---------------------------
-5. Exported RPC Functions
+5. Exported MI Functions
+
+ 5.1. set_dbg_mod_level mod_name level
+ 5.2. set_dbg_mod_facility mod_name facility
+ 5.3. get_dbg_mod_level mod_name
+ 5.4. get_dbg_mod_facility mod_name
+
+5.1. set_dbg_mod_level mod_name level
+
+ Set the module log level. If module does not exist in kamailio, the
+ entry in the level hashtable is still added for the bogus module.
+
+ Example 1.21. set_dbg_mod_level usage
+...
+$ kamctl fifo set_dbg_mod_level core 2
+$ kamctl fifo set_dbg_mod_level debugger 3
+...
+
+5.2. set_dbg_mod_facility mod_name facility
- 5.1. dbg.ls
- 5.2. dbg.trace
- 5.3. dbg.bp
- 5.4. dbg.mod_level
- 5.5. dbg.reset_msgid
+ Set the mod_name log facility. If mod_name does not exist in kamailio,
+ the entry in the facility hashtable is still added for the bogus
+ mod_name.
-5.1. dbg.ls
+ Example 1.22. set_dbg_mod_facility usage
+...
+$ kamctl fifo set_dbg_mod_facility core LOG_LOCAL1
+$ kamctl fifo set_dbg_mod_facility debugger LOG_LOCAL0
+...
+
+5.3. get_dbg_mod_level mod_name
+
+ Get the mod_name log level. If mod_name does not exist in the level
+ hashtable, returns the config file value.
+
+ Example 1.23. get_dbg_mod_level usage
+...
+$ kamctl fifo get_dbg_mod_level core
+$ kamctl fifo get_dbg_mod_level debugger
+...
+
+5.4. get_dbg_mod_facility mod_name
+
+ Get the mod_name log facility. If mod_name does not exist in the
+ facility hashtable, returns the config file value.
+
+ Example 1.24. get_dbg_mod_facility usage
+...
+$ kamctl fifo get_dbg_mod_facility core
+$ kamctl fifo get_dbg_mod_facility debugger
+...
+
+6. Exported RPC Functions
+
+ 6.1. dbg.ls
+ 6.2. dbg.trace
+ 6.3. dbg.bp
+ 6.4. dbg.mod_level
+ 6.5. dbg.reset_msgid
+ 6.6. dbg.set_mod_level
+ 6.7. dbg.set_mod_facility
+ 6.8. dbg.get_mod_level
+ 6.9. dbg.get_mod_facility
+
+6.1. dbg.ls
List Kamailio processes with info related to interactive debugging.
dbg.ls
dbg.ls 1234
-5.2. dbg.trace
+6.2. dbg.trace
Control config script running trace.
dbg.trace off
dbg.trace on 1234
-5.3. dbg.bp
+6.3. dbg.bp
Control breakpoints and config execution.
dbg.bp eval 1234 $fu
dbg.bp move 1234
-5.4. dbg.mod_level
+6.4. dbg.mod_level
Specify module log level.
dbg.mod_level core 3
dbg.mod_level tm 3
-5.5. dbg.reset_msgid
+6.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
Examples of use with kamcmd:
dbg.reset_msgid
-6. Usage
+6.6. dbg.set_mod_level
+
+ Set the module log level. If module does not exist in kamailio, the
+ entry in the level hashtable is still added for the bogus module.
+
+ Name: dbg.set_mod_level
+
+ Examples of use with kamcmd:
+ dbg.set_mod_level core 1
+
+6.7. dbg.set_mod_facility
+
+ Set the module log facility. If module does not exist in kamailio, the
+ entry in the facility hashtable is still added for the bogus module.
+
+ Name: dbg.set_mod_facility
+
+ Examples of use with kamcmd:
+ dbg.set_mod_facility core LOG_LOCAL1
+
+6.8. dbg.get_mod_level
+
+ Get the module log level. If mod_name does not exist in the level
+ hashtable, returns the config file value.
+
+ Name: dbg.get_mod_level
+
+ Examples of use with kamcmd:
+ dbg.get_mod_level core
+
+6.9. dbg.get_mod_facility
+
+ Get the module log facility. If mod_name does not exist in the facility
+ hashtable, returns the config file value.
+
+ Name: dbg.get_mod_facility
+
+ Examples of use with kamcmd:
+ dbg.get_mod_facility core
+
+7. Usage
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