]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 303906 via svnmerge from
authorTerry Wilson <twilson@digium.com>
Tue, 25 Jan 2011 22:02:42 +0000 (22:02 +0000)
committerTerry Wilson <twilson@digium.com>
Tue, 25 Jan 2011 22:02:42 +0000 (22:02 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r303906 | twilson | 2011-01-25 14:50:59 -0600 (Tue, 25 Jan 2011) | 16 lines

  Guard against retransmitting BYEs indefinitely

  In the case of an attended transfer (A calls B, A atxfers to C) where
  A becomes unreachable before replying to Asterisk's BYE, Asterisk can
  sometimes retransmit the BYE indefinitely. This is because
  __sip_autodestruct tests p->refer && !ast_test_flag(&p->flags[0],
  SIP_ALREADYGONE and will then transmit a BYE. When this BYE times out,
  it will not ever be marked as ALREADYGONE, so when __sip_autodestruct
  is called again, we end up starting the cycle over.

  This patch adds a call to sip_alreadygone(pkt->owner) in retrans_pkt
  in the case of a BYE that has timed out. This should prevent Asterisk
  from trying to transmit new BYE messages in the future.

  Review: https://reviewboard.asterisk.org/r/1077/
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@303960 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 6b45a48139d6e2d6157da244f9ee929c037741e9..2100df71d3506eb255ae1758115896eb477f43ae 100644 (file)
@@ -3869,6 +3869,7 @@ static int retrans_pkt(const void *data)
 
        if (pkt->method == SIP_BYE) {
                /* We're not getting answers on SIP BYE's.  Tear down the call anyway. */
+               sip_alreadygone(pkt->owner);
                if (pkt->owner->owner)
                        ast_channel_unlock(pkt->owner->owner);
                append_history(pkt->owner, "ByeFailure", "Remote peer doesn't respond to bye. Destroying call anyway.");