[Asterisk-Dev] specification for exten => lines anywhere ?

Luigi Rizzo rizzo at icir.org
Wed May 18 02:18:17 MST 2005


On Wed, May 18, 2005 at 01:12:09AM -0500, Russell Bryant wrote:
> Luigi Rizzo wrote:
> > + i am not sure how the parsing of application is supposed to work!
> 
> exten,prior,app,app_data
>   or
> exten,prior,app(app_data)
> 
> The "app_data" is the set of arguments being passed to the application
> and are parsed by the application itself.

the above descripction is incomplete.

As i said in my original message, there is a lot more that the
generic code does in parsing exten and priority, or identifying
quoted strings in the app_data. See at the bottom a repost of what
the code does.

Re. the comment on the vim syntax file on the wiki:
there is basically nothing in there:

	http://www.voip-info.org/wiki-vim+syntax+highlighting

	" not sure what type this should be, using String for testing.
	  HiLink	asteriskExten	String

and even the other poster's vim syntax was only dealing with some
spaces and digits.

So... does anyone knows more ?

	thanks
	luigi

---------------------------------------
CURRENT BEHAVIOUR:

+ I see the basic format is

        extension[/cid], priority, application

+ I see that you can have variables in extension which are evaluated,
  but that does not apply to 'cid'

+ i see that 'priority' can be:
  - a (label_in_parentheses), in which case everything before '('
    is silently ignored;
  - or the keyword 'hint' (case sensitive), no space allowed;
  - the keyword 'next' or 'n' (useful for compiling lists of increasing
    priority) or 'same' or 's' (useful for compiling lists with different
    CID numbers and same priority);
    However, in this case, the 'current' priority is silently inherited
    even if you change extensions;
  - something preceded by a '+', in which case everything before the '+'
    is silently skipped and anything after is interpreted as a number
    by atoi() and added to the 'current' priority, e.g. 100+-50
    gives 'current' - 50, which can cause a clash with PRIORITY_HINT
    or -2 (the initial value) ...

+ i am not sure how the parsing of application is supposed to work!




More information about the asterisk-dev mailing list