Appendix C. Functions in the dialplan

In addition to dialplan applications, which have been part of Asterisk almost from the very beginning, Asterisk also supports functions as of Asterisk 1.2. This is part of a long-standing effort to make Asterisk behave more like a programming environment. In contrast to applications, functions may not be called directly. Instead, they are called inside applications and return a value, or -- in a departure from the classical definition of a function -- they may even be written to using the application Set() (see Section B.110, “Set()). Function names are always written in uppercase letters. Surprisingly, functions are written in the same way as variables, inside curly braces and preceded by a $ character ( ${} ). This is necessary because strings are not always bounded by quotation marks.
To find out which functions are currently available in your installation, enter show functions and show function FUNCTIONNAME or core show functions and core show function FUNCTIONNAME (depending on your Asterisk version) in the CLI.[78]Note that these commands are case-sensitive. Function names must be written entirely in uppercase.


[78] Command Line Interface. This may be invoked with asterisk -r.