[Asterisk-Users] AEL #include
Douglas Garstang
dgarstang at oneeighty.com
Wed May 31 08:48:28 MST 2006
Oh Crud. So, if I want to jump to another extension or context, I have to specify the full context, extension and priority? I can't specify a label? It's a bit tricky trying to jump to a specific priority in an extension when they're all called 'n' !
Why is something so simple such a mess...
> -----Original Message-----
> From: Michael Collins [mailto:mcollins at fcnetwork.com]
> Sent: Wednesday, May 31, 2006 9:22 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: RE: [Asterisk-Users] AEL #include
>
>
> > Thanks Michael. I was not aware that labels where available.
> > In converting though, I've already hit a limitation.
> There's a single
> name
> > space for all labels I assume?
>
> Doug,
>
> According to TFOT's Goto() application reference entry (page 254) the
> "namespace" is actually the current extension:
> "Named priorities only work within the current extension."
>
> So you can have 50 different labels called "start" as long as you use
> "start" only once per extension. If you're in extension 555 and you
> Goto(start) it will look for "exten => 555,n(start),..." If
> it doesn't
> find a label "start" in exten 555 then the Goto() will fail,
> even if you
> have "start" in another extension:
> exten => 556,n(start),Noop(this "start" good only from exten 556)
>
> HtH.
>
> I can see a potential issue if you need to jump from one exten to
> another exten using Goto(). You still need to use
> Goto(context,extension,priority) to jump around like that.
> Do you have
> any scenarios like that? If so, it might be possible to
> create numbered
> "jump-to" points that will never change, and therefore won't require
> renumbering each time you make an addition to the dialplan.
>
> Example:
>
> [test_context]
> exten => 555,1,Noop(Starting exten 555)
> exten => 555,n,<dialplan stuff>
> exten => 555,n,Goto(test_context,556,999)
> ; previous line will end up at 556,n(start)
>
> exten => 556,1,Noop(Starting exten 556)
> exten => 556,n,<dialplan stuff>
> exten => 556,n(start),Noop(This is where I want to be)
> exten => 556,n,<more dialplan stuff>
> exten => 556,999,Goto(start)
> ; previous line used to allow other exten's to jump to 556,n(start)
>
>
>
> FYI, your other post just came in. I think I just answered a few of
> your questions. Let us know if this helps!
>
> -MC
> _______________________________________________
> --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
>
More information about the asterisk-users
mailing list