[Home]

Summary:ASTERISK-29895: chan_iax2: Fix misaligned spacing in iax2 show netstats printout
Reporter:N A (InterLinked)Labels:patch
Date Opened:2022-02-04 18:23:44.000-0600Date Closed:2022-03-28 14:08:03
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:18.9.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) misaligned2.patch
Description:If the channel name is long enough, the spacing for the printout gets screwed up and the headers are no longer referring to the proper columns. This adds a padding of 4 spaces to the header so that the columns are always correctly aligned.
Comments:By: Asterisk Team (asteriskteam) 2022-02-04 18:23:45.600-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Sean Bright (seanbright) 2022-02-05 15:27:28.951-0600

Can you add a comment to this issue showing a before & after?

By: Sean Bright (seanbright) 2022-02-24 09:01:47.566-0600

Can you add a comment to this issue showing a before & after?

By: N A (InterLinked) 2022-02-24 11:07:11.352-0600

Sorry, missed this the first time.

I have it patched on my systems right now, so I can only get the "after", but I've included an example of what the "before" would look like underneath as well:
https://paste.interlinked.us/drxhvo917w.txt
{noformat}
voip*CLI> iax2 show netstats
                               --------- LOCAL --------------------  --------- REMOTE -------------------
Channel                    RTT  Jit  Del  Lost   %  Drop  OOO  Kpkts  Jit  Del  Lost   %  Drop  OOO  Kpkts FirstMsg    LastMsg
IAX2/REDACTED0-rsa-wolfri 1000   -1    0    -1  -1     0   -1      0    0    0     0   0     0    0      0 Tx:NEW      Tx:ACK

voip*CLI> iax2 show netstats
                               --------- LOCAL --------------------  --------- REMOTE -------------------
Channel              RTT  Jit  Del  Lost   %  Drop  OOO  Kpkts  Jit  Del  Lost   %  Drop  OOO  Kpkts FirstMsg    LastMsg
IAX2/REDACTED0-rsa-wolfri 1000   -1    0    -1  -1     0   -1      0    0    0     0   0     0    0      0 Tx:NEW      Tx:ACK
{noformat}

Essentially, it was just shifted over a bit, in such a way that I looked at what seemed to be the "Jit" column and thought I was reading the jitter buffer time, but it was actually the RTT, the table wasn't formatted right and that misled me.

The formatting fix just forces everything to line up properly, 100% of the time.

By: Birger "WIMPy" Harzenetter (wimpy) 2022-03-07 10:36:26.906-0600

The patch only shifs the header of 'iax2 show netstats' 4 chars to the right without changing the formatting of the peer names. So instead of long peer names, now short peer names caused mis-alignment.
[This addition|^misaligned2.patch] ensures that stats after both long and short peer names are aligned correctly.


By: Friendly Automation (friendly-automation) 2022-03-28 14:08:04.004-0500

Change 18090 merged by Friendly Automation:
chan_iax2: Fix spacing in netstats command

[https://gerrit.asterisk.org/c/asterisk/+/18090|https://gerrit.asterisk.org/c/asterisk/+/18090]

By: Friendly Automation (friendly-automation) 2022-03-28 15:06:42.754-0500

Change 18089 merged by Kevin Harwell:
chan_iax2: Fix spacing in netstats command

[https://gerrit.asterisk.org/c/asterisk/+/18089|https://gerrit.asterisk.org/c/asterisk/+/18089]

By: Friendly Automation (friendly-automation) 2022-03-28 15:07:30.984-0500

Change 18091 merged by Kevin Harwell:
chan_iax2: Fix spacing in netstats command

[https://gerrit.asterisk.org/c/asterisk/+/18091|https://gerrit.asterisk.org/c/asterisk/+/18091]

By: Friendly Automation (friendly-automation) 2022-03-28 15:12:14.163-0500

Change 17957 merged by Kevin Harwell:
chan_iax2: Fix spacing in netstats command

[https://gerrit.asterisk.org/c/asterisk/+/17957|https://gerrit.asterisk.org/c/asterisk/+/17957]