Skip to content
Snippets Groups Projects
Commit 602cab13 authored by Olle Johansson's avatar Olle Johansson
Browse files

Set #define for TIMER T1 value

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 9572ee68
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment