Summary:ASTERISK-30097: console: Recent documentation changes for connecting to remote console are inconsistent
Reporter:Matthias Hensler (cubbi)Labels:
Date Opened:2022-06-05 04:05:08Date Closed:2022-06-16 12:27:23
Versions:18.12.1 Frequency of
is caused byASTERISK-22246 Asterisk's "T" flag is ignored when used with "r" or "R" flags. (documentation bug)
is caused byASTERISK-26582 Asterisk seems to ignore the "n" parameter for "disable console colorization"
Environment:Asterisk compiled with a specific installpath and using a configuration from a different path.Attachments:
Description:The recent changes from ASTERISK-22246, that introduced warnings for parameters without effect when connecting to a remote console, are actually inconsistent.
Specifically it lists the "-C" option for specifying a configuration file as having no effect, while it actually has.

Consider the setup which we use here:
* an asterisk version is compiled to its own installpath to make it easy for switching between versions. In this case "/usr/local/packages/asterisk-18.12.1" and a symlink "/usr/local/packages/asterisk" pointing to that specific version.
* all the configuration is still at /etc/asterisk/ and asterisk is started with "-C /etc/asterisk/asterisk.conf"
* a cronjob is run to rotate the logfile: "/usr/local/packages/asterisk/sbin/asterisk -C /etc/asterisk/asterisk.conf -rx 'logger rotate'"

While above setup still works, it now issues the warning "'C' option is not compatible with remote console mode and has no effect.". But actually the "C"-option is still absolutely necessary to find the correct path to the remote-socket. Not using the "C"-option doesn't work:
 Unable to open specified master config file '/usr/local/packages/asterisk-18.12.1/etc/asterisk/asterisk.conf', using built-in defaults
  Unable to connect to remote asterisk (does /usr/local/packages/asterisk-18.12.1/var/run/asterisk/asterisk.ctl exist?)

It is still possible to make the command work by running " /usr/local/packages/asterisk/sbin/asterisk -s /var/run/asterisk/asterisk.ctl -rx 'logger rotate'". However that still issues the first warning that the master-configfile isn't found.

In conclusion I think that the "C"-option shouldn't marked as having no effect.
Comments:By: Asterisk Team (asteriskteam) 2022-06-05 04:05:10.100-0500

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: Kevin Harwell (kharwell) 2022-06-06 14:58:54.849-0500

I agree. When connecting with a remote console it seems the _asterisk.conf_ is re/loaded whether or not the {{-C}} option is specified, thus it does have an affect and the warning is wrong in at least the {{-C}} option case.

To whoever ends up working this issue: It's probably a good idea to check other options the patched updated again too.

By: Kevin Harwell (kharwell) 2022-06-06 15:00:21.526-0500

[~InterLinked] Looks like you submitted the original patch. Any thoughts, or is this something you might could look into?

By: N A (InterLinked) 2022-06-06 18:53:57.296-0500

Kevin Harwell, you can assign this to me and I will push a fix for this later this week.

By: Kevin Harwell (kharwell) 2022-06-07 09:51:59.795-0500

[~InterLinked] Many thanks!

By: Friendly Automation (friendly-automation) 2022-06-16 12:27:23.824-0500

Change 18663 merged by Friendly Automation:
asterisk.c: Fix incompatibility warnings for remote console.


By: Friendly Automation (friendly-automation) 2022-06-16 12:37:18.606-0500

Change 18616 merged by Kevin Harwell:
asterisk.c: Fix incompatibility warnings for remote console.


By: Friendly Automation (friendly-automation) 2022-06-16 12:37:37.434-0500

Change 18664 merged by Kevin Harwell:
asterisk.c: Fix incompatibility warnings for remote console.


By: Friendly Automation (friendly-automation) 2022-06-16 12:38:11.261-0500

Change 18665 merged by Kevin Harwell:
asterisk.c: Fix incompatibility warnings for remote console.