summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-07-24 18:31:04 +0000
committerMark Michelson <mmichelson@digium.com>2009-07-24 18:31:04 +0000
commit554c5e62d0e31e00279844aee99750baf825a53f (patch)
treebf66667ff95c17c4b4c7c8be5319e92b2fc6484b
parent17e2d9fdbc21d62124ff204415ae65ed8d36990a (diff)
Merged revisions 208587 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r208587 | mmichelson | 2009-07-24 13:26:50 -0500 (Fri, 24 Jul 2009) | 10 lines Only send a BYE when hanging up a channel that is up. For cases where Asterisk sends an INVITE and receives a non 2XX final response, Asterisk would follow the INVITE transaction by immediately sending a BYE, which was unnecessary. (closes issue #14575) Reported by: chris-mac ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 35ca1409f..4d89ae03c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6060,7 +6060,9 @@ static int sip_hangup(struct ast_channel *ast)
}
/* Send a hangup */
- transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
+ if (oldowner->_state == AST_STATE_UP) {
+ transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
+ }
} else {
/* Note we will need a BYE when this all settles out