Upgrade 3CX to v18 and get it hosted free!

Asterisk Manager API Action GetVar

Author image

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

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.