[asterisk-dev] Command Syntax -- weird?
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Sat Apr 22 13:12:46 MST 2006
On Saturday 22 April 2006 13:35, Peter Beckman wrote:
> On Sat, 22 Apr 2006, Tilghman Lesher wrote:
> > The initial syntax for Voicemail was Voicemail([flags]boxnumber).
> > That's it. There was no context and no multiple mailboxes. The
> > first thing that was added was a context. So that's simple
> > enough: Voicemail([flags]boxnumber[@context]). From there, we
> > added multiple mailboxes, which is how we have the current
> > syntax. Please note that the flags have already been moved to
> > the end for the 1.4 release, although flags at the beginning are
> > still accepted for backwards compatibility.
>
> Excellent! Will they be delimited? Ie:
>
> VoiceMail(123 at foo & 456 at bar, su)
Yes, but without spaces.
> > RetryDial was based upon Dial. The developer of that app chose
> > to prefix the arguments to the Dial command, rather than to add
> > them as suffixes. I can't say I necessarily agree with this
> > approach, but it's over and done now. In any case, since it's a
> > distinct dialplan application, it's not nearly that bad.
>
> It must add a lot of code to parse out all of that stuff, and
> having an inconsistent method of calling functions make both
> documentation confusing and the user/admin confused. It makes
> Asterisk seem cobbled together, and though it may be, the
> disconnect between a unified code front seems like more of a hack,
> rather than the production-ready and profesional front I think
> Asterisk really has.
I don't see how this has anything to do with an inconsistent method
of calling applications (again, these are applications, not
functions; functions are something different). The method of calling
applications is entirely consistent. The order of the arguments to
the application is what you appear to have trouble understanding.
> >> Something where every time I specify the first parameter, I
> >> always know what it is. Currently if I add on things to Goto,
> >> the first parameter could be a priority, an extension or a
> >> context. Who knows! Sure, obviously you can tell, but I guess
> >> I'm asking why!
> >
> > As above, it's always been that way, and there hasn't been an
> > overriding reason to change it.
>
> Not even to unify the codebase?
Labels are already consistent across the codebase. What you're having
trouble with is understanding that labels are parsed right-to-left.
This isn't an inconsistency -- it's simply different from how
other types of arguments are parsed.
> I think Asterisk is a great tool, and very powerful, but without
> good, solid, accurate and up-to-date online web-based
> documentation, it is a tool for the tinkerer, not the masses.
I think you've just made an argument for why the coders behind the
project should boot the documenters. :-) I'm not saying we should do
that, but Asterisk has always been for the tinkerer; it will never be
for the masses. This is the concept that a lot of people seem to have
trouble understanding -- the community of developers that support an
open source project do so for their mutual benefit, not to create a
super-polished application that the typical computer user can use.
--
Tilghman
More information about the asterisk-dev
mailing list