Don't destruct sessions prematurely. Especially not when we want reliable retransmiss...
authorOlle Johansson <oej@edvina.net>
Sat, 9 Sep 2006 12:44:36 +0000 (12:44 +0000)
committerOlle Johansson <oej@edvina.net>
Sat, 9 Sep 2006 12:44:36 +0000 (12:44 +0000)
commit5a622d032e9756c64eb3e45a119899112e427654
tree88b07ba3d4690f3cb0288895afb81553394250cb
parent01714e962b5bcfd0d9cb86d78038d207c58421e6
Don't destruct sessions prematurely. Especially not when we want reliable retransmissions...

If this works properly, we might have to check 1.2 to implement a backport.

The theory is that if you get a final reply in a session, it is ok to destroy the session.
If you send a final reply, you need to keep the session open for potential retransmits
from the other side. If you send a HANGUP/CANCEL, wait to the other side confirms
or until you have a timeout. If you send HANGUP/CANCEL/ACK reliably, don't destroy
the session so that you cancel the needed retransmits.

I will have to change the timer to 64*T1, but that will be a separate patch. That will
mean that if we know the roundtrip time, we can destroy sessions quicker.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c