Get Variable

Since 0.4.0 AGI Commands Found this useful? Upvote it. ×

Gets a channel variable.

Last reviewed 2026-04-14

get variable variablename
Description

Returns 0 if variablename is not set. Returns 1 if variablename is set and returns the variable in parentheses.

Example return code: 200 result=1 (testvariable)

Arguments
  • variablename required

User Notes

No notes yet. Be the first to contribute a tip or example.

Contribute a note

Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.

Moderated before publishing. Email never shown.