Example One
/*!
* \brief Park a call
* \param chan channel parking the call
* \param peer call leg to be parked
* \param timeout hold time until call returns to 'out exten'
* \param extout extension to return to after timeout
* Lock the parkinglot list, look for a free parking lot,
* setup callback for when timeout ia reached, place call in parking context
* create manager event, check see if timeout is reached.
* \note We put the user in the parking list, then wake up the
* parking thread to be sure it looks after these channels too
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_park_call(struct ast_channel *chan, struct ast_channel *peer, int timeout, int *extout)
Example Two
/*!
* \brief masqurade a call to be parked
* \param rchan channel parking a call
* \param peer channel to be parked
* \param timeout how long to stay parked
* \param extout extension to call after timeout
* This function creates a new channel, stores which context/extension was called from
* then calls park_call to finish up.
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_masq_park_call(struct ast_channel *rchan, struct ast_channel *peer, int timeout, int *extout)