Application Map and Dynamic Features
Application Map and Dynamic Features
The [applicationmap] in features.conf lets you define custom DTMF sequences that trigger applications during an active bridged call. Combined with the [featuremap] for built-in features, this gives callers and agents in-call controls like transfers, recording, and custom actions.
Built-In Feature Map (features.conf)
[general]
transferdigittimeout => 3
pickupexten = *8
featuredigittimeout = 1000
atxfernoanswertimeout = 15
atxferdropcall = no
atxfercallbackretries = 2
[featuremap]
blindxfer => #1 ; Blind transfer (requires T/t in Dial options)
disconnect => *0 ; Disconnect call (requires H/h in Dial options)
automon => *1 ; One-touch Monitor recording (requires W/w)
atxfer => *2 ; Attended transfer (requires T/t)
parkcall => #72 ; Park the call (requires K/k)
automixmon => *3 ; One-touch MixMonitor recording (requires X/x)
Custom Application Map (features.conf)
[applicationmap]
; Syntax: name => dtmf,activate_on,Application,args[,moh_class]
testfeature => #9,peer,Playback,tt-monkeys
announce_time => *0,self,SayUnixTime
record_toggle => *4,self,MixMonitor,${UNIQUEID}.wav,b
Enabling Dynamic Features in Dialplan
[internal]
exten => _1XXX,1,NoOp(Internal call with dynamic features)
same => n,Set(__DYNAMIC_FEATURES=testfeature#announce_time#record_toggle)
same => n,Dial(PJSIP/${EXTEN},30,Ttx)
same => n,Hangup()
How it works
[featuremap]: Configures DTMF sequences for Asterisk's built-in bridged-call features. Each feature requires specific Dial() options:T/tfor transfers (caller/callee),W/wfor Monitor,X/xfor MixMonitor,K/kfor parking,H/hfor disconnect.[applicationmap]: Defines custom features. The syntax isname => dtmf_sequence,activate_on,Application,arguments.activate_onisself(run on the pressing channel) orpeer(run on the other channel).DYNAMIC_FEATURES: This channel variable enables specific application map entries for a call. Multiple features are separated by#. The double underscore__prefix causes the variable to inherit to both the calling and called channels.- Dial options: Features only work during bridged calls (after both sides answer). The Dial() option letters enable the built-in feature categories. Without the right option letter, the DTMF sequence will pass through as audio, not trigger the feature.
- MOH class: The optional last field in an application map entry specifies music on hold to play to the idle channel while the feature executes. Useful for features that take time (like Playback).
Tips
- Always use
__(double underscore) when settingDYNAMIC_FEATURESso it propagates to both channels. A single underscore_only propagates one level. - Reload features without restarting:
features reloadon the CLI. - Use
automixmoninstead ofautomonfor one-touch recording: MixMonitor produces a single mixed audio file instead of separate in/out files. - Verify active features with
channel show featureson the CLI during an active call. - The
applicationmapcannot use dialplan flow applications (Goto, Background, WaitExten). The exceptions areGosubandMacrosubroutines which must complete and return. - Group related features into feature groups in
features.conffor easier management across different call types.
User Notes
No notes yet. Be the first to contribute a tip or example.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.