From: Terry Wilson Date: Wed, 15 Jun 2011 18:06:24 +0000 (+0000) Subject: Fix DYNAMIC_FEATURES X-Git-Tag: 1.4.42-rc2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcddfdc148568703987d3061817d9e24439a16d7;p=thirdparty%2Fasterisk.git Fix DYNAMIC_FEATURES DYNAMIC_FEATURES were broken by a recent DTMF change. This patch makes sure that dynamic features are also checked when deciding whether or not to pass DTMF through or store it for interpreting. (closes issue ASTERISK-17914) Reported by: vrban git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@323732 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_features.c b/res/res_features.c index 20ccc5f80c..6585225303 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1653,8 +1653,12 @@ int ast_feature_detect(struct ast_channel *chan, struct ast_flags *features, cha /*! \brief Check if a feature exists */ static int feature_check(struct ast_channel *chan, struct ast_flags *features, char *code) { + char *chan_dynamic_features; + ast_channel_lock(chan); + chan_dynamic_features = ast_strdupa(S_OR(pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"),"")); + ast_channel_unlock(chan); - return feature_interpret_helper(chan, NULL, NULL, code, 0, NULL, features, FEATURE_INTERPRET_CHECK, NULL); + return feature_interpret_helper(chan, NULL, NULL, code, 0, chan_dynamic_features, features, FEATURE_INTERPRET_CHECK, NULL); } static void set_config_flags(struct ast_channel *chan, struct ast_channel *peer, struct ast_bridge_config *config)