diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-12 17:46:14 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-12 17:46:14 +0000 |
commit | 4ba0ecb5f0bfbb1a84a8316d15d61b82e29fe610 (patch) | |
tree | 529d920a2dd51a17b4a58ff7bef8c7cb768f9532 /res | |
parent | d9d12264a3e070d6759c145b660b2c7f0a84e578 (diff) |
Correctly detect where a dynamic feature was activated. Before this patch,
the channel which initiated the bridge was always assumed to have been the one
which activated the dynamic feature. This patch corrects this.
(closes issue #11529, reported and patched by nic_bellamy)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@92510 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_features.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/res/res_features.c b/res/res_features.c index 7572aefa2..1bac49ce0 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1059,15 +1059,18 @@ static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *p struct ast_flags features; int res = FEATURE_RETURN_PASSDIGITS; struct ast_call_feature *feature; - const char *dynamic_features=pbx_builtin_getvar_helper(chan,"DYNAMIC_FEATURES"); + char *dynamic_features; char *tmp, *tok; - if (sense == FEATURE_SENSE_CHAN) + if (sense == FEATURE_SENSE_CHAN) { ast_copy_flags(&features, &(config->features_caller), AST_FLAGS_ALL); - else + dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"); + } else { ast_copy_flags(&features, &(config->features_callee), AST_FLAGS_ALL); + dynamic_features = pbx_builtin_getvar_helper(peer, "DYNAMIC_FEATURES"); + } if (option_debug > 2) - ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%d\n", chan->name, peer->name, sense, features.flags); + ast_log(LOG_DEBUG, "Feature interpret: chan=%s, peer=%s, sense=%d, features=%d dynamic=%s\n", chan->name, peer->name, sense, features.flags, dynamic_features); ast_rwlock_rdlock(&features_lock); for (x = 0; x < FEATURES_COUNT; x++) { |