[asterisk-bugs] [Asterisk 0011943]: Feature to write variables to existing channels other than your own (func chanvar)

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Feb 7 08:16:55 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11943 
====================================================================== 
Reported By:                ramonpeek
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   11943
Category:                   Functions/func_logic
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             02-06-2008 15:08 CST
Last Modified:              02-07-2008 08:16 CST
====================================================================== 
Summary:                    Feature to write variables to existing channels
other than your own (func chanvar)
Description: 
Many, many times I ran into a dialplan issue where I wanted to set a
variable in the called channel whilst the dialplan was running in the
calling channel.
To my frustration an application like ImportVar() existed but something
like ExportVar() did not.

After bumping into the issue a bit too often I deciced to write it myself
:-)
It probably took me less time writing the patch than it took finding out
ways to realize this feature with the current set of applications &
functions :-(

Anyway...
I started out writing the patch for 1.4.17 and called it 'ExportVar'.
But after finding out it was deprecated in the svn-trunk and talking to
Digium (Qwell) about it,
I decided to create a new logical function in func_logic called
'CHANVAR'.
This feature includes read & write making function 'ImportVar' & 'IMPORT'
both obsolete.
Since function 'IMPORT' is only in teh svn-trunk perhaps it should be
removed or deprecated if this patch gets submitted. 

This is how the new feature works;

To read a variable from another channel;
- Set(CHANVAR(channel,variable)=value)

To write a variable to another channel;
- Set(varname=${CHANVAR(channel,variable)})


PS:
For everyone that wants to add this feature (themselves) to Asterisk
1.4.17 a path to backport to 1.4.17 is also uploaded.
====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 02-07-08 08:16  
---------------------------------------------------------------------- 
And the real reason I don't want this added is that I can't distinguish in
the bugtracker between competant and incompetant people.  All people know
is if Asterisk does something unpredictable, that's bad, and I WILL have to
deal with bug reports in the future if this goes in.  That is precisely why
I have suggested alternative ways of doing this and why ImportVar was fine,
but the corresponding ExportVar was rejected.

So for my own sanity (and the collective sanity of the rest of the
development team), this should not go in.  This would be closed already,
but Russell has accepted responsibility for this issue, so I'll let him
make the final decision. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-07-08 08:16  Corydon76      Note Added: 0081844                          
======================================================================




More information about the asterisk-bugs mailing list