diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-31 13:56:33 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-31 13:56:33 +0000 |
commit | d356d25107991b9e3c97981a40c296a1b1fb4a0e (patch) | |
tree | 2b81418b9e62a98e2b07d4ad3d3c90b68eedaffd | |
parent | 89c07859619cfd1295d8586a7b150e10e807bd07 (diff) |
Set #define for TIMER T1 value
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46650 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 8bd383474..6d95ebdc5 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -195,6 +195,7 @@ static int expiry = DEFAULT_EXPIRY; #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 @@ static void sip_scheddestroy(struct sip_pvt *p, int ms) { 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 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer) 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 @@ static struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *si 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; |