[asterisk-bugs] [Asterisk 0008925]: [post-1.4] CLI command audit

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Nov 13 14:20:06 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=8925 
====================================================================== 
Reported By:                blitzrage
Assigned To:                mvanbaak
====================================================================== 
Project:                    Asterisk
Issue ID:                   8925
Category:                   Documentation
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-28-2007 11:48 CST
Last Modified:              11-13-2007 14:20 CST
====================================================================== 
Summary:                    [post-1.4] CLI command audit
Description: 
While Jim van Meggelen and I were going over the CLI commands for the 2nd
edition of TFoT, we've found some discrepancies. Our attempt here is simply
to determine how the CLI commands should be documented. Either they are to
be documented as they exist now, or should they be documented following the
new format for CLI commands.

This bug is opened for discussion of the CLI commands, and we are simply
trying to determine how the CLI commands should be documented, either
as-is, or as ideal.

Update: It's too late to fix this in 1.4 now, so lets assume we're in a
transition and get these fix in trunk.
====================================================================== 

---------------------------------------------------------------------- 
 jon - 11-13-07 14:20  
---------------------------------------------------------------------- 
I always thought GotoIf only worked on labels (priorities with names).
After trying to work some magic with GosubIf it became apparent that they
both follow the same format as their non-condition handling counterparts.

Here's the current usage description of both...
  Goto([[context|]extension|]priority):
  Gosub([[context|]exten|]priority):

  GotoIf(condition?[labeliftrue]:[labeliffalse]):
  GosubIf(condition?labeliftrue[:labeliffalse]):

 
GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[[context|]exten|]priority):

I suggest using either 'extension' or 'exten', not both.
Also, labeliftrue isn't required, and neither is :labeliffalse, so both
GotoIf and GosubIf are both wrong. :P

Meaning the following 3 cases are valid
GotoIf(0?context|exten|prio)
GotoIf(0?:context|exten|prio)
GotoIf(0?context|exten|prio:context|exten|prio)


I know this is ugly...
GotoIf(condition?[[context|]extension|]priority][:[context|]extension|]priority])

So another option is to add the following note to the end of description
of these two applications:

Labels take the form '[context|]extension|]priority'

The uploaded file uses the first suggestion. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-13-07 14:20  jon            Note Added: 0073588                          
======================================================================




More information about the asterisk-bugs mailing list