Asterisk Manager API Action GetVar

Asterisk Manager API Action: GetVar


Action: Getvar
Parameters: Channel, Variable, ActionID

ActionID is an optional parameter for message matching.

Example :
SEND:
ACTION: GetVar
Channel: SIP/5060-44d225d0
Variable: extension


RECEIVE:
Response: Success
extension: 17065551419


RECEIVE ON ERROR:
Response: Error
Message: No such channel


RECEIVE IF CHAN, BUT NO VAR:
Response: Success
varname: (null)


NOTE : Will not work for built-in variables like LANGUAGE !


ATTENTION: ASTERISK RELEASE 1.2
In the version 1.2, the behavious has been changed for the following:
(the result is always in the "Value" field)

RECEIVE:
Response: Success
Value: 17065551419



Asterisk Manager API Action: GetVar


Action: Getvar
Parameters: Channel, Variable, ActionID

ActionID is an optional parameter for message matching.

Example :
SEND:
ACTION: GetVar
Channel: SIP/5060-44d225d0
Variable: extension


RECEIVE:
Response: Success
extension: 17065551419


RECEIVE ON ERROR:
Response: Error
Message: No such channel


RECEIVE IF CHAN, BUT NO VAR:
Response: Success
varname: (null)


NOTE : Will not work for built-in variables like LANGUAGE !


ATTENTION: ASTERISK RELEASE 1.2
In the version 1.2, the behavious has been changed for the following:
(the result is always in the "Value" field)

RECEIVE:
Response: Success
Value: 17065551419



Created by: flobi, Last modification: Thu 18 of Sep, 2008 (14:01 UTC) by spamblock
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+