Misc. Dialplan Tools session loglevel

From FreeSWITCH Wiki
Jump to: navigation, search



Overrides the system loglevel set in switch.conf.xml for this channel only.


<action application="session_loglevel" data="debug"/>


Let's say that your switch.conf.xml has this:

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

Yet you'd like certain calls to have a full debug trace. Add something like this to the dialplan:

<extension name="custom debug" continue="true">
  <condition field="${should_this_call_be_debugged}" expression="^true$">
    <action application="session_loglevel" data="debug"/>

Now if you set the channel variable ${should_this_call_be_debugged} to "true" then this channel will emit debug-level output instead of the system-wide info-level output.


As the app is called only after the leg-A hits the dialplan, a part of the logs regarding leg-A will be missing.

Also, the info app that is called in the FreeSWITCH's default config won't display anything, so it can be useful to call it once more after the line with session_loglevel.

See Also