aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-18 10:36:11 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-18 10:36:11 +0000
commit488fbb1d1569f4812f0f5f1f6ff3c82ab1daa52b (patch)
tree44927d2d233f1bed3b1ca938133b319e1824fd2e
parentcf76aa5fe148897529c654fcc874a3a56b5575c0 (diff)
Issue #9020 - SIP message retransmission time too short.
Backporting fix implemented in 1.4, where we have a minimum level for the T1 timer. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@55249 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 532bd396e..577ac71e8 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -435,6 +435,8 @@ static char regcontext[AST_MAX_CONTEXT] = ""; /*!< Context for auto-extensions
#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;
static int *sipsock_read_id;
@@ -1918,7 +1920,7 @@ static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer)
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