[asterisk-users] Included context

Artifex Maximus artifexor at gmail.com
Tue Sep 26 15:59:03 MST 2006


Great idea but I am looking for more informative answer than 'might
accidentally happen something'.

But anyway here is the result for your pleasure:

calling with context1:
    -- Executing NoOp("Zap/32-1", "CONTEXT IS: context1 DIAL") in new stack
    -- Executing Wait("Zap/32-1", "1") in new stack
    -- Executing Playback("Zap/32-1", "context1") in new stack
    -- Executing Wait("Zap/32-1", "1") in new stack
    -- Executing Hangup("Zap/32-1", "") in new stack
  == Spawn extension (context1, s, 5) exited non-zero on 'Zap/32-1'
    -- Executing NoOp("Zap/32-1", "CONTEXT IS: context1 HANGUP") in new stack
    -- Hungup 'Zap/32-1'

calling with context2:
    -- Executing NoOp("Zap/32-1", "CONTEXT IS: context2 DIAL") in new stack
    -- Executing Wait("Zap/32-1", "1") in new stack
    -- Executing Playback("Zap/32-1", "context2") in new stack
    -- Executing Wait("Zap/32-1", "1") in new stack
    -- Executing Hangup("Zap/32-1", "") in new stack
  == Spawn extension (context2, s, 5) exited non-zero on 'Zap/32-1'
    -- Executing NoOp("Zap/32-1", "CONTEXT IS: context2 HANGUP") in new stack
    -- Hungup 'Zap/32-1'

calling with context4 (which includes context2):
    -- Executing NoOp("Zap/32-1", "CONTEXT IS: context4 DIAL") in new stack
    -- Executing Wait("Zap/32-1", "1") in new stack
    -- Executing Playback("Zap/32-1", "context4") in new stack
    -- Executing Wait("Zap/32-1", "1") in new stack
    -- Executing Hangup("Zap/32-1", "") in new stack
  == Spawn extension (context4, s, 5) exited non-zero on 'Zap/32-1'
    -- Executing NoOp("Zap/32-1", "CONTEXT IS: context4 HANGUP") in new stack

So looks like ${CONTEXT} is equal with originating context.

bye,
Zsolt

On 9/26/06, C F <shmaltz at gmail.com> wrote:
> How about trying Noop(CONTEXT IS: ${CONTEXT}) before you post it? but
> now that you have posted just try it and report back.
>
> On 9/26/06, Artifex Maximus <artifexor at gmail.com> wrote:
> > Hello,
> >
> > For example I have this dialplan:
> >
> > [context1]
> > exten => s,1,Noop
> > exten => s,n,Dial(...)
> > exten => s,n,Playback(${CONTEXT})
> > exten => s,n,Hangup
> >
> > [context2]
> > include => context1
> >
> > [context3]
> > include => context1
> >
> > Then I make dial-out call files with context2, context3, etc. What is
> > the value of ${CONTEXT} in that case? Still context1 because it's
> > physically there or context2, context3 because I am included from
> > there (so in a way logically is there). I didn't find any exact answer
> > that's why I'm asking here.
> >
> > bye,
> > Zsolt


More information about the asterisk-users mailing list