[Home]

Summary:ASTERISK-25705: PJSIP debug settings are inconsistent between console and file output
Reporter:Olivier Krief (okrief)Labels:
Date Opened:2016-01-19 07:10:07.000-0600Date Closed:
Priority:TrivialRegression?
Status:Open/NewComponents:Core/Logging
Versions:13.7.0 Frequency of
Occurrence
Related
Issues:
Environment:Debian JessieAttachments:
Description:In logger.conf:
{noformat}
[logfiles]
pjsip => verbose(1)
console => verbose(1)
{noformat}
In pjsip.conf:
{noformat}
[global]
type=global
debug=yes
{noformat}

Asterisk prints SIP messages in both console and pjsip file.
Then, asterisk is stopped and logger.conf is changed to:
{noformat}
[logfiles]
pjsip => notice
console => notice
{noformat}
Then asterisk is started and a PJSIP call is issued. Now, pjsip file only holds NOTICE statements (expected result) but console still shows SIP messages while I expected it to not display SIP messages at all.

Comments:By: Asterisk Team (asteriskteam) 2016-01-19 07:10:09.728-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Joshua C. Colp (jcolp) 2016-01-19 07:15:04.761-0600

How are you connecting to the console? Are you specifying a verbose level there?

By: Olivier Krief (okrief) 2016-01-19 07:38:00.785-0600

I'm connecting to console through a simple "rasterisk" command.
I specified there a verbosity level with "core set verbose 0" and still PJSIP messages are displayed on screen.

By: Rusty Newton (rnewton) 2016-01-20 09:41:59.282-0600

Hmm yeah and it isn't documented anywhere. That is we don't set any expectation for a user as to in what logger channels or verbosity settings they should expect PJSIP logger output. So we should document this as well once we clear it up.

By: Olivier Krief (okrief) 2016-01-20 10:39:48.632-0600

I also wondered why, logger.conf.sample file mentioned one could specify a verbosity level (see comment verbose(<level>)) but, apparently could not specify a debug level.

By: Richard Mudgett (rmudgett) 2016-01-20 12:43:09.379-0600

The verbose level is per channel and console connection while the debug level is global.  The debug output is not meant for normal operation because of the volume of output possible.

By: Rusty Newton (rnewton) 2016-01-26 14:22:18.666-0600

To clarify the three issues here:

# When PJSIP logger output is turned out it goes to the console regardless of logger configuration.
# When log channels are configured with VERBOSE level 0 they still receive PJSIP logger output.
# There is no expectation set in documentation for where PJSIP logger output will be output.

In regards to number 3:

It would be nice to mention where to expect the output in the help text for the command.
{noformat}
*CLI> core show help pjsip set logger on
Usage: pjsip set logger {on|off|host <name>}
      Enables or disabling logging of SIP packets
      read on ports bound to PJSIP transports either
      globally or enables logging for an individual
      host.
{noformat}
Then possibly in a couple places on the wiki in regards to channel driver logging, PJSIP troubleshooting and such.

Additionally a mention in logger.conf wouldn't hurt.

By: Olivier Krief (okrief) 2016-03-04 09:00:17.337-0600

Thinking a bit more about this issue, what would you say about changing current pjsip logging to a new sip type of logging just like dtmf, verbose or fax ?

Both SIP and PJSIP already use a specific logging format.
Recognizing with a new type/class/category of logging in logger.conf would help to treat this format appropriately.