From d00882108fabd3798aa6566aa5697d82459e753e Mon Sep 17 00:00:00 2001 From: Jonathan Rose Date: Thu, 22 May 2014 15:52:30 +0000 Subject: res_pjsip_refer: Fix bugs involving Parking/PJSIP/transfers PJSIP would never send the final 200 Notify for a blind transfer when transferring to parking. This patch fixes that. In addition, it fixes a reference leak when performing blind transfers to non-bridging extensions. Review: https://reviewboard.asterisk.org/r/3485/ ........ Merged revisions 414400 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414403 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/bridge.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include/asterisk/bridge.h') diff --git a/include/asterisk/bridge.h b/include/asterisk/bridge.h index 8768fe1be..d23d4b5bc 100644 --- a/include/asterisk/bridge.h +++ b/include/asterisk/bridge.h @@ -903,6 +903,22 @@ enum ast_transfer_type { AST_BRIDGE_TRANSFER_MULTI_PARTY, }; +/*! + * \brief AO2 object that wraps data for transfer_channel_cb + */ +struct transfer_channel_data { + void *data; /*! Data to be used by the transfer_channel_cb -- note that this + * pointer is going to be pointing to something on the stack, so + * it must not be used at any point after returning from the + * transfer_channel_cb. */ + int completed; /*! Initially 0, This will be set to 1 by either the transfer + * code or by transfer code hooks (e.g. parking) when the + * transfer is completed and any remaining actions have taken + * place (e.g. parking announcements). It will never be reset + * to 0. This is used for deferring progress for channel + * drivers that support deferred progress. */ +}; + /*! * \brief Callback function type called during blind transfers * @@ -914,7 +930,7 @@ enum ast_transfer_type { * \param user_data User-provided data needed in the callback * \param transfer_type The type of transfer being completed */ -typedef void (*transfer_channel_cb)(struct ast_channel *chan, void *user_data, +typedef void (*transfer_channel_cb)(struct ast_channel *chan, struct transfer_channel_data *user_data, enum ast_transfer_type transfer_type); /*! -- cgit v1.2.3