Comments
Context Inclusion
One extension context can include the contents of another. For example, consider the following contexts:
Context "default":
Extension Description
101 Mark Spencer
102 Wil Meadows
0 Operator
Context "local":
Extension Description
_9NXXXXXX Local calls
include => "default"
Context "longdistance":
Extension Description
_91NXXNXXXXXX Long distance calls
include => "local"
Here we have defined three extensions:
* The context default permits dialing three telephone extensions: Mark, Wil, and the Operator.
* The context local has one extension pattern to permit dialing 7-digit numbers only (local calls), and also includes the context "default", thus also permitting a user to dial Mark, Wil, or the Operator.
* The context long distance has one extension pattern to permit dialing a long-distance call, and it also includes the context "local", thus permitting the user to make local calls and also to dial the extensions of Mark, Wil or the Operator.
Using extension contexts, you can carefully control who has access to toll services.
If more than one pattern matches a dialed number, Asterisk may not use the one you expect. See
* Sort Order of Extension Patterns.
Adding to an existing section (I believe this is a 1.4 feature; additional info on similar option are in doc/configuration.txt of asterisk src tree)
[section]
label = value
[section](+)
label2 = value2
In this case, the plus sign indicates that the second section (with the
same name) is an addition to the first section. The second section can
be in another file (by using the #include statement). If the section
name referred to before the plus is missing, the configuration will fail
to load.
Posted by sagitraz
The context is the first line of code and it correlates to the context you defined when configuring the individual VoIP, analog, digital, and/or IAX devices. Contexts are actually configuration contexts assigned to devices connecting to the Asterisk system. The device parameters and abilities are linked to the dialplan, which allows you to process the incoming and outgoing calls from the device.
The [globals] context is the only special context because the relationships established in this context are used in every other context in your dialplan. These relationships are generally coding expedients whereby a common name is used to replace a complex device ID, such as TRUNK=SIP/192.168.0.1/
Posted by carlos33