[asterisk-users] Asterisk Prompt

Mojo with Horan & Company, LLC mojo at horanappraisals.com
Fri Aug 24 11:29:06 CDT 2007


(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"
> <mojo at horanappraisals.com> 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/



More information about the asterisk-users mailing list