System information

Handling Timed-Out Parked Calls with the comebacktoorigin Option
This option configures the behavior of call parking when the parked call times out (see
the parkingtime option). comebacktoorigin can have one of two values:
yes (default)
When the parked call timeout is exceeded, Asterisk will attempt to send the call
back to the peer that parked this call. If the channel is no longer available to
Asterisk, the caller will be disconnected.
no
This option would be used when you want to perform custom dialplan function-
ality on parked calls that have exceeded their timeouts. The caller will be sent into
a specific area of the dialplan where logic can be applied to gracefully handle the
remainder of the call (this may involve simply returning the call to a different ex-
tension, or performing a lookup of some sort).
You also may need to take into account calls where the originating channel cannot
handle a returned parked call. If, for example, the call was parked by a channel that is
also a trunk to another system, there would not be enough information to send the call
back to the correct person on that other system. The actions following a timeout would
be more complex than comebacktoorigin=yes could handle gracefully.
Parked calls that time out with comebacktoorigin=no will always be sent into the par
kedcallstimeout context.
The dialplan (and contexts) were discussed in detail in Chapter 6.
The extension they will be sent to will be built from the name of the channel that parked
the call. For example, if a SIP peer named 0004F2040808 parked this call, the extension
will be SIP_0004F2040808.
If this extension does not exist, the call will be sent to the s extension in the parked
callstimeout context instead. Finally, if the s extension of parkedcallstimeout does not
exist, the call will be sent to the s extension of the default context.
Additionally, for any calls where comebacktoorigin=no, there will be an extension of
SIP_0004F2040808 created in the park-dial context. This extension will be set up to do
a Dial() to SIP/0004F2040808.
† We hope you realize that the actual extension will be related to the channel name that parked the call,
and will not be SIP_0004F2040808 (unless Leif sells you the Polycom phone from his lab).
224 | Chapter 11:Parking and Paging