[asterisk-commits] oej: trunk r46650 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Oct 31 06:56:33 MST 2006


Author: oej
Date: Tue Oct 31 07:56:33 2006
New Revision: 46650

URL: http://svn.digium.com/view/asterisk?rev=46650&view=rev
Log:
Set #define for TIMER T1 value

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=46650&r1=46649&r2=46650&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Oct 31 07:56:33 2006
@@ -195,6 +195,7 @@
 
 #define DEFAULT_RETRANS              1000             /*!< How frequently to retransmit Default: 2 * 500 ms in RFC 3261 */
 #define MAX_RETRANS                  6                /*!< Try only 6 times for retransmissions, a total of 7 transmissions */
+#define SIP_TIMER_T1		     500              /* SIP timer T1 (according to RFC 3261) */
 #define SIP_TRANS_TIMEOUT            32000            /*!< SIP request timeout (rfc 3261) 64*T1 
                                                       \todo Use known T1 for timeout (peerpoke)
                                                       */
@@ -2003,7 +2004,7 @@
 {
 	if (ms < 0) {
 		if (p->timer_t1 == 0)
-			p->timer_t1 = 500;	/* Set timer T1 if not set (RFC 3261) */
+			p->timer_t1 = SIP_TIMER_T1;	/* Set timer T1 if not set (RFC 3261) */
 		ms = p->timer_t1 * 64;
 	}
 	if (sip_debug_test_pvt(p))
@@ -2751,7 +2752,7 @@
 	if (port)
 		*port++ = '\0';
 	dialog->sa.sin_family = AF_INET;
-	dialog->timer_t1 = 500; /* Default SIP retransmission timer T1 (RFC 3261) */
+	dialog->timer_t1 = SIP_TIMER_T1; /* Default SIP retransmission timer T1 (RFC 3261) */
 	peer = find_peer(peername, NULL, 1);
 
 	if (peer) {
@@ -4199,7 +4200,7 @@
 	p->prefs = default_prefs;		/* Set default codecs for this call */
 
 	if (intended_method != SIP_OPTIONS)	/* Peerpoke has it's own system */
-		p->timer_t1 = 500;	/* Default SIP retransmission timer T1 (RFC 3261) */
+		p->timer_t1 = SIP_TIMER_T1;	/* Default SIP retransmission timer T1 (RFC 3261) */
 
 	if (sin) {
 		p->sa = *sin;



More information about the asterisk-commits mailing list