Summary:ASTERISK-05132: [patch] GetVar breaks parameter schema
Reporter:Jon Hood (squinky86)Labels:
Date Opened:2005-09-22 19:04:44Date Closed:2011-06-07 14:11:56
Versions:Frequency of
Environment:Attachments:( 0) managerpatch
( 1) UPGRADE.txt.patch
Description:GetVar does not report responses in a way compliant with similar manager calls.
Suppose the following (">" means sent to manager, "<" means received):

>Action: SetVar
>Channel: IAX2/mark-0001
>Variable: test
>Value: AsteriskRocks
>Action: GetVar
>Channel: IAX2/mark-0001
>Variable: test

the following is received from the manager:
<Response: success
<test: AsteriskRocks

while, in order to keep with naming convention, it should be
<Response: success
<Variable: test
<Value: AsteriskRocks

This poses a problem for developers who rely on the manager interface using classes with set parameter names and no way to set dynamic parameters such as "test" in the above example.


Attached is a patch to make the manager respond to the GetVar action in a more standard (when compared to other functions) way.
Comments:By: twisted (twisted) 2005-09-22 19:15:42

Covered under the Asteria Solutions Group corporate disclaimer on file.

By: Russell Bryant (russell) 2005-09-22 23:02:12

Would you mind writing up a little note about this for UPGRADE.txt as well?

By: Jon Hood (squinky86) 2005-09-23 11:00:32

Feel free to modify it however you need:


* Previously, the behavior of the GetVar manager action reported the value
 of a variable in the following manner:
 name: value
 This has been changed to a manner similar to the SetVar action and is now
 Variable: name
 Value: value

By: Mark Spencer (markster) 2005-09-24 23:52:30

Fixed in CVS head.

By: Russell Bryant (russell) 2005-09-25 13:31:22

not changing this behavior in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:48:58.000-0600

Repository: asterisk
Revision: 6641

U   trunk/UPGRADE.txt
U   trunk/manager.c

r6641 | markster | 2008-01-15 15:48:57 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix GetVar manager action result (bug ASTERISK-5132)