aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-24 18:31:35 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-24 18:31:35 +0000
commitacb7f75b1a04d995e084931ab2b7eb317c350a37 (patch)
treee3ff8814f14245ec790d6628810ee9eedc9d52ea /channels
parent52c8f5f2c9cfaafeadb4478bbe87522d24f732d0 (diff)
Merged revisions 208588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r208588 | mmichelson | 2009-07-24 13:31:04 -0500 (Fri, 24 Jul 2009) | 16 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.0@208589 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-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 dbaf1bdcd..5312eaf9d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5103,7 +5103,9 @@ static int sip_hangup(struct ast_channel *ast)
if (p->trtp)
textqos = ast_rtp_get_quality(p->trtp, NULL);
/* 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);
+ }
/* Get RTCP quality before end of call */
if (p->do_history) {