Skip to main content

Troubleshooting Debugging

About

( This should become a list of generalized troubleshooting procedures and methodologies. Move specifics to the pages to which they apply.)

You need not recompile with debug symbols or use a debugger to take these steps (for that, see Debugging Freeswitch)

New outline for Reporting Bugs

DO NOT POST LOGS

If you ask for help on the freeswitch-users mailing list DO NOT POST LOG OUTPUT. Use pastebin to hold the logs as outlined below, then post a link to the pastebin in your question on the users list,
You must ATTACH logs to the JIRA, DO NOT PUT PASTEBIN URLs in JIRA tickets as they expire, so the logs will be lost.

So:
mailing list and IRC => Use pastebin
JIRA tickets => ATTACH logs as separate files with meaningful file names

Common Problems

If you have trouble with applications that communicate with 'localhost' edit your /etc/hosts file to eliminate the reference between localhost and unused protocols. For example, if you use only ipv4 while the hosts file still contains a line pointing localhost to an ipv6 address, then fs_cli and Event Socket communications might fail.

Enabling SIP Tracing

At fs_cli type:

sofia loglevel all 9
sofia global siptrace on

Log Level

Edit console.conf.xml

<param name="log_event" value="DEBUG"/> <param name="all" value="DEBUG"/>

Edit switch.conf.xml (especially if you have lots of calls, reduce logging)

<param name="loglevel" value="debug"/>

The possible values for value are (use only the text value in ""):

0 "CONSOLE", 1 "ALERT", 2 "CRIT", 3 "ERR", 4 "WARNING", 5 "NOTICE", 6 "INFO", 7 "DEBUG"

[what are the possible name values?]

You may also use the console API to set debug level on FS console.

freeswitch@de> console loglevel [0-7] (numerical value as above)

And you can also set the levels of fsctl.

freeswitch@de> fsctl loglevel [0-7] (numerical value as above)

Use /log [<loglevel>](https://wiki.freeswitch.org/wiki/Mod%5Fconsole#Log%5FLevels "Mod console") to change the console log level when connected via fs_cli, because the above methods have no effect on fs_cli.

Colorizing output

In console.conf.xml uncomment the color mode.

The colors are:

  • ALER - Red
  • CRIT - Red
  • ERROR - Red
  • WARNING - Magenta
  • NOTICE - Cyan
  • INFO - Green
  • DEBUG - Yellow

Enabling libedit

Enable libedit via --enable-core-libedit-support argument to the configure script when you build FreeSWITCH™ to enable command-line history editing and curses functionality.

Call Troubles

  1. Check to see what the encoding is, so you know what needs to be debugged. 'show channels' on the fs_cli.
  2. Make a call to the same endpoint, to see if it is related to a short, or long call.
  3. Check for any error or warning output in the fs_cli during the calls, to see if there is something obvious that FS already knows about.
  4. If with the same endpoint you always experience the problem, try to isolate where the issue is.
  5. Call 9198 and listen to Tetris to see if the problem is present there.
  6. Call 9197 and listen to the mw tone.
  7. Call 9196 and test the echo.
  8. If steps 5-7 don't show the issue, then the connection between phone to FS is fine.
  9. Try other endpoints to see whether it is experienced in all cases.
  10. Call 5000, and call the 888 conference to see whether the issue is present there.
  11. Call the endpoint (if it is PSTN) with a POTS or mobile phone, to see whether it is VoIP related or endpoint related.

You should know where the issue lies after these steps!