[asterisk-users] asterisk prompt

2014-11-25 Thread Martin Vegter
Hello,

I am trying to set up color prompt. In the documentation I have found this:

  %Cn[;n] Change terminal foreground (and optional background) color to
  specified. A full list of colors may be found in include/asterisk/term.h*

But nowhere could I find what format the color code should be. I have
tried all possible permutations, none of them works:

  ASTERISK_PROMPT=%Cn[COLOR_BLUE] %H:  asterisk -vvr
  ASTERISK_PROMPT=%Cn[32;128] %H:  asterisk -vvr
  ASTERISK_PROMPT=%Cn[32;] %H:  asterisk -vvr
  ASTERISK_PROMPT=%Cn[;32] %H:  asterisk -vvr
  ASTERISK_PROMPT=%Cn[;COLOR_CYAN] %H:  asterisk -vvr
  ASTERISK_PROMPT=%Cn[32|128] %H:  asterisk -vvr

can somebody please tell me how to make my asterisk prompt red, for example?
__

Also, I would like to piggyback a second question:

I am using Asterisk 11.13 on Debian Wheezy. When I am in asterisk CLI, I
can use command history and readline functions such as CTRL+r to search.
But not all functions are available. For example, the alternate mappings
for page up and page down to search the history do not work. They
work in everything else (bash, mysql, ..)

$ cat /etc/inputrc
\e[5~: history-search-forward
\e[6~: history-search-backward

is there a way to make it work in asterisk ?

thanks,
Martin


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Prompt

2007-08-24 Thread Tzafrir Cohen
On Thu, Aug 23, 2007 at 03:13:40PM -0700, bilal ghayyad wrote:
 Dear Mojo;
 
 Thanks for your help.
 
 Why you said export ASTERISK_PROMPT=new prompt ?

To make that a new value for the environment variable. 
An alternative method is:

ASTERISK_PROMPT=new prompt  asterisk -r

There are actually some special % values there:

ASTERISK_PROMPT='date(d): %d, h(hostname) : %h, H(short hostname): %H, l(load 
avg): %l, s(system name) %s, t(time): %t, literal: %%  ' rasterisk

-- 
   Tzafrir Cohen   
icq#16849755jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]   
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Prompt

2007-08-24 Thread Mojo with Horan Company, LLC
(sent to the list because it's pertinent)

Bilal,

anything can be a unix variable, it doesn't matter what it's called.

#!/bin/bash
export THREE=3
export FIVE=5
((EIGHT=$THREE+$FIVE))
echo $EIGHT

THREE, FIVE, and EIGHT are all just variables, like in programming. It 
just so happens that if you create one called ASTERISK_PROMPT, asterisk 
will use it.

You would probably put this in your startup script, for example
/etc/rc.d/rc.local
or
/etc/rc.local

down near the bottom you could put

export ASTERISK_PROMPT=new prompt 

and when you run asterisk, it will use this new prompt in the CLI.

bilal ghayyad wrote:
 Dear Mojo;
 
 Where we configure this UNIX environment that can let
 us able to write the command export ASTERISK_PROMPT
 (for example, how can we know that if we typed export
 CISCO_PROMPT then it will not work we CISCO_PROMPT is
 not UNIX variable)?
 
 Regards
 Bilal
 --- Mojo with Horan  Company, LLC
 [EMAIL PROTECTED] wrote:
 
 You seemed to be unclear about unix variables:
   The question is: what is the ASTERISK_PROMPT
 UNIX
   environment variable and where I can access it
 to
   change it?

 the command:
 export ASTERISK_PROMPT=
 will let you change it, like you asked
 for example, if your asterisk server is named pbx,
 you could get your 
 default prompt back with:

 export ASTERISK_PROMPT=pbx*CLI 
 or you could play around:
 export ASTERISK_PROMPT=Enter your command to the
 Asterisk CLI 

 Sorry if this is unclear!

 Mojo

 bilal ghayyad wrote:
 Dear Mojo;

 Thanks for your help.

 Why you said export ASTERISK_PROMPT=new prompt
 ?

 Regards
 Bilal


 I'm not sure what features/variables you can use,
 or
 where to find 
 information about that, but what this basically
 means
 is you can change
  
 your CLI prompt by this:

 export ASTERISK_PROMPT=new prompt 

 then, what you access the CLI, instead of:

 hostname*CLI
 you get
 new prompt 

 Moj

 bilal ghayyad wrote:
 Hi List;

 I read the following sentence:

 The CLI prompt is set with the ASTERISK_PROMPT
 UNIX
 environment variable

 In the following link:

 http://www.voip-info.org/wiki/index.php
 page=Asterisk+CLI+prompt

 The question is: what is the ASTERISK_PROMPT UNIX
 environment variable and where I can access it to
 change it? Also where I can find information
 about
 it?
 Regards
 Bilal Ghayad

  
 
 Park yourself in front of a world of choices in
 alternative vehicles. Visit the Yahoo! Auto Green
 Center.
 http://autos.yahoo.com/green_center/ 
 
 
 

 
 Need a vacation? Get great deals
 to amazing places on Yahoo! Travel.
 http://travel.yahoo.com/

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Asterisk Prompt

2007-08-23 Thread bilal ghayyad
Hi List;

I read the following sentence:

The CLI prompt is set with the ASTERISK_PROMPT UNIX
environment variable

In the following link:

http://www.voip-info.org/wiki/index.php
page=Asterisk+CLI+prompt

The question is: what is the ASTERISK_PROMPT UNIX
environment variable and where I can access it to
change it? Also where I can find information about it?

Regards
Bilal Ghayad



  

Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Prompt

2007-08-23 Thread Mojo with Horan Company, LLC
I'm not sure what features/variables you can use, or where to find 
information about that, but what this basically means is you can change 
your CLI prompt by this:

export ASTERISK_PROMPT=new prompt 

then, what you access the CLI, instead of:

hostname*CLI
you get
new prompt 

Moj

bilal ghayyad wrote:
 Hi List;
 
 I read the following sentence:
 
 The CLI prompt is set with the ASTERISK_PROMPT UNIX
 environment variable
 
 In the following link:
 
 http://www.voip-info.org/wiki/index.php
 page=Asterisk+CLI+prompt
 
 The question is: what is the ASTERISK_PROMPT UNIX
 environment variable and where I can access it to
 change it? Also where I can find information about it?
 
 Regards
 Bilal Ghayad
 
 
 
   
 
 Park yourself in front of a world of choices in alternative vehicles. Visit 
 the Yahoo! Auto Green Center.
 http://autos.yahoo.com/green_center/ 
 
 ___
 --Bandwidth and Colocation Provided by http://www.api-digital.com--
 
 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk Prompt

2007-08-23 Thread bilal ghayyad
Dear Mojo;

Thanks for your help.

Why you said export ASTERISK_PROMPT=new prompt ?

Regards
Bilal


I'm not sure what features/variables you can use, or
where to find 
information about that, but what this basically means
is you can change
 
your CLI prompt by this:

export ASTERISK_PROMPT=new prompt 

then, what you access the CLI, instead of:

hostname*CLI
you get
new prompt 

Moj

bilal ghayyad wrote:
 Hi List;
 
 I read the following sentence:
 
 The CLI prompt is set with the ASTERISK_PROMPT UNIX
 environment variable
 
 In the following link:
 
 http://www.voip-info.org/wiki/index.php
 page=Asterisk+CLI+prompt
 
 The question is: what is the ASTERISK_PROMPT UNIX
 environment variable and where I can access it to
 change it? Also where I can find information about
it?
 
 Regards
 Bilal Ghayad


  

Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users