# Asterisk Project : Asterisk 13 Configuration_res_parking

Created and last modified by wikibot on Aug 11, 2014

This configuration documentation is for functionality provided by `res_parking`.

## res_parking.conf

### globals

Options that apply to every parking lot

#### Configuration Option Reference

Option Name | Type | Default Value | Regular Expression | Description
--- | --- | --- | --- | ---
`parkeddynamic` | `Boolean` | `no` | `false` | Enables dynamically created parkinglots.

### parking_lot

Defined parking lots for res_parking to use to park calls on

#### Configuration Option Reference

Option Name | Type | Default Value | Regular Expression | Description
--- | --- | --- | --- | ---
`context` | `String` | `parkedcalls` | `false` | The name of the context where calls are parked and picked up from.
`parkext` | `String` |  | `false` | Extension to park calls to this parking lot.
`parkext_exclusive` | `Boolean` | `no` | `false` | If yes, the extension registered as parkext will park exclusively to this parking lot.
`parkpos` | `Custom` | `701-750` | `false` | Numerical range of parking spaces which can be used to retrieve parked calls.
`parkinghints` | `Boolean` | `no` | `false` | If yes, this parking lot will add hints automatically for parking spaces.
`parkingtime` | `Unsigned Integer` | `45` | `false` | Amount of time a call will remain parked before giving up (in seconds).
`parkedmusicclass` | `String` |  | `false` | Which music class to use for parked calls. They will use the default if unspecified.
`comebacktoorigin` | `Boolean` | `yes` | `false` | Determines what should be done with the parked channel if no one picks it up before it times out.
`comebackdialtime` | `Unsigned Integer` | `30` | `false` | Timeout for the Dial extension created to call back the parker when a parked call times out.
`comebackcontext` | `String` | `parkedcallstimeout` | `false` | Context where parked calls will enter the PBX on timeout when comebacktoorigin=no
`courtesytone` | `String` |  | `false` | If the name of a sound file is provided, use this as the courtesy tone
`parkedplay` | `Custom` | `caller` | `false` | Who we should play the courtesytone to on the pickup of a parked call from this lot
`parkedcalltransfers` | `Custom` | `no` | `false` | Who to apply the DTMF transfer features to when parked calls are picked up or timeout.
`parkedcallreparking` | `Custom` | `no` | `false` | Who to apply the DTMF parking feature to when parked calls are picked up or timeout.
`parkedcallhangup` | `Custom` | `no` | `false` | Who to apply the DTMF hangup feature to when parked calls are picked up or timeout.
`parkedcallrecording` | `Custom` | `no` | `false` | Who to apply the DTMF MixMonitor recording feature to when parked calls are picked up or timeout.
`findslot` | `Custom` | `first` | `false` | Rule to use when trying to figure out which parking space a call should be parked with.
`courtesytone` |  |  |  | If set, the sound set will be played to whomever is set by parkedplay

#### Configuration Option Descriptions

##### context

This option is only used if parkext is set.

##### parkext

If this option is used, this extension will automatically be created to place calls into parking lots. In addition, if parkext_exclusive is set for this parking lot, the name of the parking lot will be included in the application's arguments so that it only parks to this parking lot. The extension will be created in `context`. Using this option also creates extensions for retrieving parked calls from the parking spaces in the same context.

##### parkpos

If parkext is set, these extensions will automatically be mapped in `context` in order to pick up calls parked to these parking spaces.

##### comebacktoorigin

Valid Options:

- `yes` - Automatically have the parked channel dial the device that parked the call with dial timeout set by the `parkingtime` option. When the call times out an extension to dial the PARKER will automatically be created in the `park-dial` context with an extension of the flattened parker device name. If the call is not answered, the parked channel that is timing out will continue in the dial plan at that point if there are more priorities in the extension (which won't be the case unless the dialplan deliberately includes such priorities in the `park-dial` context through pattern matching or deliberately written flattened peer extensions).
- `no` - Place the call into the PBX at `comebackcontext` instead. The extension will still be set as the flattened peer name. If an extension the flattened peer name isn't available then it will fall back to the `s` extension. If that also is unavailable it will attempt to fall back to `s@default`. The normal dial extension will still be created in the `park-dial` context with the extension also being the flattened peer name.

  Note

  Icon

  Flattened Peer Names - Extensions can not include slash characters since those are used for pattern matching. When a peer name is flattened, slashes become underscores. For example if the parker of a call is called `SIP/0004F2040001` then flattened peer name and therefor the extensions created and used on timeouts will be `SIP_0004F204001`.

  Note

  Icon

  When parking times out and the channel returns to the dial plan, the following variables are set:

- `PARKING_SPACE` - extension that the call was parked in prior to timing out.
- `PARKINGSLOT` - Deprecated. Use `PARKING_SPACE` instead.
- `PARKEDLOT` - name of the lot that the call was parked in prior to timing out.
- `PARKER` - The device that parked the call
- `PARKER_FLAT` - The flat version of `PARKER`

##### comebackcontext

The extension the call enters will prioritize the flattened peer name in this context. If the flattened peer name extension is unavailable, then the 's' extension in this context will be used. If that also is unavailable, the 's' extension in the 'default' context will be used.

##### courtesytone

By default, this tone is only played to the caller of a parked call. Who receives the tone can be changed using the `parkedplay` option.

##### parkedplay

- `no` - Apply to neither side.
- `caller` - Apply only to the call connecting with the call coming out of the parking lot.
- `callee` - Apply only to the call coming out of the parking lot.
- `both` - Apply to both sides.

  Note

  Icon

  If courtesy tone is not specified then this option will be ignored.

##### parkedcalltransfers

- `no` - Apply to neither side.
- `caller` - Apply only to the call connecting with the call coming out of the parking lot.
- `callee` - Apply only to the call coming out of the parking lot.
- `both` - Apply to both sides.

##### parkedcallreparking

- `no` - Apply to neither side.
- `caller` - Apply only to the call connecting with the call coming out of the parking lot.
- `callee` - Apply only to the call coming out of the parking lot.
- `both` - Apply to both sides.

##### parkedcallhangup

- `no` - Apply to neither side.
- `caller` - Apply only to the call connecting with the call coming out of the parking lot.
- `callee` - Apply only to the call coming out of the parking lot.
- `both` - Apply to both sides.

##### parkedcallrecording

- `no` - Apply to neither side.
- `caller` - Apply only to the call connecting with the call coming out of the parking lot.
- `callee` - Apply only to the call coming out of the parking lot.
- `both` - Apply to both sides.

##### findslot

- `first` - Always try to place in the lowest available space in the parking lot
- `next` - Track the last parking space used and always attempt to use the one immediately after.

### Import Version

This documentation was imported from Asterisk Version SVN-branch-13-r420717