[Asterisk-Dev] PATCH - Adds a set'able text string for each channel

Adam Goryachev mailinglists at websitemanagers.com.au
Wed May 19 20:36:52 MST 2004


On Wed, 2004-05-19 at 02:37, James Golovich wrote:
> On Tue, 18 May 2004, Adam Goryachev wrote:
> > OK, basically the patch allows the manager api to set a "string" on a
> > specific channel. This string is kept with the channel until the channel
> > is destroyed/hungup. So, it is kept through parking, transfers, etc. (At
> > least, I assume this is so... haven't really tested it that much yet).
> > 
> > It also adds a new event to tell everyone else listening on manager
> > interfaces that the text has been set for that channel.
> > 
> > This is used to store 'bits' of data with a channel within asterisk
> > without needing to use a seperate sql db.
> > 
> 
> I really don't see a reason to bloat the ast_channel struct with this.
> Why don't you simply use a channel variable to store your arbitrary info
> in?  There might not be an easy way to set channel variable with manager
> interface currently, but it should be easy to implement

Hmmm, this is an interesting idea... It would allow setting of the text
from the dialplan as well.  I suppose the main question is whether the
variables are indeed specific to that channel, or if they are global? I
don't want them 'stepping' on each other...

It sounds like what I want to do is simply use the same manager
interface like this:
Action: Setvar
Channel: Zap/1-1
Variable: mytext
Value: blahblah

This would be the same as:
Setvar(mytext=blahblah)
when channel zap/1-1 was still running through the dialplan.

Comments/suggestions are welcome.

I'll look into this further and let you know what I work out.

Regards,
Adam




More information about the asterisk-dev mailing list