[Home]

Summary:ASTERISK-29902: no color for the cli
Reporter:ben kolodny (benphone)Labels:
Date Opened:2022-02-07 12:21:29.000-0600Date Closed:2022-02-09 11:12:01.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Core/General
Versions:16.23.0 18.9.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:centos 07Attachments:( 0) 2022-02-07_22_40_46-root@db01_~.png
( 1) 2022-02-07_22_43_38-root@pbx0.png
( 2) 2022-02-08_15_29_50-Window.png
( 3) asterisk.conf
Description:in etc/asterisk/asterisk.conf i have this config

nocolor = no
on version 16.17 when i run asterisk -rvvv the console is colored
but on 18.9 everything is just black
Comments:By: Asterisk Team (asteriskteam) 2022-02-07 12:21:29.780-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: Joshua C. Colp (jcolp) 2022-02-07 12:23:32.099-0600

The latest version of 16 is 16.23.0, does this also happen there? How is Asterisk started?

By: ben kolodny (benphone) 2022-02-07 12:26:12.967-0600

Asterisk 16.17.0 works ok

ps aux
root      2272  0.0  0.0 108184   520 ?        S     2021   0:00 /bin/sh /usr/sbin//safe_asterisk
root      2276 11.6  0.9 5248168 300072 ?      Sl    2021 13663:20 /usr/sbin/asterisk -f -vvvg -c



By: Joshua C. Colp (jcolp) 2022-02-07 12:28:04.473-0600

That's not what I asked, I asked if 16.23.0 works ok as well.

By: ben kolodny (benphone) 2022-02-07 12:30:28.588-0600

will have to upgrade to test

By: ben kolodny (benphone) 2022-02-07 12:48:54.691-0600

yes it is working ok in the latest asterisk 16.23

By: Joshua C. Colp (jcolp) 2022-02-07 12:51:52.584-0600

And how is Asterisk started by the system? A systemd service unit file?

By: ben kolodny (benphone) 2022-02-07 12:52:49.584-0600

usually service asterisk start do you need more ?

By: Joshua C. Colp (jcolp) 2022-02-07 13:15:35.814-0600

So far we've been unable to reproduce this. Can you attach your asterisk.conf and a screenshot?

By: Sean Bright (seanbright) 2022-02-07 13:56:57.500-0600

[This|https://github.com/asterisk/asterisk/commit/858cb386fd4610eb018e39ce4c9c8becef0bbd39] would be my best guess? This is the only thing that has touched color support recently.

By: ben kolodny (benphone) 2022-02-07 14:36:20.982-0600

asterisk conf

By: ben kolodny (benphone) 2022-02-07 14:42:39.202-0600

16.23 color cli  

By: ben kolodny (benphone) 2022-02-07 14:44:20.659-0600

no color 18.9

By: Joshua C. Colp (jcolp) 2022-02-07 14:53:21.186-0600

These are separate systems, have you confirmed that on the same system where 16.23 works that 18.9 doesn't? Being separate systems means they could have different dependencies installed, thus my question.

By: ben kolodny (benphone) 2022-02-07 14:59:05.842-0600

well systems meening centos 07?
18.09 is centos 7

16.23 is running on centos 6.5

By: ben kolodny (benphone) 2022-02-08 07:31:15.683-0600

asterisk 16.23 on centos 7 not working

By: ben kolodny (benphone) 2022-02-08 07:31:46.680-0600

look like the problem is with centos 7

By: Joshua C. Colp (jcolp) 2022-02-08 07:34:08.203-0600

Okay, so does Asterisk 16.23 also not work on CentOS 7 with color in your environment?

I'm trying to determine if this is a regression or not.

By: ben kolodny (benphone) 2022-02-08 07:35:06.116-0600

correct

By: Joshua C. Colp (jcolp) 2022-02-08 07:40:40.074-0600

Okay, so it's not a regression but most likely something environment specific. Others have not reported this issue, and I asked someone else who is using CentOS 7 to test and they also were not able to reproduce this issue. What is the "TERM" environment variable set to on your system, and do you have the "libedit-devel" package installed?

By: ben kolodny (benphone) 2022-02-08 07:55:06.846-0600

yum install libedit-devel
Loaded plugins: replace
Package libedit-devel-3.0-12.20121213cvs.el7.x86_64 already installed and latest version
Nothing to do
where would i find "TERM" environment variable set to on your system"?

By: Joshua C. Colp (jcolp) 2022-02-08 07:58:21.139-0600

Typing "env" in a shell will tell you all environment variables, including TERM.

By: ben kolodny (benphone) 2022-02-08 08:00:51.457-0600

set | grep TERM
TERM=xterm


By: Sean Bright (seanbright) 2022-02-08 08:17:56.807-0600

{noformat}
cat /proc/$(pidof -s asterisk)/environ
{noformat}

By: ben kolodny (benphone) 2022-02-08 08:31:11.445-0600

{noformat}
PATH=/sbin:/usr/sbin:/bin:/usr/binPWD=/tmpLANG=en_US.UTF-8SHLVL=3OLDPWD=/_=/bin/nice
{noformat}

{noformat}
i see in centos 6 there is in the beginning also
TERM=xterm
{noformat}


By: Joshua C. Colp (jcolp) 2022-02-09 08:43:35.482-0600

I believe that would be the cause of this. But why TERM is not set there, I do not know.

[~seanbright] Any ideas?

By: Sean Bright (seanbright) 2022-02-09 08:46:20.433-0600

I checked the environment of an Asterisk instance that I am running and it does not have a {{TERM}} environment variable but I do get color when connecting to it remotely. If I could get SSH access to the box where this is happening that would help. Otherwise I would need instructions to set up a VM to test with.

By: Sean Bright (seanbright) 2022-02-09 08:47:15.121-0600

That being said, I am almost 100% sure this is environmental and not an Asterisk problem.

By: Sean Bright (seanbright) 2022-02-09 10:13:29.756-0600

I have time. sean@seanbright.com

By: ben kolodny (benphone) 2022-02-09 10:15:48.472-0600

working on it

By: ben kolodny (benphone) 2022-02-09 11:09:16.821-0600

Thank you [Sean Bright|https://issues.asterisk.org/jira/secure/ViewProfile.jspa?name=seanbright ]

{quote}
 
I_think_ you want to create a file named /etc/sysconfig/asterisk and put the following in it:

COLOR=yes

And then stop and start Asterisk.

I would say it was environment. The file /etc/init.d/asterisk talks a bit about the sysconfig overrides, but this is specific to RH/CentOS.
{quote}