diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-01-25 20:50:59 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-01-25 20:50:59 +0000 |
commit | d4c987b707a372cf8a31ea5fb7d9eea1bae19cb5 (patch) | |
tree | ec91edaed2ab9b3ffd713b8849b749ed837e02f6 | |
parent | 76931c67d3aeead7e37cabdfb04ca93debf9099a (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@303906 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 374af6174..55cb54a82 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2094,6 +2094,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."); |