aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-25 22:09:01 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-01-25 22:09:01 +0000
commit75b6fe8aee0d3a065ed1e87aa3cad3118177a296 (patch)
treebaa2f5b5096c1b99bf42a8f233cf3a05ebe7a044 /channels/chan_sip.c
parentd8bd03cc61d7365cf09c9b0bec0b12a1a4567924 (diff)
Merged revisions 303960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r303960 | twilson | 2011-01-25 16:02:42 -0600 (Tue, 25 Jan 2011) | 23 lines Merged revisions 303906 via svnmerge from 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: http://svn.digium.com/svn/asterisk/branches/1.8@303962 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f49c438ce..5fa5bdc66 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3448,6 +3448,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);
}