In article <[EMAIL PROTECTED]>,
Steve Murphy <[EMAIL PROTECTED]> wrote:
> +; The algorithm to find an extension is recursive, and works in this
> +; fashion:
> +; a) Try to find a matching extension in the current context
> +; and, if found, begin executing the priorities there in sequence.
> +; b) If not found, Search the switches, if any declared, in sequence.
> +; c) If still not found, for each include, make that context the current
> +; context, and recurse to a).
This is not an accurate description. The search for an extension in the
current context and then any included contexts is performed afresh at
every priority, and any extension found within an include is executed
in the original context. The included "context" isn't really a context,
even though it looks like one!
Here's an example:
[foo]
exten => 22,1,NoOp(CONTEXT1=${CONTEXT})
include => bar
include => baz
[bar]
exten => 22,2,NoOp(CONTEXT2=${CONTEXT})
exten => 22,4,Hangup
[baz]
exten => 22,3,NoOp(CONTEXT3=${CONTEXT})
If the caller enters context "foo" at extension 22, the following dialplan
applications will be invoked:
NoOp(CONTEXT1=foo)
NoOp(CONTEXT2=foo) *** not bar ***
NoOp(CONTEXT3=foo) *** not baz ***
Hangup
Cheers
Tony
--
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev