[Asterisk-Users] sip invite timeouts

John Todd jtodd at loligo.com
Fri Dec 2 11:20:34 MST 2005


At 10:16 AM -0600 12/2/05, Kevin P. Fleming wrote:
>
>Matthew Simpson wrote:
>>Is there a way in asterisk to configure a sip invite timeout ?  It 
>>seems to be about 30 seconds right now which is too long.  I would 
>>like to have asterisk return congestion if a host does not respond 
>>to an invite within 5 seconds.
>
>Asterisk 1.2 will use a T1 timer (retransmit) based on the 'qualify' 
>time, if have that turned on for the peer. The INVITE will be 
>transmitted a total of six times (per the RFC, IIRC). If your peer 
>is _close_ and responds quickly to qualify packets, then the total 
>INVITE timeout could be a second or two at most.
>
>There is an open feature request to make the T1 timer adjustable on 
>a per-peer basis, but nobody has had the time to implement it yet.


I'll throw my $.02 in here, since this has recently bitten me but in 
the opposite direction, so it's worth putting up for people to find 
this data in the archives...

We have connections between Asterisk servers and SER proxies that 
have qualify= enabled.  These boxes sit right next to each other, so 
the RTT is sometimes less than 12ms.  Using the qualify= results as 
T1, this means that the TOTAL time that an INVITE can exist is 768ms 
(Timer B = 64*T1) and retransmissions of INVITEs happen if the SER 
proxy does not respond with a "100 Trying" or other  valid response 
within 24ms (retransmit delay = 2*T1).  Considering that there are 
databases, etc. are firing on my SER proxy, it takes sometimes quite 
a bit of time before an answer is generated for the actual dialing 
result.  In worst-case scenarios (i.e.: ENUM on SER) I would get all 
six retransmits from Asterisk, and then the call would fail before 
the lookups were complete.

Therefore, to fix the problem it is necessary to have SER respond 
with a "100 Trying" response immediately.  This is not a problem 
between two Asterisk servers, as Asterisk always sends a "100 Trying" 
reply on an INVITE.

Feh.  SIP trying to be TCP.  I'll be glad to see the eventual 
tune-ability of T1 and other timers on a per-peer basis.

JT



More information about the asterisk-users mailing list