text
stringlengths
0
152
You can verify that your changes have taken place through the CLI command fea
tures show.
Also, since we are introducing an AGI script here, there are some commands that
must be run to make the referenced AGI script available to Asterisk.
$ sudo cp ~/src/asterisk-16.<TAB>/agi/agi-test.agi /var/lib/asterisk/agi-bin/
$ sudo chown asterisk:asterisk /var/lib/asterisk/agi-bin/*
$ sudo chmod 755 /var/lib/asterisk/agi-bin/*
Make sure you test out your application map before you turn it over to your users!
Dynamic Feature-Map Creation from the Dialplan
You can create feature maps from the dialplan directly, making the definition of a fea‐
ture (and its DTMF mapping) dynamic, on a per-channel basis. This is done with the
FEATURE() and FEATUREMAP() dialplan functions. Valid values for FEATUREMAP()
include the following, which set or retrieve the DTMF sequence used to trigger the
functionality:
atxfer
Attended transfer
blindxfer
Blind transfer
automon
Auto Monitor() (call recording)
disconnect
Call disconnect
parkcall
Call parking
automixmon
Auto MixMonitor() (call recording)
With FEATUREMAP(), the function can be used to retrieve the current DTMF sequence
for that functionality:
exten => 232,1,Noop(Current DTMF for parkcall: ${FEATUREMAP(parkcall)})
Or you can use the DTMF sequence for a feature function on the current channel:
exten => 233,1,NoOp()
same => n,Set(FEATUREMAP(parkcall)=*9)
same => n,Noop(DTMF for parkcall now: ${FEATUREMAP(parkcall)})
features.conf
|
193
If you want to set the parking timeout for a channel, you can do so with the FEA
TURE() function. It contains a single argument, parkingtime, which is a value in sec‐
onds before the parked call is returned to the caller (or destination, depending on
how you’ve configured parking):
exten => 234,1,NoOp()
same => n,Set(FEATURE(parkingtime)=60)
Application Map Grouping
If you have a lot of features that you need to activate for a particular context or exten‐
sion, you can group several features together in an application map grouping, so that
one assignment of the DYNAMIC_FEATURES variable will assign all of the designated
features of that map.
The application map groupings are added at the end of the features.conf file. Each
grouping is given a name, and then the relevant features are listed:
[shifteight]
unpauseMonitor => *1 ; custom key mapping
pauseMonitor => *2 ; custom key mapping
agi_test => ; no custom key mapping
If you want to specify a custom key mapping to a feature in an
application map grouping, simply follow the => with the key map‐
ping you want. If you do not specify a key mapping, the default key
map for that feature will be used (as found in the [featuremap]
section). Regardless of whether you want to assign a custom key
mapping or not, the => operator is required.
In the dialplan, you would assign this application map grouping with the Set()
application:
same => Set(__DYNAMIC_FEATURES=shifteight) ; use the double underscore if you want
; to ensure both call legs have the
; variable assigned.
Parking and Paging
Although these two features are completely separate from each other, they are so