From a5b38b604c9ecec8cfb209439a94476834dbb7fc Mon Sep 17 00:00:00 2001 From: Kevin Harwell Date: Thu, 14 Jan 2016 14:42:57 -0600 Subject: bridge_basic: don't cache xferfailsound during an attended transfer The xferfailsound was read from the channel at the beginning of the transfer, and that value is "cached" for the duration of the transfer. Therefore, changing the xferfailsound on the channel using the FEATURE() dialplan function does nothing once the transfer is under way. This makes it so the transfer code instead gets the xferfailsound configuration options from the channel when it is actually going to be used. This patch also fixes a potential memory leak of the props object as well as making sure the condition variable gets initialized before being destroyed. ASTERISK-25696 #close Change-Id: Ic726b0f54ef588bd9c9c67f4b0e4d787934f85e4 --- include/asterisk/features_config.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/asterisk/features_config.h') diff --git a/include/asterisk/features_config.h b/include/asterisk/features_config.h index b15759ba6..baaff183b 100644 --- a/include/asterisk/features_config.h +++ b/include/asterisk/features_config.h @@ -101,6 +101,21 @@ struct ast_features_xfer_config { */ struct ast_features_xfer_config *ast_get_chan_features_xfer_config(struct ast_channel *chan); +/*! + * \brief Get the transfer configuration option xferfailsound + * + * \note The channel should be locked before calling this function. + * \note The returned value has to be freed. + * + * If no channel is provided, then option is pulled from the global + * transfer configuration. + * + * \param chan The channel to get configuration options for + * \retval NULL Failed to get configuration + * \retval non-NULL The xferfailsound + */ +char *ast_get_chan_features_xferfailsound(struct ast_channel *chan); + /*! * \brief Configuration relating to call pickup */ -- cgit v1.2.3