[asterisk-users] issues with Asterisk CLI
Fourhundred Thecat
400thecat at gmx.ch
Tue Oct 22 21:44:59 CDT 2019
Hello,
I have Asterisk 16.2 on Debian.
In the Asterisk CLI, I would like to change 2 things:
1) change the keybindings for commandline editing
(what in bash is called "readline" editing of the command line)
The CLI is missing some very useful keybindings, and even worse, has
misconfigured others, For instance, "ctrl"+"w" should delete the last
word backward. But the CLI deletes whole line (same as "ctrl" + "u").
Also, I would like to be able to use the "PageUp" and "PageDown" for
history-search-forward/backward, as I can use in Bash (defined in my
/etc/inputrc). In short, I would like to be able to modify the asterisk
CLI line editing capabilities
Does Asterisk use the readline library? Does it use /etc/inputrc ?
Can the behavior described above be configured ?
2) I would like to be able to change the color of the asterisk prompt
as described here: https://www.voip-info.org/asterisk-cli-prompt/
I tried all possible permutations, but none work:
ASTERISK_PROMPT="%Cn[COLOR_BLUE] %H: " asterisk -vvvvvvr
ASTERISK_PROMPT="%Cn[32;128] %H: " asterisk -vvvvvvr
ASTERISK_PROMPT="%Cn[32;] %H: " asterisk -vvvvvvr
ASTERISK_PROMPT="%Cn[;32] %H: " asterisk -vvvvvvr
ASTERISK_PROMPT="%Cn[;COLOR_CYAN] %H: " asterisk -vvvvvvr
ASTERISK_PROMPT="%Cn[32|128] %H: " asterisk -vvvvvvr
Item 2) is just a cosmetic thing. but item 1) is very important for me.
Commandline shortcuts are great productivity tool. I can't understand
that this is not bothering other people. Also, if somebody thought
commandline editing in Asterisk CLI was a good idea, why did they not
adhere to the standard behaviour (ie, ctrl+w) ?
Also, when exiting the CLI, instead of having to type "exit" or "quit",
would it be possible to use "ctrl"+"d" like any other CLI ?
thanks,
More information about the asterisk-users
mailing list