Debugging in Yate

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Debug using msgsniff module)
Line 1: Line 1:
This page purpose is to show you the methods of debugging in Yate.
+
This page purpose is to show you the methods of debugging in Yate. You can use logging in a file at startup or modules like [[rmanager]] to see debug output in telnet client or [[Debugging_and,_or_Investigation_of_messages|msgsniff]] to  dump the Yate messages to output console or log into file.
  
 
=== Debug logged in file===
 
=== Debug logged in file===
Line 17: Line 17:
 
This module allows controlling Yate using a simple [http://en.wikipedia.org/wiki/Telnet telnet] client.  
 
This module allows controlling Yate using a simple [http://en.wikipedia.org/wiki/Telnet telnet] client.  
  
Use telnet in console to enable debugging and to increase the level of debugging:
+
Use telnet in console:
 +
 
 +
telnet localhost 5038
 +
To:
 +
* enable debugging and to increase the level of debugging:
  
 
  telnet localhost 5038
 
  telnet localhost 5038
Line 24: Line 28:
 
  debug sip level 10
 
  debug sip level 10
 
  color on
 
  color on
 +
 +
* see output for scripts by setting in PHP script:
 +
Yate::Debug(true);
 +
 +
* see the status of modules use command:
 +
status
 +
 +
* log view
 +
logview
  
 
Use '''color on ''' to colorize the debug output.
 
Use '''color on ''' to colorize the debug output.

Revision as of 14:15, 15 May 2013

This page purpose is to show you the methods of debugging in Yate. You can use logging in a file at startup or modules like rmanager to see debug output in telnet client or msgsniff to dump the Yate messages to output console or log into file.

Debug logged in file

At startup Yate can be started with logging in a file so that you can see the errors in the specified file.

To increase the visible debug level you have to add -v option more than once to the command line or to service start script:

yate -vvvvv -l logfile -d -s -r 

To see what all the other options are please run

yate --help

Debug using rmanager module

This module allows controlling Yate using a simple telnet client.

Use telnet in console:

telnet localhost 5038

To:

  • enable debugging and to increase the level of debugging:
telnet localhost 5038
debug on 
debug level 10
debug sip level 10
color on
  • see output for scripts by setting in PHP script:
Yate::Debug(true);
* see the status of modules use command:
status
* log view
logview

Use color on to colorize the debug output. The format for debug command from telnet is:

debug [module] [level|on|off]

Debug using msgsniff module

The module will dump the Yate messages to output console or log into file.

  • First enable the module in yate.conf:
[general]
msgsniff=yes
modload=no
;Don't forget to load the sniffer module if modload parameter value is 'no'.
[modules]
;for debugging yate
rmanager.yate=yes
msgsniff.yate=yes
  • Start Yate with logging:
./run -vvvvv -l logfile
  • Enable / Disable sniffer in telnet:

The module must be loaded so that you can use this commands from telnet:

telnet 0 5038
;enable sniffer: 
sniffer on
;and disabled with:
sniffer off


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers