[Asterisk-Users] How to continue after a match in an include

C F shmaltz at gmail.com
Sun Jul 2 08:48:49 MST 2006


Create a context that is the one that you want the dialplan to visit
last, and dont include this context anywhere, then in the first
context create a line that has a goto statement, something like this:

[default]
include => 1stcontext
[1stcontext]
exten => _.,1,Set(MYVAR=123${EXTEN})
exten => _.,2,Goto(2ndcontext,${EXTEN}),1)

[2ndcontext]
exten => _91NNN,1,Noop(We set this to: ${MYVAR})

if you dial 91222 you should see in the console:

We set this to: 12391222

Hope this helps.

On 7/2/06, Ronald Wiplinger <ronald at elmit.com> wrote:
> I am looking for a way that after a successfully match in one include
> the next include is still visited.
>
> The first include should just set some variables.
> I tried to number this extension block either with   _.   or with s
> and since it matches, the function (setting some variables) have been done.
> After that, I want to go to the next include, which has a match for
> _91NNN.
> However, since the first match was already successful, the next includes
> are not visited anymore.
>
> How can I overcome this problem?
>
>
> bye
>
> Ronald Wiplinger
> _______________________________________________
> --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