Support externally initiated parking requests; remove some dead code

This patch does the following:
 * It adds support for externally initiated parking requests. In particular,
   chan_skinny has a protocol level message that initiates a call park.
   This patch now supports that option, as well as the protocol specific
   mechanisms in chan_dahdi/sig_analog and chan_mgcp.
 * A parking bridge features virtual table has been added that provides
   access to the parking functionality that the Bridging API needs. This
   includes requests to park an entire 'call' (with little or no additional
   information, thank you chan_skinny), perform a blind transfer to a parking
   extension, determine if an extension is a parking extension, as well as the
   actual "do the parking" request from the Bridging API.
 * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new
   functions
 * The removal of some - but not all - dead parking code from features.c

This also fixed blind transferring a multi-party bridge to a parking lot (which
was implemented, but had at least one code path where using the parking features
kK might not have worked)

Review: https://reviewboard.asterisk.org/r/2710

(closes issue ASTERISK-22134)
Reported by: Matt Jordan



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2013-08-01 20:55:17 +00:00
parent c8a91b5b01
commit 5c4b482471
13 changed files with 430 additions and 1630 deletions

View File

@@ -63,50 +63,6 @@ enum {
AST_FEATURE_FLAG_BYBOTH = (3 << 3),
};
/*!
* \brief Park a call via a masqueraded channel
*
* \param park_me Channel to be parked.
* \param parker Channel parking the call.
* \param timeout is a timeout in milliseconds
* \param extout is a parameter to an int that will hold the parked location, or NULL if you want.
*
* \details
* Masquerade the park_me channel into a new, empty channel which is then parked.
*
* \note Use ast_masq_park_call_exten() instead.
*
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_masq_park_call(struct ast_channel *park_me, struct ast_channel *parker, int timeout, int *extout);
/*!
* \brief Park a call via a masqueraded channel
* \since 1.8.9
*
* \param park_me Channel to be parked.
* \param parker Channel parking the call.
* \param park_exten Parking lot access extension
* \param park_context Parking lot context
* \param timeout is a timeout in milliseconds
* \param extout is a parameter to an int that will hold the parked location, or NULL if you want.
*
* \details
* Masquerade the park_me channel into a new, empty channel which is then parked.
*
* \retval 0 on success.
* \retval -1 on failure.
*/
int ast_masq_park_call_exten(struct ast_channel *park_me, struct ast_channel *parker, const char *park_exten, const char *park_context, int timeout, int *extout);
/*!
* \brief Determine if parking extension exists in a given context
* \retval 0 if extension does not exist
* \retval 1 if extension does exist
*/
int ast_parking_ext_valid(const char *exten_str, struct ast_channel *chan, const char *context);
/*! \brief Bridge a call, optionally allowing redirection */
int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer,struct ast_bridge_config *config);