diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-17 16:46:59 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-09-17 16:46:59 +0000 |
commit | 9c8bfa0c65f722919e1b7f9e2c912db08ca1e1e9 (patch) | |
tree | cc3078e8ad12acaaf945e8d0bc612d7e1be9f748 | |
parent | b9ac1bb271be3dd019f5d21d5af9b168708f2879 (diff) |
Handle the case where there are multiple dynamic features with the same digit
mapping, but won't always match the activated on/by access controls. In that
case, the code needs to keep trying features for a match.
(reported by Atis on the asterisk-dev list, patched by me)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82594 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | res/res_features.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/res/res_features.c b/res/res_features.c index b863be921..0cf317843 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -479,6 +479,7 @@ int ast_masq_park_call(struct ast_channel *rchan, struct ast_channel *peer, int #define FEATURE_RETURN_PASSDIGITS 21 #define FEATURE_RETURN_STOREDIGITS 22 #define FEATURE_RETURN_SUCCESS 23 +#define FEATURE_RETURN_KEEPTRYING 24 #define FEATURE_SENSE_CHAN (1 << 0) #define FEATURE_SENSE_PEER (1 << 1) @@ -966,7 +967,7 @@ static int feature_exec_app(struct ast_channel *chan, struct ast_channel *peer, if (sense == FEATURE_SENSE_CHAN) { if (!ast_test_flag(feature, AST_FEATURE_FLAG_BYCALLER)) - return FEATURE_RETURN_PASSDIGITS; + return FEATURE_RETURN_KEEPTRYING; if (ast_test_flag(feature, AST_FEATURE_FLAG_ONSELF)) { work = chan; idle = peer; @@ -976,7 +977,7 @@ static int feature_exec_app(struct ast_channel *chan, struct ast_channel *peer, } } else { if (!ast_test_flag(feature, AST_FEATURE_FLAG_BYCALLEE)) - return FEATURE_RETURN_PASSDIGITS; + return FEATURE_RETURN_KEEPTRYING; if (ast_test_flag(feature, AST_FEATURE_FLAG_ONSELF)) { work = peer; idle = chan; @@ -1090,8 +1091,11 @@ static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *p if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 " Feature Found: %s exten: %s\n",feature->sname, tok); res = feature->operation(chan, peer, config, code, sense, feature); - AST_LIST_UNLOCK(&feature_list); - break; + if (res != FEATURE_RETURN_KEEPTRYING) { + AST_LIST_UNLOCK(&feature_list); + break; + } + res = FEATURE_RETURN_PASSDIGITS; } else if (!strncmp(feature->exten, code, strlen(code))) res = FEATURE_RETURN_STOREDIGITS; |