diff options
author | Steve Davies <steve@one47.co.uk> | 2016-09-13 11:34:47 +0100 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-09-13 10:55:43 -0500 |
commit | 98e42cc6624a02bede84c38772412b6ff9d8fa2f (patch) | |
tree | 0b4245a60e6e76ab8f789e9872b076d10689282b /channels | |
parent | c833c1fda126870cd9c59461063923558b6b9c6e (diff) |
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
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b03a3e34d..0e0c7fe8c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4238,7 +4238,10 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, uint32_t seqno, in 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 & AST_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 */ |