diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-02 19:02:24 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-02 19:02:24 +0000 |
commit | 9764d18ab1b24633dfbe1ce6bc846f52f2ddd8b8 (patch) | |
tree | 49b361fc00c9abec7db74dd6472b13a8d8b54e59 /apps | |
parent | 8120b9ff2ea2219f33f3616b8cc1b202e4759594 (diff) |
This reverts the changes I made for 11583; will
reviewboard this before committing again...
reopened 11583 until all Russell's issues are
resolved.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172929 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_dial.c | 57 |
1 files changed, 2 insertions, 55 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 3fff300ca..849c0c527 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -560,7 +560,6 @@ struct chanlist { uint64_t flags; }; -static int detect_disconnect(struct ast_channel *chan, char code); static void hanguptree(struct chanlist *outgoing, struct ast_channel *exception, int answered_elsewhere) { @@ -1055,8 +1054,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, } if (ast_test_flag64(peerflags, OPT_CALLER_HANGUP) && - detect_disconnect(in, f->subclass)) { - ast_verb(3, "User requested call disconnect.\n"); + (f->subclass == '*')) { /* hmm it it not guaranteed to be '*' anymore. */ + ast_verb(3, "User hit %c to disconnect call.\n", f->subclass); *to = 0; strcpy(pa->status, "CANCEL"); ast_cdr_noanswer(in->cdr); @@ -1100,58 +1099,6 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, return peer; } -static char featurecode[FEATURE_MAX_LEN + 1] = ""; - -static int detect_disconnect(struct ast_channel *chan, char code) -{ - struct feature_interpret_result result; - int x; - struct ast_flags features; - int res = FEATURE_RETURN_PASSDIGITS; - struct ast_call_feature *feature; - char *cptr; - const char *dynamic_features = pbx_builtin_getvar_helper(chan, "DYNAMIC_FEATURES"); - int len; - - len = strlen(featurecode); - if (len >= FEATURE_MAX_LEN) { - featurecode[0] = '\0'; - } - cptr = &featurecode[strlen(featurecode)]; - cptr[0] = code; - cptr[1] = '\0'; - - memset(&features, 0, sizeof(struct ast_flags)); - ast_set_flag(&features, AST_FEATURE_DISCONNECT); - - ast_features_lock(); - - res = ast_feature_detect(chan, &features, featurecode, &result, dynamic_features); - - if (res != FEATURE_RETURN_STOREDIGITS) - featurecode[0] = '\0'; - - - if (result.builtin_feature && result.builtin_feature->feature_mask & AST_FEATURE_DISCONNECT) { - ast_features_unlock(); - return 1; - } - - for (x = 0; x < result.num_dyn_features; ++x) { - feature = result.dynamic_features[x]; - if (feature->feature_mask & AST_FEATURE_DISCONNECT) { - ast_features_unlock(); - return 1; - } - } - - ast_features_unlock(); - - return 0; -} - - - static void replace_macro_delimiter(char *s) { for (; *s; s++) |