http://www.mail-archive.com/asterisk-us ... 12860.html
from 11/2008:
The startup scripts changed slightly, such that they no longer
output to a terminal. Because there is no console, Asterisk cannot detect
which control codes to send (hence, no color). Note that if you startup
Asterisk with safe_asterisk, this isn't a problem, as safe_asterisk attaches
the process to a terminal (typically, pty8).
http://www.voipplanet.com/backgrounders ... hp/3650931
And more on point, but convoluted, you'll have to pull it out and/or interpret it as you see fit:
Customizing the Asterisk CLI prompt
Old critters like me don't care to read colored text on black backgrounds, which is the default Asterisk console color scheme. The easy way to get around this is to have these lines in /etc/init.d/asterisk:
# Full path to asterisk binary
DAEMON=$AST_SBIN/asterisk TERM=linux asterisk
The DAEMON line is already there—just add TERM=linux asterisk. Restart Asterisk from the Linux command line this way:
# /etc/init.d/asterisk restart
Then when you attach to a running Asterisk session (asterisk -r) from an X terminal (like Konsole, xterm, or Gnome terminal) you'll keep your local terminal color scheme. But this doesn't affect the Asterisk root console, because those colors are hard-coded into Asterisk. You can see for yourself in the source directory, in /usr/src/asterisk-1.4.0-[version]/main/term.c.
You can customize the prompt a bit, if the default prompt is too dull for you. First add these lines to /etc/asterisk/extensions.conf in the [globals] section:
${ENV(UNIX)}
${ENV(ASTERISK_PROMPT)}
Then in /etc/profile on the Asterisk server, set the ASTERISK_PROMPT values:
ASTERISK_PROMPT='%t, %l2, %h*> '
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC ASTERISK_PROMPT
Your export variables will probably be different; just tack ASTERISK_PROMPT on at the end. Reboot, run asterisk -r from your X terminal, and voilá! The prompt is customized and your colors do not change:
17:51:30, 0.54, asterisk1.alrac.net*>
This example displays the time, the load average for the past five minutes, and the fully-qualified server name. Look in /usr/src/asterisk-1.4.0-[version]/doc/cliprompt.txt to see a list of values to use.
_______________
What i get from this is that the terminal it believes it is pointing to is determined when it is started and after that it will issue color controls for that terminal or NO colors, based on how you start the remote terminal.
i'd do more but the pizza is here and i'm out of time