Misc. Dialplan Tools session loglevel

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Description

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

Usage

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

Examples

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"/>
  </condition>
</extension>

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.

Comments

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