Overview
Subroutines in Asterisk are defined similarly to standard dialplan contexts and are referred to as Macros and Gosubs. They are invoked via the Macro and Gosub applications, but may also be invoked in the context of Pre-Dial Handlers, Pre-Bridge Handlers and Hangup Handlers via the use of flags and arguments within other applications.