<div dir="ltr">Haven't tried this, but try piping through 'strings'<div><br></div><div>j</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 3, 2022 at 6:13 PM Carlos Chavez <<a href="mailto:cursor@telecomab.mx">cursor@telecomab.mx</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<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>On 8/3/2022 10:35 AM, Joel Serrano
wrote:<br>
</div>
<blockquote type="cite">
<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" target="_blank">cursor@telecomab.mx</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);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">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">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">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">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote>
</div>
</div>
<br>
<fieldset></fieldset>
</blockquote>
<pre cols="72">--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)8116-9161</pre>
</div>
-- <br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">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">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">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">http://lists.digium.com/mailman/listinfo/asterisk-users</a></blockquote></div>