]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't prematurely stop SIP session timer
authorTerry Wilson <twilson@digium.com>
Mon, 16 Jan 2012 20:06:45 +0000 (20:06 +0000)
committerTerry Wilson <twilson@digium.com>
Mon, 16 Jan 2012 20:06:45 +0000 (20:06 +0000)
When Asterisk is the UAS (incoming call, endpoint is re-inviting) the SIP session timer expires after half the time the sip endpoint indicates in the Session-expires header in proc_session_timer(). The session timer was being stopped totally and being handled as an error case instead of running again until the second expiry. This patch treats the half-time expiry as a non-error case and continues the timer until the true expiry.

(closes issue ASTERISK-18996)
Reported by: Thomas Arimont
Tested by: Thomas Arimont
Patches: session_timer_fix.diff by Terry Wilson (License #5357)
  based on session_timer.patch by Thomas Arimont (License #5525)

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

channels/chan_sip.c

index fee3c9f3e1b902695a71892008eb507b3407c676..636cf7c5225de390cb8b8c8cd082a8b22e1092b1 100644 (file)
@@ -25832,6 +25832,8 @@ static int proc_session_timer(const void *vp)
                        ast_softhangup_nolock(p->owner, AST_SOFTHANGUP_DEV);
                        ast_channel_unlock(p->owner);
                        sip_pvt_unlock(p);
+               } else {
+                       res = 1;
                }
        }