[asterisk-commits] oej: branch 1.2 r55249 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Feb 18 03:36:13 MST 2007


Author: oej
Date: Sun Feb 18 04:36:11 2007
New Revision: 55249

URL: http://svn.digium.com/view/asterisk?view=rev&rev=55249
Log:
Issue #9020 - SIP message retransmission time too short.

Backporting fix implemented in 1.4, where we have a minimum level
for the T1 timer. 

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=55249&r1=55248&r2=55249
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Sun Feb 18 04:36:11 2007
@@ -434,6 +434,8 @@
 
 #define DEFAULT_EXPIRY 900				/*!< Expire slowly */
 static int expiry = DEFAULT_EXPIRY;
+
+#define DEFAULT_T1MIN	100				/*!< Minimial T1 roundtrip time - ms */
 
 static struct sched_context *sched;
 static struct io_context *io;
@@ -1918,7 +1920,7 @@
 	r->pickupgroup = peer->pickupgroup;
 	/* Set timer T1 to RTT for this peer (if known by qualify=) */
 	if (peer->maxms && peer->lastms)
-		r->timer_t1 = peer->lastms;
+		r->timer_t1 = peer->lastms < DEFAULT_T1MIN ? DEFAULT_T1MIN : peer->lastms;
 	if ((ast_test_flag(r, SIP_DTMF) == SIP_DTMF_RFC2833) || (ast_test_flag(r, SIP_DTMF) == SIP_DTMF_AUTO))
 		r->noncodeccapability |= AST_RTP_DTMF;
 	else



More information about the asterisk-commits mailing list