Transfers: Make Asterisk set ATTENDEDTRANSFER/BLINDTRANSFER more reliably

There were still a few cases in which ATTENDEDTRANSFER and BLINDTRANSFER
wouldn't be set on channels involved with blind and attended transfers.
This would happen with features that were initialized by channel driver
specific mechanisms in multiparty calls. This patch resolves those cases
while attempted to keep the behavior for setting those variables as
consistent as possible.

(closes issue AFS-24)
Review: https://reviewboard.asterisk.org/r/3040/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Jonathan Rose
2013-12-13 20:04:41 +00:00
parent f22ac347fc
commit 95795aa36b
5 changed files with 66 additions and 13 deletions

View File

@@ -954,6 +954,19 @@ enum ast_transfer_result ast_bridge_transfer_blind(int is_external,
enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_transferee,
struct ast_channel *to_transfer_target);
/*!
* \brief Set the relevant transfer variables for a single channel
*
* Sets either the ATTENDEDTRANSFER or BLINDTRANSFER variable for a channel while clearing
* the opposite.
*
* \param chan Channel the variable is being set for
* \param value Value the variable is being set to
* \param is_attended false set BLINDTRANSFER and unset ATTENDEDTRANSFER
* true set ATTENDEDTRANSFER and unset BLINDTRANSFER
*/
void ast_bridge_set_transfer_variables(struct ast_channel *chan, const char *value, int is_attended);
/*!
* \brief Get a container of all channels in the bridge
* \since 12.0.0