No more Colors in CLI

Does anybody know how the get the colors back in the Asterisk CLI?

I setup a FreePBX 13 system (Asterisk 13.7.2) on Centos 7 and when I do the usual ‘asterisk -r’ on the console, all the colors are gone.

If I do the same on another FreePBX 13 system (Asterisk 13.7.2) on Centos 6.6 the colors are fine.

I am sure its some hidden parameter somewhere since colors work fine when I start asterisk manually (instead of using fwconsole start).


Is fwconsole starting asterisk with the “-n” option? how do we know which command line options fwconsole is starting asterisk with? I am using FPBX 10.13.66-19 on SMHZ release 6.6 with asterisk 11.25.1 and no more ansi colors on the CLI.

No it does not use the -n option. Your system has been configured to not show colors. Plenty of people post screenshots and code daily that use freepbx with colors

If you want to see the options the code is open source on github.

The system was working with colors perfectly fine on 10.13.66-15. Ran an update through the sysadmin/update web GUI which upgraded to 10.13.66-19, now colors are not working the CLI. It wasn’t anything I did specifically to disable it or enable it originally. Asterisk seems to have a command line option to only DISABLE ANSI colors (-n), but not one to ENABLE them. Not sure what you are referring to, Andrew.

If I use rasterisk -rv and connect to the CLI and issue: core stop now, then service asterisk start, I get colored CLI. If I run fwconsole restart again, ansi colors are back when rasterisk -rv connecting back to the console. weird that whatever restart command was last used during the upgrade script seemed to disable console colors, but restarting asterisk brings it back.

Same experience here. I wonder if the $TERM of safe_asterisk, etc has some influence. Makes following the console very, very difficult.

Freepbx hates you doing that, but if you edit the script to ensure the user and group as asterisk and remove the rc.local starting you will be fine, if debian also edit /etc/default/asterisk to suit

We use Symfony Process to start asterisk and unless we set tty to true this happens during startup from systemd

So as suggested by @shaakir I fixed this by force setting term if not previously set. I’m not sure this is a good fix. I don’t know what happens if the term really doesn’t support colors.