[asterisk-users] CLI color prompt

Jeff LaCoursiere jeff at stratustalk.com
Sun May 31 09:46:51 CDT 2020


I work from a similar setup.  I ssh'ed to my personal PBX from an xterm 
window on an Ubuntu 16 workstation, your prompt seems to work:


	*Jeff LaCoursiere*
STRATUSTALK, INC. / CTO

Phone: 	*+1 703.496.4990 x108*
Mobile: 	*+1 815.546.6599*
Email: 	*jeff at stratustalk.com* <mailto:jeff at stratustalk.com>
Website: 	*https://www.stratustalk.com*
Address: 	*One Freedom Square
13th Floor
Reston, VA 20190*

<https://www.facebook.com/jeff.lacoursiere> 
<https://linkedin.com/in/jeff-lacoursiere-884361> 
<https://www.twitter.com/stratustalk>

On 5/31/20 8:59 AM, Antony Stone wrote:
> On Sunday 31 May 2020 at 15:44:46, Fourhundred Thecat wrote:
>
>> Hello,
>>
>> how can I change the color of the asterisk prompt to red ?
>>
>> I read in the wiki that I can use %Cn[;n]
>>
>> https://wiki.asterisk.org/wiki/display/AST/Asterisk+CLI+Configuration
> "The CLI prompt is set with the ASTERISK_PROMPT UNIX environment variable that
> you set from the Unix shell before starting Asterisk."
>
>> I currently have this in my environment:
>>
>> export ASTERISK_PROMPT="[%H]: "
>>
>> which changes the prompt to hostname
>>
>> Ho can I make this prompt red ?
> "%Cn[;n] - Change terminal foreground (and optional background) color to
> specified A full list of colors may be found in include/asterisk/term.h"
>
> So, try:
>
> export ASTERISK_PROMPT="%C31[%H]: "
>
> (I got 31 from reading the term.h file.)
>
>
> Regards,
>
>
> Antony.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200531/17f7460b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clmgfiekdgigdkib.png
Type: image/png
Size: 88609 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200531/17f7460b/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jeff.vcf
Type: text/x-vcard
Size: 321 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200531/17f7460b/attachment-0001.vcf>


More information about the asterisk-users mailing list