Call Parking to a specific extension

Hello, I am trying to figure out how to park a calls to a specific extension rather than Asterisk’s “valet” method.

Example would be inbound call to UserA, and then UserA would park the call at 802 by transferring the call to 802. UserB would then be able to pickup the parked call by dialing 802 (or featurecode+802).

Any help would be greatly appreciated!

You can totally do that.

Look at the Park() Application.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Park

exten => _70Z,1,ExecIf($["${EXTENSION_STATE(${EXTEN}@parkedcalls_kiniston)}" = "INUSE"]?ParkedCall(,${EXTEN}))
exten => _70Z,n,Set(PARKINGEXTEN=${EXTEN})
exten => _70Z,n,Park(parkinglot_kiniston,t(300)c(kiniston-operator,0,1))

My example assumes your parking lot is named parkinglot_kiniston , with an extension range in the 700’s and a context defined of parkedcalls_kiniston and parking hints enabled.

johnkiniston, this is exactly what I needed to get on the right track. Thank you!

For the sake of a full answer, here’s the working configuration:

res_parking.conf

[LocationA-parking]
context => LocationA-parking-lot
parkext => 799 ; REQUIRED dummy variable
parkpos => 800-809
courtesytone = beep
parkedplay = caller
comebacktoorigin = no
parkedmusicclass = default
parkext_exclusive=yes ; REQUIRED
parkinghints = yes ; REQUIRED

extensions.conf

[LocationA-dialplan-context]
include => LocationA-parking-lot

; Call Park/Pickup
exten => _80X,1,ExecIf($[“${EXTENSION_STATE(${EXTEN}@LocationA-parking-lot)}” = “INUSE”]?ParkedCall(LocationA-parking,${EXTEN}))
exten => _80X,n,Set(PARKINGEXTEN=${EXTEN})
exten => _80X,n,Park(LocationA-parking,t(300)c(LocationA-timeout-context,0,1))

[LocationA-timeout-context]
exten => 0, 1, Dial(PJSIP/${EXTEN})

Couple things,

You don’t want to include LocationA-parking-lot anywhere in your dialplan or the autogenerated extensions will cause problems.

You do want to make some hints tho for your extensions, I forgot about that, Add this to your dialplan-context instead

exten => _80X,hint,park:${EXTEN}@LocationA-parking-lot

And in your timeout context unless you have a extension 0 to dial your dial won’t work to return the call somewhere sane.

So you’re saying to forgo the res_parking piece of it and do everything manually? The res_parking automatically creates the hints for me (which you can see if you do a “dialplan show”). I guess I’m just curious as to what issues I could run into by including it? I didn’t notice any during my testing.

Also, for the extension 0, you’re right that it needs to exist. I threw it in the example to show the complete solution.

Yes res_parking creates hints but it also creates extensions to pick up the parked calls which you don’t want included in your dialplan.