[Home]

Summary:ASTERISK-29912: res_pjsip: module reload disables logging
Reporter:Mitch Claborn (mclaborn)Labels:patch
Date Opened:2022-02-10 10:09:57.000-0600Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Resources/res_pjsip
Versions:18.8.0 Frequency of
Occurrence
Occasional
Related
Issues:
Environment:Attachments:( 0) 0001-res_pjsip_logger.c-Don-t-touch-logger-settings-when-.patch
Description:1. Start PJSIP pcap logging with
pjsip set logger pcap filename
pjsip set logger verbose off
pjsip set logger on

2. module reload res_pjsip.so

3. pcap file no longer collects data

---
discussion from IRC
(09:48:33 AM) seanbright: res_pjsip_logger does not have a reload handler
(09:48:53 AM) seanbright: and i guess you're not reloading that anyway, so. /me shuts up for a second
(09:49:18 AM) file: it has a callback for if res_pjsip is reloaded, cause there's a global debug thing
(09:51:31 AM) seanbright: so that global handler seems to turn it off if [global] debug is not set?
(09:54:51 AM) seanbright: yeah, i think it's a bug. the ->enabled flag is never set in the pcap path
(09:55:00 AM) seanbright: but i will need to try and reproduce locally before i confirm that
(09:58:57 AM) file: yeah, I think I did that on purpose - cramming all of the instructions into a single CLI command was unwieldy, so thus multiple logger commands
(10:00:41 AM) seanbright: the unintuitive part is that a reload of res_pjsip would affect res_pjsip_logger
(10:00:58 AM) seanbright: esp. if the type=global,debug option isn't touched
Comments:By: Asterisk Team (asteriskteam) 2022-02-10 10:09:58.253-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Sean Bright (seanbright) 2022-02-10 11:24:42.397-0600

[~mclaborn], give [the attached patch|^0001-res_pjsip_logger.c-Don-t-touch-logger-settings-when-.patch] a whirl and let me know.

By: Mitch Claborn (mclaborn) 2022-02-11 13:37:48.614-0600

Patch applied and tested. It does correct the problem. I did not notice any negative effects.