System information

3. Defining which channel the feature will be activated on, and (optionally) which
participant is allowed to activate the feature (the default is to allow both channels
to use/activate this feature).
4. Giving the name of the application that this map will trigger, and its arguments.
5. Providing an optional music on hold (MOH) class to assign to this feature (which
the opposite channel will hear when the application is executing). If you do not
define any MOH class, the caller will hear only silence.
Here is an example of an application map that will trigger an AGI script:
agi_test => *6,self/callee,AGI(agi-test.agi),default
Since applications spawned from the application map are run outside
the PBX core, you cannot execute any applications that trigger the
dialplan (such as Goto(), Macro(), Background(), etc.). If you wish to use
the application map to spawn external processes (including executing
dialplan code), you will need to trigger an external application through
an AGI() call or the System() application. Point being, if you want any-
thing complex to happen through the use of an application map, you
will need to test very carefully, as not all things will work as you
might expect.
To use an application map, you must declare it in the dialplan by setting the
DYNAMIC_FEATURES variable somewhere before the Dial() command that connects the
channels. Use the double underscore modifier on the variable name in order to ensure
that the application map is available to both channels throughout the life of the call.
For example:
exten => 101,n,Set(__DYNAMIC_FEATURES=agi_test)
exten => 101,n,Dial(SIP/0000FFFF0002)
If you want to allow more than one application map to be available on
a call, you will need to use the # symbol as a delimiter between multiple
map names:
Set(__DYNAMIC_FEATURES=agi_test#my_other_map)
The reason why the # character was chosen instead of a simple comma
is that older versions of the Set() application interpreted the comma
differently than more recent versions, and the syntax for application
maps has never been updated.
Don’t forget to reload the features module after making changes to the features.conf file:
*CLI> features reload
You can verify that your changes have taken place through the CLI command features
show. Make sure you test out your application map before you turn it over to your users!
226 | Chapter 11:Parking and Paging