In article <[EMAIL PROTECTED]>, Douglas Garstang <[EMAIL PROTECTED]> wrote: > > [example] > > include => ctx31X > > include => ctx3XX > > > > exten => _X.,1,NoOp(this gets executed first for everything) > > exten => _X.,2,NoOp(this gets executed second only if ctx31X > > or ctx3XX didnt match) > > exten => _X.,3,NoOp(this gets executed third for everything) > > > > [ctx31X] > > exten => _31X,2,NoOp(this gets executed second for 310-319) > > > > [ctx3XX] > > exten => _3XX,2,NoOp(this gets executed second for 300-309 > > and 320-399) > > Does this really work? I've never seen this behavior documented anywhere. > Asterisk always searches the current context before looking in included ones > for a start. > Second, I don't see how it can just jump out of [example] into [ctx31X] and > back again > without being told to do so....
No, I forgot one thing. Since includes are searched in order, the default needs to go in an include as well: [example] include => ctx31X include => ctx3XX include => ctxdflt [ctxdflt] exten => _X.,1,NoOp(this gets executed first for everything) exten => _X.,2,NoOp(this gets executed second only if ctx31X or ctx3XX didnt match) exten => _X.,3,NoOp(this gets executed third for everything) [ctx31X] exten => _31X,2,NoOp(this gets executed second for 310-319) [ctx3XX] exten => _3XX,2,NoOp(this gets executed second for 300-309 and 320-399) That should work as I described. 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-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users