For this recipe, we will use the Custom-Context module, which is a third-party module developed by the FreePBX community. This module allows us to create contexts to which extensions will subscribe. In Asterisk, a context is a part of the dialplan that executes certain actions. The contexts can work independently from each other or can be included together. Using Custom-Context, we can create as many contexts as desired. With this module, we can restrict extensions to access certain outbound routes/trunks statically or in a specific period of time. For our example, we will restrict one extension to only internal and local calls. If the user of this extension tries to call a long-distance number, he will get a congestion tone.
Download the module to our PC/workStation/laptop from this link: http://www.freepbx.org/support/documentation/module-documentation/third-party-unsupported-modules. Click on the Module Admin link and the Upload Module...