[asterisk-dev] Global channel variables
Johan Wilfer
johan at wilfer.se
Sat Nov 24 09:48:55 CST 2007
>
> > So the obvious fix for this is to segregate those variables into a
> separate
> > space, where both channels can be aware that those values are shared and
> > could be changed at any time. And that is the solution in your first
> > paragraph (astdb or another database), which you seem to be opposed
> to. We
> > like that solution better, because it avoids obvious race conditions.
>
> Is there a possibility where channel and it's child channel are
> executing simultenously? Child channel is created only inside some
> application - Dial, Queue, etc. So, whenever that application exits,
> child channel is either destroyed or masquaraded. I don't see any
> situation where child channel is executing in parralel with parent
> channel.
Couldn't an application like SetChannelVar(channel, var=data..) be the
solution here? Like the Set application,
but with a channel name to set the var in. If you use this application you
will be aware with possible race conditions
and deal with them in your dialplan.
We currently have applications like ChannelRedirect that work similar to
this, and I guess this application could
be used in these situations also.
To give the child channel the name of the parent you would just set a
variable with _ or __ and then use it in
this application.
Just a thought..
/Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20071124/8e9020ee/attachment.htm
More information about the asterisk-dev
mailing list