C. Dialplan Functions

In addition to dialplan applications, which have been part of Asterisk almost from the very beginning, Asterisk 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 Appendix B, “Dialplan Applications”). 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 ...

Get Practical Asterisk 1.4 and 1.6: From Beginner to Expert now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.