Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Global variables are variables that don't live on one particular channel — they pertain to all calls on the system. They have global scope. There are two ways to set a global variable. The first is to declare the variable in the [docs:globals] section of extensions.conf, like this:

Code Block

You can also set global variables from dialplan logic using the GLOBAL() dialplan function along with the Set() application. Simply use the syntax:

Code Block

To retrieve the value of a global channel variable, use the same syntax as you would if you were retrieving the value of a channel variable.