diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-29 17:08:22 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-29 17:08:22 +0000 |
commit | 10712d118c170020a39fe18f2394bb0172c9f5f5 (patch) | |
tree | de5917bbd7b2b261e6caa93c380ee86afd42f892 /channels/chan_sip.c | |
parent | 28cfff1ebc779edec3ffdd581f8b5e8f35e68a8c (diff) |
Fix "cancel answered elsewhere" through app_queue with members in chan_local.
Also, implement a private cause code (as suggested by Tilghman). This works with
chan_sip, but doesn't propagate through chan_local.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172318 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2fbb77e65..b99e92607 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5509,8 +5509,11 @@ static int sip_hangup(struct ast_channel *ast) ast_debug(1, "Asked to hangup channel that was not connected\n"); return 0; } - if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) { + if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE) || ast->hangupcause == AST_CAUSE_ANSWERED_ELSEWHERE) { ast_debug(1, "This call was answered elsewhere"); + if (ast->hangupcause == AST_CAUSE_ANSWERED_ELSEWHERE) { + ast_debug(1, "####### It's the cause code, buddy. The cause code!!!\n"); + } append_history(p, "Cancel", "Call answered elsewhere"); p->answered_elsewhere = TRUE; } |