Asterisk cmd ParkAndAnnounce


Park and Announce


Park a call into the parkinglot and announce the call over an extension.


  • announce template: colon seperated list of files to announce, the word PARKED will be replaced by a say_digits of the ext the call is parked in
  • timeout: time in seconds before the call returns into the return context.
  • dial: The app_dial style resource to call to make the announcement. Console/dsp calls the console.
  • return_context: the goto style label to jump the call back into after timeout. default=prio+1

Development (Jan 2006)

In the current Asterisk version, there is one parking lot per PBX. This leads to problems when you have multiple user groups in your PBX. With this patch, you can enable multiple parking lots, in order to
  • Give each company using a virtual PBX it's own parking lot
  • Give each department a parking lot
  • Give a manager a parking lot that the admin also can access
Please test this patch to Asterisk 1.3 (svn trunk). Check out the multiparking module, compile and read the sample configuration. If you're happy, tell me. If you stumble into problems, tell me. The place to give feedback is the bug tracker, bug 6113.

New in Asterisk 1.4: Patch/bug 5779 adds hint support for the Local channel construct which allows for monitoring of the parking lot/ parked calls (by checking for existence of a dialplan extension).

Example 1

Blind xfer to parking:

exten => _2XX,1,Answer
exten => _2XX,2,Wait(1)
exten => _2XX,3,ParkAndAnnounce(pbx-transfer:PARKED|7200|SIP/${EXTEN:1}|default,${EXTEN:1},1)

The user on exten 11 may now blind xfer to extension 211. It waits 1 second, calls back with the parking number.

Example 2

Blind xfer to parking:

exten => 200,1,ParkAndAnnounce(pbx-transfer:PARKED|60|${BLINDTRANSFER:0:7}|internal_phones|${BLINDTRANSFER:4:3}|1)

Anyone with a 3 digit extension can blind transfer to 200 and it will call them back by pulling their extension from the ${BLINDTRANSFER} variable. I tested this on asterisk 1.4.

Example 3: Parking and BLF (busy lamp field)

In the basic settings of my Grandstream GXP-2000, I setup the Multi-Purpose Key to use Asterisk BLF and assigned it the parking lot extension (201 in our case, 701 by default iirc). I then added hints in the extensions.conf for the parking lot extensions:

exten => 201,hint,park:201@parkedcalls ; syntax for Asterisk 1.4 and newer
exten => 201,1,Wait(1)
exten => 201,2,ParkedCall(201)

Of course in features.conf I've defined the context as parkedcalls (context => parkedcalls). Hope this helps, it took a lot of piecing together other examples to get it to come together

Example 4

In asterisk 1.4.14: The hint should point to the extension AND context defined in "features.conf" NOT to a REAL extension as you would expect!


parkext => 700 ; What extension to dial to park
parkpos => 701-706 ; What extensions to park calls on. These needs to be
; numeric, as Asterisk starts from the start position
; and increments with one for the next parked call.
context => parkedfeat ; Which context parked calls are in


include => parkedcalls

exten => 701,hint,park:701@parkedfeat
exten => 702,hint,park:702@parkedfeat
exten => 703,hint,park:703@parkedfeat

exten => 701,1,ParkedCall(701)
exten => 702,1,ParkedCall(702)
exten => 703,1,ParkedCall(703)
exten => 704,1,ParkedCall(704)

If above is not met you will end up with blf showing "in use" AFTER "dialplan reload" and not "idle"

Tip: Parking without announcement

In 1.8 you can remove the announcement by simply setting BLINDTRANSFER=1 before Park() like so:

exten => 700,1,Set(BLINDTRANSFER=1)
exten => 700,n,Park()

Removing announcement in the source code (pre-1.8)

I couldn't find a switch, so I commented line 426 out of res_features.c and recompiled - instant transfer now on Grandstream phones. Below is the line for future reference.

ast_say_digits(peer, pu->parkingnum, "", peer->language);

Note: In 1.6 the file is in main/features.c and the line number is 502.

See also

Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Created by: oej, Last modification: Wed 12 of Nov, 2014 (03:15 UTC) by mackey
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+