<span style="font-family: Arial, Helvetica, sans-serif; font-size: 10pt"><div><span style="font-family: tahoma,arial,sans-serif; font-size: 10pt;"><hr width="100%" size="2" align="center">
</hr><b>From</b>: "Mark Michelson" &lt;mmichelson@digium.com&gt;<br />
<b>Sent</b>: Tuesday, January 24, 2012 6:10 PM<br />
<b>To</b>: asterisk-dev@lists.digium.com<br />
<b>Subject</b>: Re: [asterisk-dev] Why is "core show channels concise" deprecated?</span><br />
<br />
On 01/24/2012 04:59 PM, Bryant Zimmerman wrote:
</div>
<blockquote cite="mid:7da65982$37bce131$46c94566$@com" type="cite"><span style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">Danny Nicholas pointed out to me the info below about the
concise option be deprecated. My question is if it is going to
pulled long term why is the verbose option truncating the
information. They both&nbsp;have a different purpose the verbose
option is not useful as it does not return the full data. This
would kill&nbsp;all of our outside channel monitoring code that uses
the asterisk -rx "core show channels concise". What is
the&nbsp;thinking behind this move.&nbsp;<br />
<div>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">From cli.c (asterisk 10)<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
e-&gt;command = "core show channels
[concise|verbose|count]";<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
e-&gt;usage =<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"Usage: core show channels [concise|verbose|count]\n"<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lists currently defined channels and some
information about them. If\n"<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'concise' is specified, the format is abridged and
in a more easily\n"<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
machine parsable format. If 'verbose' is specified, the
output includes\n"<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; more and longer fields. If 'count' is specified
only the channel and call\n"<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count is output.\n"<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The 'concise' option is deprecated and will be
removed from future versions\n"<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of Asterisk.\n";<br />
</span><span style="color: rgb(31, 73, 125); font-family: &quot;calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return NULL;<br />
</span><br />
Thanks<br />
<br />
Bryant</p>
</div>
</span></blockquote>
<tt>The thinking is that CLI commands are intended for human
consumption, not for parsing by code. This frees us to be able to
make changes to CLI commands when they have typos, are formatted
badly, or are missing information without the worry that it will
mess up somebody's parsing code.<br />
<br />
The "core show channels verbose" command was written before this
thinking came into play. The preferred method for handling this
sort of task is via the Asterisk Manager Interface's
CoreShowChannels command instead.<br />
<br />
One thing that also should be mentioned is that we also operate
under the philosophy (since about 1.6.0 or thereabouts) that even
when something becomes deprecated, we won't remove it. People like
to have stress-free upgrades if at all possible, and so if it
doesn't actually hurt to leave the code in, then we'll leave it
in. However, don't expect quick turnaround if you report a bug in
something that is declared deprecated, and don't expect any
updates to happen to deprecated code either.<br />
<br />
Mark Michelson<br />
</tt><br />
Mark<br />
<br />
Thank you for your reply. I see the point about the Asterisk Manager but I have had it lock up over the years and don't fully trust it for our core monitoring functions.&nbsp; As for looking at the verbose option as human usable.&nbsp; By not showing the user the full channel info what use is it as it can not be used for anthing. Say a channel has hung and a request needs to be entered to hang it up. The verbose option does not show the full channel ID&nbsp; it is chopped off so you would be stuck and could not get the full id if the concise were not there. This is also an issue when you do a sip show peers as info is being chopped of. You get a pretty list of data but the data is not usable to it's fullest.&nbsp; We are building more of our tools using the manager but it is nice to have the full info from the cli if needed.<br />
<br />
Thanks Again.<br />
<br />
Bryant<br /></span>