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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.