Keywords: asterisk

## Extensions

To specify an extension in a context, the following syntax is used. If more than one application is be called in an extension, they can be listed in order inside of a block.

-     context default {
          1234 => Playback(tt-monkeys);
          8000 => {
               NoOp(one);
               NoOp(two);
               NoOp(three);
          };
          _5XXX => NoOp(it's a pattern!);
      }

Two optional items have been added to the AEL syntax, that allow the specification of hints, and a keyword, regexten, that will force the numbering of priorities to start at 2.

The ability to make extensions match by CID is preserved in AEL; just use '/' and the CID number in the specification. See below.

-     context default {

          regexten _5XXX => NoOp(it's a pattern!);
      }

-     context default {

          hint(Sip/1) _5XXX => NoOp(it's a pattern!);
      }

-     context default {

          regexten hint(Sip/1) _5XXX => NoOp(it's a pattern!);
      }

The regexten must come before the hint if they are both present.

CID matching is done as with the extensions.conf file. Follow the extension name/number with a slash (/) and the number to match against the Caller ID:

-     context zoombo
      {
        819/7079953345 => { NoOp(hello, 3345); }
      }

In the above, the 819/7079953345 extension will only be matched if the CallerID is 7079953345, and the dialed number is 819. Hopefully you have another 819 extension defined for all those who wish 819, that are not so lucky as to have 7079953345 as their CallerID!