diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-15 13:01:52 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-15 13:01:52 +0000 |
commit | 45a7cf8fa4a0ff6581a5f4632ab1b61a01dc2687 (patch) | |
tree | 618c78e200a5df6025fd527a2cc35bc6adc95356 /apps/app_queue.c | |
parent | 242c0242aed9ce57dd4393ec3f97117c2e140009 (diff) |
Add support for setting the Reason header when cancelling a call in the queue
because someone else answered. Previously, only dial() was supported.
EDV-102
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168636 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 85d15881f..ada7da82d 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2228,9 +2228,13 @@ static void hangupcalls(struct callattempt *outgoing, struct ast_channel *except struct callattempt *oo; while (outgoing) { + /* If someone else answered the call we should indicate this in the CANCEL */ /* Hangup any existing lines we have open */ - if (outgoing->chan && (outgoing->chan != exception)) + if (outgoing->chan && (outgoing->chan != exception)) { + if (exception) + ast_set_flag(outgoing->chan, AST_FLAG_ANSWERED_ELSEWHERE); ast_hangup(outgoing->chan); + } oo = outgoing; outgoing = outgoing->q_next; if (oo->member) |