summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c5
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;
}