Summary:ASTERISK-22728: [patch] Improve Understanding Of 'Forcerport' When Running "sip show peers"
Reporter:Michael L. Young (elguero)Labels:
Date Opened:2013-10-17 17:02:49Date Closed:2013-10-28 09:57:01
Versions:11.5.1 Frequency of
Environment:Attachments:( 0) asterisk-forcerport-display-clarification_v3.diff
Description:Walter Doekes pointed out ASTERISK-22236, that when running "sip show peers", there can be confusion about what "N" means under the column "Forcerport".  The "N" used to stand for NAT.  Now, that we use this same column for other settings involving the force_rport setting, someone could get confused as to what is meant by the N.

If "A" is displayed under it, it means auto_force_rport is turned on _and_ force_rport is set to on (NAT) for the peer.  If "a" (lowercase) is displayed, it means auto_force_rport is turned on _but_ force_rport is off for the peer.  

The proposed patch makes a minor change.  If force_rport is off, it will use "N" to mean no instead of NAT.  If force_rport is on, it will use "Y" to mean yes, the force_rport setting is on for the peer.

This mirrors what is displayed through the manager as well.  The manager uses yes and no for these settings.

Also, this patch adds a column for the comedia setting since that would be helpful to see if auto_force_rport/force_rport _and_ comedia/auto_comedia are turned on or not.
Comments:By: Michael L. Young (elguero) 2013-10-17 17:06:06.575-0500

Walter, is this what you had in mind?

By: Walter Doekes (wdoekes) 2013-10-18 02:38:44.013-0500

Thanks! That is indeed what I had in mind, including the upgrade.txt.

Perhaps only:
- Under the 'Forcerport' column, the 'N' has been changed to mean 'No' *(it used to mean NAT, i.e. Yes))* and a
 'Y' will be displayed now to mean 'Yes'.  This is being done to help clarify

(Now I just worry about the rows getting wider and wider. I'd consider dropping the comedia info from the output, since every other fix to reduce the output width I can think of, means more work. I don't know how others feel about that.)

By: Michael L. Young (elguero) 2013-10-18 10:48:15.345-0500

Here is an updated patch with the additional wording.

I wasn't too sure what people would think about adding the Comedia column.  Making the display wider was my concern too but I thought that I would throw it in there to get feedback.  I think it is helpful information to be displayed but wouldn't hurt my feelings if it was left out.

I will put it up for discussion to see how others feel.