[asterisk-commits] chan sip: Fix session timeout on retransmit of non-UDP packets (asterisk[11])
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Wed Sep 14 19:42:24 CDT 2016
    
    
  
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: chan_sip: Fix session timeout on retransmit of non-UDP packets
......................................................................
chan_sip: Fix session timeout on retransmit of non-UDP packets
Change-Id I1cd33453c77c56c8e1394cd60a6f17bb61c1d957 Enable Session-Timers for
SIP over TCP (and TLS) also disables SIP retransmits in chan_sip for non-UDP
connections, allowing the TCP layer to handle the retransmits. Unfortunately,
this caused sessions to be terminated with a retransmit timeout becasue it
stopped at the point of the first retrans call.
This patch waits for the 64*T1 timer to expire instead.
ASTERISK-19968
Change-Id: I844f26801aada10bc94e9bebe6e151f0a8443204
---
M channels/chan_sip.c
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
  Mark Michelson: Looks good to me, approved
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index b65f612..6fdb378 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4185,7 +4185,10 @@
 	pkt->retrans_stop_time = 64 * (pkt->timer_t1 ? pkt->timer_t1 : DEFAULT_TIMER_T1); /* time in ms after pkt->time_sent to stop retransmission */
 
 	if (!(p->socket.type & SIP_TRANSPORT_UDP)) {
+		/* TCP does not need retransmits as that's built in, but with
+		 * retrans_stop set, we must give it the full timer_H treatment */
 		pkt->retrans_stop = 1;
+		siptimer_a = pkt->retrans_stop_time;
 	}
 
 	/* Schedule retransmission */
-- 
To view, visit https://gerrit.asterisk.org/3887
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I844f26801aada10bc94e9bebe6e151f0a8443204
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Steve Davies <steve at one47.co.uk>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
    
    
More information about the asterisk-commits
mailing list