I have a mysterious issue. I connect to an Arch Linux virtual machine running asterisk. All of a sudden, anytime I enter the asterisk CLI, the SSH console spits out unicode character codes. What I am showing below is the result of moving the arrows. How can I get my normal display back?

aag ~ $ sudo asterisk -r
Connected to Asterisk 13.9.1 currently running on asterisk (pid = 1399)
asterisk*CLI> \U+4B01B\U+4B05B\U+4B041

The issue is discussed on the Asterisk forums here https://community.asterisk.org/t/cli-gibberish-prompt-and-input-appear-to-be-some-sort-of-unicode-characters/67382/15

It's caused when Asterisk uses external libedit (which is the default option in Asterisk if it's provided by the system, and Arch Linux provides it by default) with incompatible version.

One workaround is to compile Asterisk with --with-libedit=internal. Other workaround is to downgrade libedit to a compatible version (e.g. libedit 20150325_3.1-2)

  • 1
    Just a hint for a non-invasive approach, get the proper versions of libedit (and libtinfo that it requires by itself) and use LD_PRELOAD instead of doing a system-wide library downgrade: alias asterisk="LD_PRELOAD=/usr/local/lib/libtinfo.so.5:/usr/local/lib/libedit.so.0.0.53 asterisk". Of course this assumes you put these libraries in /usr/local/lib – Marcelo Feb 15 '17 at 20:18

You can edit the PKGBUILD file and add --with-libedit=internal in the ./configure line.

  • Thanks. I am not sure why it was downvoted - might the downvoter provide clarity? Also, what exactly does this PKGBUILD option do? – aag Aug 27 '16 at 7:14
  • PKGBUILD is the file to build packages. Since asterisk is in AUR, you can download the PKGBUILD file, edit the file and then rebuild and reinstall the asterisk package. Alternatively you can downgrade the libedit package. – Lilong Aug 27 '16 at 20:21

Those are color/positions chars.

You have 2 options

1)Ensure you ssh client support same terminal type you have in TERM variable. To get it use

env|grep TERM

2) run asterisk console without color

-n Disable ANSI colors even on terminals capable of displaying them.

So use

   asterisk -rn
  • thank you for taking time to help me. Regrettably, neither suggestions helped. Starting the asterisk CLI with the -rn switch did not change anything. I then removed the colors by editing ~/.bashrc and rebooting. Still getting the code gibberish though. I should add that locale indicates that asterisk (on arch linux) is using UTF-8, and the terminal software (putty) is also using xterm and UTF-8 – aag Jul 17 '16 at 19:38
  • Maybe your asterisk compiled in other environment without UTF-8. Try other encoding(in both terminal and putty). – arheops Jul 17 '16 at 21:30
  • I installed a completely fresh version of arch linux, and compiled asterisk anew from yaourt. Again, no joy. The linux environment works just fine, but as soon as I switch to asterisk things go awry. This only happens since a few weeks, which leads me to wonder whether it's a bug. – aag Jul 18 '16 at 18:10
  • Arch linux is not so common. Sorry, can say nothing except i say above. – arheops Jul 18 '16 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.