[Home]

Summary:ASTERISK-13121: CLI command "help sip set history {on|off}" shows deprectated usage in help text
Reporter:pkempgen (pkempgen)Labels:
Date Opened:2008-11-25 14:13:50.000-0600Date Closed:2008-12-18 15:23:57.000-0600
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) __20081217_cli_usage_fixes.patch.txt
( 1) commandaudit.txt
Description:Not sure if the category should be Channels/chan_sip or Documentation.

$ asterisk -rx 'help sip set history on'
Usage: sip history {on|off}
...

but 'sip history [off]' is deprectated.

Expected output for 'help sip set history {on|off}':
Usage: sip *set* history {on|off}
...

Expected output for 'help sip history':
...
'sip history [off]' is DEPRECATED. Please use 'sip set history {on|off}'.


****** STEPS TO REPRODUCE ******

$ asterisk -rx 'help sip set history on'

****** ADDITIONAL INFORMATION ******

In addition to that "sip history" doesn't show up in the
list of commands ("help sip").
That is kind of unexpected because deprecated applications, functions, ...
used to show up.
Comments:By: pkempgen (pkempgen) 2008-11-25 14:21:52.000-0600

This hold true for branches/1.6.1 as well.

http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=markup#l_14708
http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_sip.c?view=markup#l_14678

And trunk:
http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=markup#l_15421



By: pkempgen (pkempgen) 2008-11-25 14:26:54.000-0600

> In addition to that "sip history" doesn't show up in the
> list of commands ("help sip").
> That is kind of unexpected because deprecated applications, functions, ...
> used to show up.

Forget about that comment.
For whatever reason there is a difference between applications/functions
and CLI commands. E.g. "reload" didn't show up in 1.4 even though it was
still supported.

By: pkempgen (pkempgen) 2008-11-25 14:54:51.000-0600

> Expected output for 'help sip history':
> ...
> 'sip history [off]' is DEPRECATED. Please use 'sip set history {on|off}'.

There seems to be a problem with the built-in documentation ("usage") of
other commands too.
E.g. "help reload" in Asterisk 1.6:
---cut---
Usage: module reload [module ...]
      Reloads configuration files for all listed modules which support
      reloading, or for all supported modules if none are listed.
---cut---
It doesn't tell me that "reload" has been deprectated.
Expected output:
---cut---
Usage: reload [module ...]
      Reloads configuration files for all listed modules which support
      reloading, or for all supported modules if none are listed.
"reload" has been DEPRECATED. Please use "module reload".
---cut---

But that's just a side-note. Let's keep this bug to what it says in the
subject.



By: pkempgen (pkempgen) 2008-11-25 16:57:13.000-0600

Same problem with "help ael set debug {read|tokens|macros|contexts|off}":
---cut---
Usage: ael debug {read|tokens|macros|contexts|off}
      Enable AEL read, token, macro, or context debugging,
      or disable all AEL debugging messages.  Note: this
      currently does nothing.
---cut---

s/ael debug/ael set debug/

By: Leif Madsen (lmadsen) 2008-12-10 17:23:39.000-0600

Acknowledging this issue. Seems we've missed a part in our CLI audit and will need to make sure this gets updated. I'm going to assign this to myself since I will need to perform another audit. Thanks for pointing this out!

By: Leif Madsen (lmadsen) 2008-12-11 16:27:53.000-0600

As a little note to myself so I can verify all the commands, and not just these ones (another audit, yay!)

grep -rni -A 3 'e->command' * | grep -v '.svn'

By: Michiel van Baak (mvanbaak) 2008-12-13 07:54:02.000-0600

For those that want the list without running the command blitzrage noted in his last comment, I uploaded a file with the output.

By: Leif Madsen (lmadsen) 2008-12-18 15:13:26.000-0600

OK, I've gone through the list and have found all the ones (I believe) that were incorrect. Funny enough, there were only 2 (the ones pkempgen reported), however the patch is fairly large because I fixed up some formatting things as well since I was there.

This patch is ready for review by someone before being committed. Thanks!

By: Digium Subversion (svnbot) 2008-12-18 15:21:54.000-0600

Repository: asterisk
Revision: 165792

U   trunk/apps/app_queue.c
U   trunk/channels/chan_dahdi.c
U   trunk/channels/chan_misdn.c
U   trunk/channels/chan_oss.c
U   trunk/channels/chan_sip.c
U   trunk/pbx/pbx_ael.c

------------------------------------------------------------------------
r165792 | file | 2008-12-18 15:21:54 -0600 (Thu, 18 Dec 2008) | 6 lines

Numerous documentation updates.
(closes issue ASTERISK-13121)
Reported by: pkempgen
Patches:
     __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=165792

By: Digium Subversion (svnbot) 2008-12-18 15:22:25.000-0600

Repository: asterisk
Revision: 165793

_U  branches/1.6.0/

------------------------------------------------------------------------
r165793 | file | 2008-12-18 15:22:24 -0600 (Thu, 18 Dec 2008) | 12 lines

Blocked revisions 165792 via svnmerge

........
 r165792 | file | 2008-12-18 17:21:44 -0400 (Thu, 18 Dec 2008) | 6 lines
 
 Numerous documentation updates.
 (closes issue ASTERISK-13121)
 Reported by: pkempgen
 Patches:
       __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=165793

By: Digium Subversion (svnbot) 2008-12-18 15:23:56.000-0600

Repository: asterisk
Revision: 165794

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_queue.c
U   branches/1.6.1/channels/chan_dahdi.c
U   branches/1.6.1/channels/chan_misdn.c
U   branches/1.6.1/channels/chan_oss.c
U   branches/1.6.1/channels/chan_sip.c
U   branches/1.6.1/pbx/pbx_ael.c

------------------------------------------------------------------------
r165794 | file | 2008-12-18 15:23:56 -0600 (Thu, 18 Dec 2008) | 13 lines

Merged revisions 165792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
 r165792 | file | 2008-12-18 17:21:44 -0400 (Thu, 18 Dec 2008) | 6 lines
 
 Numerous documentation updates.
 (closes issue ASTERISK-13121)
 Reported by: pkempgen
 Patches:
       __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10)
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=165794