login | register
Sun 07 of Sep, 2008 [06:36 UTC]

voip-info.org

Discuss [3] History

Asterisk cmd ParkAndAnnounce

Created by: oej,Last modification on Fri 21 of Dec, 2007 [13:14 UTC] by JustRumours

Synopsis

Park and Announce

Description

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

 ParkAndAnnounce(announce:template|timeout|dial|return_context)

  • 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!

features.conf

 [general]
 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

extensions.conf

 include => parkedcalls

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

 [parkedcalls]
 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

We've never used the "announce" part and I'm wondering if there's an option I can't seem to find to disable the announce so the transfer happens faster. If I send the announce to an invalid extension it still seems to park the call fast enough. I suppose I could create an extension that just answers and hangs up to get rid of the warning messages.
Okay, I am now specifying Local/parkannounce as the announce extension. That extension answers and hangs up. The calls park and MOH starts immediately.

Removing announcement in the source code

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); 

See also



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


Comments

Comments Filter
222

333Advanced features avail?

by psm, Wednesday 09 of January, 2008 [14:37:56 UTC]
Duplicate, feel free to delete.
222

333Advanced features avail?

by psm, Wednesday 09 of January, 2008 [14:31:53 UTC]
Hi all,

I'm literally just starting out in Asterisk, with a view to deploying it "for real". I'm not satisfied that Asterix can do as I request though. I've done *a lot* of reading around over the last few days, so please don't think I've not tried to RTFM first!

What I'd like is...

1. Somebody calls up, they get "parked"
2. I then get called and get the announcement
3. I can press #1 to answer, or #2 to send them to my voicemail

I simply can't figure out if this is possible... I can obviously Park&Announce a call, but then need to hangup in order to retrieve the call (generally sat on #701) - a nod in the right direction would be seriously appreciated.

Cheers, P.

222

333return_context

by , Tuesday 22 of June, 2004 [17:23:45 UTC]
In the dial plan it seems OK to have it like -> context,exten, prio

But from an agi exec command it seems to only accept -> context|exten|prio

From the source also, the return_context seems "pipe" separated :

working = return_context;
context = strsep(&working, "|");
exten = strsep(&working, "|");
if(!exten) {
 /* Only a priority in this one */
 priority = context;


the return context is either :
context|exten|prio
exten|prio
prio