[asterisk-dev] Variable Inheritance, Setting Channel Variables outside of current context

Peter Beckman beckman at purplecow.com
Thu May 18 08:32:17 MST 2006


On Thu, 18 May 2006, Johansson Olle E wrote:

> I think it's appropriate to ask for help on these lists if you're writing
> docs.

  I will do my best to research before I post.

>>> No. Variables do not have any relationship to contexts, and channel is
>>> never 'active' in more than one context.
>> 
>> At a time, or ever?  Can't I Goto(new-context|600|1) and jump into a new
>> context in a given channel?  Or does that change the channel?
>> 
> You do not seem to grasp the basic concept of a dialplan context.
>
> As we told you, it's a point of reference for execution. The channel
> variable exist for the duration of a channel, a call. Some of them are
> copied when one channel creates a new channel by using dial().
>
> The context has nothing to do with it. When you goto, you change
> the destination of the call (which will be reflected in the CDR) and
> point of execution in the dialplan. It does not really "change the
> channel" or affect the variables, except for those builtin global
> variables that references the current point of execution in the dialplan.

  My comment was about a channel going into and out of several contexts
  during a call.  I understand that the execution of the dialplan is linear,
  and that a context is merely a "function" of sorts, which jumps to that
  part of the dialplan, executes, then returns to the next action after the
  call to the different context (if that different context allows it).

  I do (now) understand that variables are attached to the channel, not
  contexts.

  Thanks!

Beckman
---------------------------------------------------------------------------
Peter Beckman                                                  Internet Guy
beckman at purplecow.com                             http://www.purplecow.com/
---------------------------------------------------------------------------



More information about the asterisk-dev mailing list