aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-18 22:06:27 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-18 22:06:27 +0000
commit1e8f29aefb7e0a93c8791500402c28265f0f00e7 (patch)
tree0da8910be34bf160269aec7299d6612f1bdf3376 /apps
parent96c7a6056d368322f63ab3d69b3f62f3b81fe7d1 (diff)
Merged revisions 65172 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r65172 | murf | 2007-05-18 14:56:20 -0600 (Fri, 18 May 2007) | 1 line This update will fix the situation that occurs as described by 9717, where when several targets are specified for a dial, if any one them reports FAIL, the whole call gets FAIL, even though others were ringing OK. I rearranged the priorities, so that a new disposition, NULL, is at the lowest level, and the disposition get init'd to NULL. Then, next up is FAIL, and next up is BUSY, then NOANSWER, then ANSWERED. All the related set routines will only do so if the disposition value to be set to is greater than what's already there. This gives the intended effect. So, if all the targets are busy, you'd get BUSY for the call disposition. If all get BUSY, but one, and that one rings is not answered, you get NOANSWER. If by some freak of nature, the NULL value doesn't get overridden, then the disp2str routine will report NOANSWER as before. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@65200 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 91e7325f2..fdf24cc71 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -696,6 +696,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
/* Got hung up */
*to = -1;
+ ast_cdr_noanswer(in->cdr);
strcpy(status, "CANCEL");
if (f)
ast_frfree(f);
@@ -709,6 +710,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
+ ast_cdr_noanswer(in->cdr);
*result = f->subclass;
strcpy(status, "CANCEL");
ast_frfree(f);
@@ -721,6 +723,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "User hit %c to disconnect call.\n", f->subclass);
*to=0;
+ ast_cdr_noanswer(in->cdr);
strcpy(status, "CANCEL");
ast_frfree(f);
return NULL;
@@ -749,6 +752,10 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
}
if (!*to && (option_verbose > 2))
ast_verbose(VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", orig);
+ if (!*to || ast_check_hangup(in)) {
+ ast_cdr_noanswer(in->cdr);
+ }
+
}
return peer;