Summary:ASTERISK-16771: unexpected output from command line, when issuing commands from shell
Reporter:Niles Ingalls (atheos)Labels:
Date Opened:2010-10-05 11:51:27Date Closed:2011-06-07 14:05:15
Versions:Frequency of
Description:When issuing a shell command to asterisk, I'm getting non-standard output after upgrading to that I wasn't getting in

/usr/sbin/asterisk -rx "database show foo" > test.txt
using in my test.txt, I'll have the expected "0 results found."
using I'll have the undesirable "^[[0;37m0 results found."

I believe this is related to terminal colors, but I have this disabled.
I'm using shell scripts to pattern match information in the asterisk database, which  of course is greatly interrupted by this issue.


using an HP DL380 G5
Debian 5 up to date
tested on an production machine using asterisk
tested on dev machine with identical hardware using asterisk SVN-branch-1.8-r290289
Comments:By: Clod Patry (junky) 2010-10-13 07:25:23

/usr/sbin/asterisk -nrx "database show foo" > test.txt
works like you expected?

(n for disable ANSI colors)

By: Brett Bryant (bbryant) 2010-11-09 16:46:03.000-0600

atheos, please try the adding the -n option like Junky has suggested and reporting back if that works as you've expected it to or not. If it doesn't, then please give us copies of your config files showing you're disabling terminal colors and we can look into reopening this issue.

By: Niles Ingalls (atheos) 2010-11-10 10:08:59.000-0600

recommendation by junky solved my issue, Thank You very much - Niles