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

Johansson Olle E olle at voop.com
Thu May 18 07:39:32 MST 2006


18 maj 2006 kl. 16.24 skrev Peter Beckman:

> On Wed, 17 May 2006, Kevin P. Fleming wrote:
>
>> Peter Beckman wrote:
>>
>>>  You did; I felt they were two different questions -- -users to  
>>> ask if it
>>>  could be done and how to do it, and -dev to ask how to document  
>>> it, and
>>>  potentially determine if it should be a requested feature or not.
>>
>> Documentation questions belong on asterisk-doc, not asterisk-dev.
>
>  Fair enough; are there people from -dev who monitor asterisk-doc for
>  code-specific questions?  Or once a code-specific question about
>  documentation comes up, is it appropriate to post in -dev?
>
I think it's appropriate to ask for help on these lists if you're  
writing
docs. We can't possibly monitor all lists. Seems like Kevin and I  
disagree
here ;-) I do occassionally monitor the -doc list too, but there's  
been too
much noice on that list. We don't want that to happen on this list,  
so we
are careful about what we allow. Make sure it's an advanced question not
covered somewhere else before you ask, and make sure that you've tried
to understand by staring at the source. There are comments in there.


>  If the process is "Check the CVS logs to see who has committed the  
> code in
>  question, then mail them directly" that's fine too; I want to get  
> docs
>  right AND not be annoying.
>
That's what I do for training material.

>>>  I used context to describe my location in a dialplan.  As I  
>>> understand it,
>>>  a channel can be active in several contexts.  When discussing  
>>> variable
>>>  inheritance between channels, shouldn't I mention in what  
>>> context I'm
>>>  setting and accessing those variables?
>>
>> 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.


/Olle




More information about the asterisk-dev mailing list