[asterisk-users] Conditional include=> ?

Steve Davies davies147 at gmail.com
Wed Apr 23 04:25:55 CDT 2008


2008/4/22 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:
[snip]
>
>  A different approach:
>
>  [company-base](!)
>  ; common settings
>
>  [company-A](company-base)
>  ; specific for company A
>
>  [company-B](company-base)
>  ; specific for company B
>
>  [company-C](company-base)
>  ; specific for company C
>
>
>  Keep in mind you can also use:
>
>  [sub-template](!,base-template)
>
>  And:
>
>  [context](template1,template2)
>
>  But one limitation is that you can only add: no way to remove line added
>  by a template your context uses.
>
Wow! That took some finding, as it is little more than a footnote
(page 115-116 of "Asterisk: The Future of Telephony") but is a
fantastic feature...

Given that I am using "include =>" statements, and the order of the
includes is significant, do you know what order lines from templates
are included? I will check the code, but can I assume that

[template1](!)
include => template1-patterns

[template2](!)
include => template2-patterns

[context](template1,template2)
include => context-patterns


It the same as:
[context]
include => template1-patterns
include => template2-patterns
include => context-patterns

and always in that order? Is this feature well used and well tested???

Thanks,
Steve



More information about the asterisk-users mailing list