summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-08-26 07:40:32 -0300
committerJoshua Colp <jcolp@digium.com>2015-08-26 06:08:43 -0500
commitd03d09aad30320b2e80c6473021116982c91cee2 (patch)
tree262e36a5ef27982af9ae3d886746c12c2d043339 /channels
parent6b8734fe6890dfa4754b07eceaab52a4712297a9 (diff)
chan_sip: Allow call pickup to set the hangup cause.
The call pickup implementation in chan_sip currently sets the channel hangup cause to "normal clearing" if call pickup is successfully performed. This action overwrites the "answered elsewhere" hangup cause set by the call pickup code and can result in the SIP device in question showing a missed call when it should not. This change sets the hangup cause to "normal clearing" as a default initially but allows the call pickup to change it as needed. ASTERISK-25346 #close Change-Id: I00ac2c269cee9e29586ee2c65e83c70e52a02cff
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1888091b8..e385ddb53 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -24527,10 +24527,9 @@ static void *sip_pickup_thread(void *stuff)
struct ast_channel *chan;
chan = stuff;
+ ast_channel_hangupcause_set(chan, AST_CAUSE_NORMAL_CLEARING);
if (ast_pickup_call(chan)) {
ast_channel_hangupcause_set(chan, AST_CAUSE_CALL_REJECTED);
- } else {
- ast_channel_hangupcause_set(chan, AST_CAUSE_NORMAL_CLEARING);
}
ast_hangup(chan);
ast_channel_unref(chan);