<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p> The "-n" option only works on startup and cannot be used when
Asterisk is already running (I tried and I get an error). We are
using version 18.12.1. The output I want to capture is:</p>
<p>asterisk -rx "queue show"</p>
<p> If I capture the output to a file or straight to the command
line I get the colorized output.</p>
<p> I found a way to strip the ANSI codes using SED:</p>
<p>asterisk -rx "queue show" | sed -e 's/\x1b\[[0-9;]*m//g'</p>
<p> <br>
</p>
<div class="moz-cite-prefix">On 8/3/2022 10:35 AM, Joel Serrano
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMtXxQ=M=MP7Yp3dWC4Yq_5PvTA+t21_m3_WOZWBt9eCFBMsmw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">Have you tried adding “-n”? </div>
<div dir="auto"><br>
</div>
<div dir="auto">Also, what version of asterisk are you using?
newer versions only have colorized output when your are
connected to the console (-r) not for remote commands (-rx)</div>
<div dir="auto"><br>
</div>
<div dir="auto"><br>
</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Aug 3, 2022 at 08:21
Carlos Chavez <<a href="mailto:cursor@telecomab.mx"
moz-do-not-send="true" class="moz-txt-link-freetext">cursor@telecomab.mx</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"> I
usually like to have the colorized output when looking at <br>
asterisk output but I need to get some info by running
"asterisk -rx" <br>
and get just plain text output so I can mail it. Right now
I get ANSI <br>
codes in the output. Is there a way to get plain text
output for just <br>
that script and not disable colors for everything?<br>
<br>
-- <br>
Telecomunicaciones Abiertas de México S.A. de C.V.<br>
Carlos Chávez<br>
+52 (55)8116-9161<br>
<br>
<br>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a
href="http://www.api-digital.com" rel="noreferrer"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.api-digital.com</a>
--<br>
<br>
Check out the new Asterisk community forum at: <a
href="https://community.asterisk.org/" rel="noreferrer"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://community.asterisk.org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a
href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://wiki.asterisk.org/wiki/display/AST/Getting+Started</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a
href="http://lists.digium.com/mailman/listinfo/asterisk-users"
rel="noreferrer" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
<pre class="moz-signature" cols="72">--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)8116-9161</pre>
</body>
</html>