From: Olle Johansson Date: Sun, 18 Feb 2007 10:36:11 +0000 (+0000) Subject: Issue #9020 - SIP message retransmission time too short. X-Git-Tag: 1.2.16~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9736c57aab225313985ec57b5edcb17d041d7d5b;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.2@55249 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 532bd396e3..577ac71e8f 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