Asterisk config features.conf
Created by: JustRumours,Last modification on Fri 14 of Mar, 2008 [23:31 UTC] by jfinstrom
features.conf
Formerly known as parking.conf , renamed to features.conf as of July 17, 2004.Configuration of Asterisk call parking
parkext => 700 ; What ext. to dial to park
parkpos => 701-720 ; What extensions to park calls on
context => parkedcalls ; Which context parked calls are in, need to INCLUDE this in extensions.conf
parkingtime => 45 ; Number of seconds a call can be parked for (default is 45 seconds)
; after park times out, call will ring back to the original extension
Note: You must restart * after making changes to features.conf, or reload res_features.so
Added to Asterisk with v1.2 release:
Allow to use something other than *8 to pickup a ringing line in your call group.
This feature can be used via the features.conf file in your asterisk directory:
pickupexten = *8 ; Configure the pickup extension. Default is *8
Some SIP phones and ATA's can interfere with service codes like *8 so you can change the pickupexten to some other value. For example, if your extensions are in the range of 201-299, you may want to pick 200.
;transferdigittimeout => 3 ; Number of seconds to wait between digits when transferring a call
;courtesytone = beep ; Sound file to play to the parked caller
; when someone dials a parked call
;xfersound = beep ; to indicate an attended transfer is complete
;xferfailsound = beeperr ; to indicate a failed transfer
;adsipark = yes ; if you want ADSI parking announcements
;pickupexten = *8 ; Configure the pickup extension. Default is *8
;featuredigittimeout = 500 ; Max time (ms) between digits for
; feature activation. Default is 500
[featuremap]
;blindxfer => #1 ; Blind transfer, default is #
;disconnect => *0 ; Disconnect (for attended transfer)
;automon => *1 ; One Touch Record
;atxfer => *2 ; Attended transfer
[applicationmap]
; don't use e.g #9 for applicationmap or featuremap unless you have changed 'blindxfer' from # to e.g. #1 !
testfeature => *9,callee,Playback,tt-monkeys ;Play tt-monkes to callee if *9 was pressed - use 'callee' or 'caller'
testfeature3 => *9,self/caller,Monitor,wav|myoutfile|mb
; note the use of the pipe char '|' here to separate arguments to monitor application
If you set the variable __TRANSFER_CONTEXT, then that context will be used (note the two leading underscores).
More on this: You need to set a TRANSFER_CONTEXT, either for the transferer or transferee channel. I dont know why, but res_features give priority to the transferee TRANSFER_CONTEXT, if not found, then use the transferrer TRANSFER_CONTEXT. That context is used to match the extension to dial. So you can set this var to any context you want.
New in 1.2.19 and 1.4.5: Finally the borders between attended and blind transfer begin to blur, making Asterisk behave much more like traditional PBX systems: An attended transfer no longer fails if the transferer hangs up before answer, therefore only the attended transfer method needs to be taught to the users. For Asterisk 1.6 this behaviour has been enhanced with a callback feature. See patches 8413 and 9338; this has also been discussed in this German forum.
Using the blindxfer in [featuremap] section you can redefine the transfer key. For example, if the blindxfer is set to "##", transfer only happens when you press the "#" key twice very quickly. This solves a problem using Asterisk phones to call IVR systems such as those used by banks and credit card companies - "Enter you account number followed by the # key".
blindxfer allows unattended or blind transfers. It works like this:
While on a conversation with another party, you dial the blindxfer sequence. Asterisk says "Transfer" then gives you a dial tone, while putting the other party on hold. You dial the transferee number and the caller is put through to that number immediately. Your line drops. The caller ID displayed to the person receiving the transferred call is exactly the same as the caller ID presented to you.
atxfer allows attended transfer or supervised transfer. It works like this:
While on conversation with another party, you dial the atxfer key sequence. Asterisk says "Transfer" then gives you a dial tone, while putting the other party on hold. You dial the transferee number and talk with the transferee to introduce the call, then you can hang up and the other party will be connected with the transferee. In case the transferee does not want to answer the call, he/she simply hangs up and you will be back to your original conversation. Press the disonnect key sequence, set to *0 by default, to return yourself to the original caller.
Note The caller ID presented to the person you are trying to transfer the call to is not what you would expect - Asterisk sets your caller ID to be the extension the call originally arrived at which may not be the same as the extension the call was answered at. There doesn't appear to be any way of getting the correct caller ID.
Note: You MUST use the T and/or t options in the command Dial() in order to allow the caller and/or callee to use any transfer feature
applicationmap
In this Section an user can define a key-sequence, and an application and the party on which this application is executed when the sequence is pressed. The Syntax is:[applicationmap]
<featurename> => <keysequence>,<caller|callee>,<App> [,App Args]
Note that multiple application arguments need to be separated by | and not a comma!
Use the CLI command "show features" to verify the currently active application map.
Note: You can use the Goto() application to jump anywhere into the extensions conf, or Macro if you would like to be returned to the other party after macro execution, or use Transfer() for e.g. a pre-defined transfer target could be hard-coded into features.conf
See bug/patch 3764 for more details.
Usage cases
This feature aims especially the problem of a channel driver which has special options:- In case of zaptel it could be the echo cancel enabling and disabling.
- In other channel drivers like mISDN we could enable/disable crypting, changing the volume, enable/disable echo-cancel and enable disable dtmf detection during a call.
- A call center Agent could Change the field of the CDR depending on the call "value".
Details
You will need to use assign the channel variable DYNAMIC_FEATURES to permit the use of the applicationmap:Set(DYNAMIC_FEATURES=hangup#play#testfeature)
Although this feature is a nice idea, there is one major problem - audio output is only sent to one party (the caller or callee). e.g. in the case of:
testfeature => *9,callee,Playback,tt-monkeys
The caller hears nothing whilst the callee hears the babbling monkeys. The caller has no idea whether the audio has started (i.e. that s/he pressed the correct key sequence) and has no idea when it has finished. Whilst the callee is listening to the monkeys, the caller cannot use any other application map. This means that even if the following is defined as well:
testfeature2 => *8,caller,Playback,tt-monkeys
The caller cannot dial *9*8 so they get to hear the message also.
Without the caller knowning when the monkeys have finished babbling, there's very little point to this feature.
By way of example, consider the case of a money lender who has to play compliance messages to the caller. If the compliance message is pre-recorded rather than read live from a script, then the company's liabilities are reduced. So, we would like to replace "tt-monkeys", above, with "compliancemessage". However, the caller doesn't know how long the message is (it could be changed at any time by the management), so how will they know that it has been/is being played?
Note on the media path: When Asterisk knows/assumes that if it is not in the media path, it also won't be able to receive DTMF frames that trigger the applicationmap feature. However, if you are using SIP INFO for DTMF signaling, then it should 'just work', since when Asterisk sees the appropriate DTMF frames it will cause the bridge to 'break' and bring the media path back.
Known bugs
- Asterisk 1.2.9.1: Goto() and Gosub() appear to be broken in conjunction with applicationmap. Workaround: Use Dial() with a Local channel (and possibly "/n")
Open questions:
- Does the application map that has been activated for a user cause or require Asterisk to stay in the media path?
- What exactly does the "disconnect" feature do, and when would it make sense (useful example)?
Examples
One-touch recordingexten => 123,1,Set(DYNAMIC_FEATURES=automon) ; enable One-touch
exten => 123,2,Dial(SIP/phone100,,wW) ; wW allow one-touch recording
IN and OUT audio will be split into two files, and will be available on your asterisk server in the following directory:
/var/spool/asterisk/monitor
The two files can then be joined by using sox:
soxmix *in.wav *out.wav output.wav
If desired, the mixed-channel file can then be compressed into a low bitrate MP3 using lame:
lame --preset voice -v -B 64 -a output.wav output.mp3
Note: I don't know since when it was done but in 1.2 is for sure. If you have sox installed, the automon feature will mix both legs of a call at the end. By default, the recorded filename is auto-${EPOCH}-caller-calee. You can change the caller-callee part of it by setting TOUCH_MONITOR variable.
Actually, you don't have to do a Set to enable it, which would require it to be enabled before every single Dial statement.
Instead, to enable automon globally, you can in extensions.conf put:
[globals]
DYNAMIC_FEATURES=>automon
Which will enable it for any Dial() or Queue() call with the options w or W set.
By default, automon will use wav to record calls, but you can specify another format by setting TOUCH_MONITOR_FORMAT to the prefered one.
Note: The monitor runs on the "callee" channel, so channel variables which affect the end of the monitor process (such as MONITOR_EXEC, which controls how the in/out files are mixed) must be set on the "callee" channel using the M(macro) option of the Dial command.
Examples
One Touch Recording (applicationmap) with WAV to MP3 Conversion Macro.
extensions.conf :
[macro-apprecord]
exten => s,1,GotoIf($["${XAD}" = "0" | "${XAD}" = ""]?startrec:stoprec)
exten => s,n(startrec),Playback(startmonitor)
exten => s,n,Set(XAD=1)
exten => s,n,Set(FILENAME=${TIMESTAMP}-OUT${CALLERID(number)}-^-${UNIQUEID})
exten => s,n,Set(MONITOR_EXEC_ARGS=&& nice -n 19 /usr/local/bin/lame -b 96 -t -F -m m --bitwidth 16 --quiet "/var/spool/asterisk/monitor/${FILENAME}.wav" "/var/spool/asterisk/monitor/${FILENAME}.mp3" && rm -f "/var/spool/asterisk/monitor/${FILENAME}.wav")
exten => s,n,Monitor(wav,${FILENAME},m)
exten => s,n,MacroExit
exten => s,n(stoprec),StopMonitor
exten => s,n,Set(XAD=0)
exten => s,n,Playback(stopmonitor)
exten => s,n,MacroExit
features.conf :
apps => *9,caller,Macro,apprecord
To get call back from blind transfer
Based on a recipe left in comments area by Mr.Wanchat C. on Friday 28 of April, 2006 [05:14:16]I simply use the ${BLINDTRANSFER} variable to callback when no one answer the transfered call.
exten => _XXX,1,NoOp(${UNIQUEID} - ${DATETIME} - ${CALLERID} => ${EXTEN}) ; Add some call tracing
exten => _XXX,2,Dial(SIP/${EXTEN},5,mTt)
exten => _XXX,3,Gotoif($["x${BLINDTRANSFER}"="x"]?4:5)
exten => _XXX,4,Hangup
exten => _XXX,5,Set(tx=${BLINDTRANSFER:0:7})
exten => _XXX,6,Set(CALLERID(all)=RET_${EXTEN} <${CALLERID(num)}>)
exten => _XXX,7,Dial(${tx},,mTt)
exten => _XXX,8,Hangup
;
exten => _XXX,103,Set(tx=${BLINDTRANSFER:0:7})
exten => _XXX,104,Wait(5)
exten => _XXX,105,Set(CALLERID(all)=ERR_${EXTEN} <${CALLERID(num)}>)
exten => _XXX,106,Dial(${tx},,mTt)
exten => _XXX,107,Hangup
The recipe above is valid only for SIP channels. For IAX2 channels you will need to change the ${BLINDTRANSFER:0:7} line.
(this recipe is working on an Asterisk v. 1.2 - please double check for errors before going live)
See also
- Asterisk cmd Record and/or Asterisk cmd Monitor
- Asterisk call parking
- PBX CallTransfer
- AstQueueIcon: Alternative free queue solution utilizing the call parking feature instead of the queue application. As the queue app stays out of the media path, features like call forwarding will not be denied for the agents.
Go back to Asterisk

Comments
333Dropp agent when press *
I have got the same problem.
333Re: Features not detecting digits after the # or *
333Features not detecting digits after the # or *
333
Asterisk 1.4.12.1
333Problem With BlindXfer
<p>
We're using Linksys IP Phone SPA922's, Sangoma cards with FXO to connect to a T1 MUX with four POTS lines on it.
<p>
I've got blindxfer set to ## in features.conf:
<p>
blindxfer => ## ; Blind Transfer
<p>
When booting, the kernel logs:<br>
WANPIPE(tm) Hardware Support Module Beta10-2.3.4 (c) 1994-2006 Sangoma Technologies Inc<br>
wanpipe: AFT-A200-SH FXO/FXS card found (HDLC rev.6), cpu(s) 1, bus #6, slot #0, irq #217<br>
wanpipe: Allocating maximum 1 devices: wanpipe1 - wanpipe1.<br>
WANPIPE: TDM Codecs Initialized<br>
(etc.)
<p>
Where's the # key going? Why does the circuit seem to go to lunch until you hang up?
333To get call back
333To get call back
disconnect => *0 works when attended transfer is not done inside the QUEUE.
333To get call back
But when this is implemented in queue, pressing the *0 or *8 has a different behavior. When a caller dials an extension and is placed in queue and then an agent picks up the call in queue, the caller can be transferred (attended). While the caller is on hold and the agent is connected to the extension where the caller wants to be transferred to, and the agent wants to drop the call and go back to the caller, when he/she presses *0, the agent is dropped and the caller is connected to the extension where it wants to be transferred. This is very odd or am I missing something in the configuration?
I also noticed that the agent is instantaneously dropped when * is pressed not even reaching 0.
333
To get call back
We use the disconnect (*0) to get back the call after an unsuccessful attended transfer, and pickupexten (*8) also to get the call back after a disattended transfer (if you dialed a valid extension)333Need to add include => featuremap to extensions?
After trawling the mailing list archives, someone said about adding " include => featuremap " into the extensions.conf at a relevant context point.
It now all seems to work, however when doing an extensions reload from the CLI it complains of " tries includes non-existant context 'featuremap' "
Is this a bit of a fudge? And did the mailing list point me in the right direction? Hope this either helps you or you can cast some light on it for me.