Skip to content

Set()

Synopsis

Set channel variable or function value.

Description

This function can be used to set the value of channel variables or dialplan functions. When setting variables, if the variable name is prefixed with '_', the variable will be inherited into channels created from the current channel. If the variable name is prefixed with '__', the variable will be inherited into channels created from the current channel and all children channels.

Note

If (and only if), in /etc/asterisk/asterisk.conf, you have a '[compat]' category, and you have 'app_set = 1.4' under that, then the behavior of this app changes, and strips surrounding quotes from the right hand side as it did previously in 1.4. The advantages of not stripping out quoting, and not caring about the separator characters (comma and vertical bar) were sufficient to make these changes in 1.6. Confusion about how many backslashes would be needed to properly protect separators and quotes in various database access strings has been greatly reduced by these changes.

Syntax

Set(name=value)
Arguments
  • name

  • value

See Also

Generated Version

This documentation was generated from Asterisk branch 16 using version GIT