summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2014-10-10 07:32:10 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2014-10-10 07:32:10 +0000
commit4c2aef333cd58a54f3ab9f1e7cd35fab8bb45500 (patch)
treed6d22364c8f9cb54b02b9d7e55891ef3da7f2763
parentbbc56596fda47dfeecda1e2c14446444d427e340 (diff)
chan_sip: Fix dialog leak resulting from missing ACK to re-INVITE.
If a device re-INVITEs at the same time as the dialog is hung up, and if then the ACK to the re-INVITE never reaches Asterisk, chan_sip would fail to destroy the dialog after a while. This resulted in (most prominently) file handle leaks. (Patch reindented by me.) ASTERISK-20784 #close ASTERISK-15879 #close Reported by: Torrey Searle, Nitesh Bansal Patches: reinvite_ack_timeout.patch uploaded by Torrey Searle (License #5334) patch_asterisk_20784.txt uploaded by Nitesh Bansal (License #6418) Reviewboard: https://reviewboard.asterisk.org/r/4052/ (testcase can be found at r4051) ........ Merged revisions 425068 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 425069 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 425070 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@425071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9ea43af99..b02d5b1a4 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4100,6 +4100,11 @@ static int retrans_pkt(const void *data)
append_history(pkt->owner, "DialogKill", "Killing this failed dialog immediately");
}
}
+ } else if (pkt->owner->pendinginvite == pkt->seqno) {
+ ast_log(LOG_WARNING, "Timeout on %s on non-critical invite transaction.\n", pkt->owner->callid);
+ pkt->owner->invitestate = INV_TERMINATED;
+ pkt->owner->pendinginvite = 0;
+ check_pendings(pkt->owner);
}
if (pkt->method == SIP_BYE) {