[asterisk-dev] T1 sip 500ms or 1s ?

Mark Michelson mmichelson at digium.com
Thu Jun 18 11:03:18 CDT 2009


David Hansen wrote:
> Are your PBX and phone on same subnet?  Is the phone SIP capable and listening on port 5060?  You mention T1, but this has no relationship to SIP convos.  
> 
> David Hansen

In SIP, there is a timer called T1 used as a base for calculating retransmission 
times.

In answer to the originally-posted question, the SIP T1 timer defaults to 500 
ms. Looking at the code in sip_reliable_xmit, we set a value called siptimer_a 
to be 2 * pkt->timer_t1. This value is what is passed to the scheduler for the 
retransmission time.

Reading RFC 3261, section 17.1.1.2:

   "If an unreliable transport is being
    used, the client transaction MUST start timer A with a value of T1.
    If a reliable transport is being used, the client transaction SHOULD
    NOT start timer A (Timer A controls request retransmissions).  For
    any transport, the client transaction MUST start timer B with a value
    of 64*T1 seconds (Timer B controls transaction timeouts).

    When timer A fires, the client transaction MUST retransmit the
    request by passing it to the transport layer, and MUST reset the
    timer with a value of 2*T1."

So it appears that this may be an instance where we are doing things a bit 
out-of-spec here. I wonder if there was some sort of justification for this when 
it was written...

Mark Michelson

> 
>  
> On Thursday, June 18, 2009, at 10:14AM, "Eduardo Nunes Pereira" <eduardonunesp at gmail.com> wrote:
>> Hi, i'm a developer of Disc-OS a PBXIP distro to Brazilian market, this is
>> my first time here, and recently i started to debug SIP protocol in
>> Asterisk, and monitoring with WireShark. i'm really curious about the fact
>> of T1 retransmit the REGISTER in 1 second not in 500ms (RFC 3261).
>> I'm a not telephony expert, but the scenario is:
>>
>> A Asterisk SIP Trunk trying to register in my desktop, but port 5060 is
>> unavailable, then monitoring with Wireshark, i see the SIP packs trying to
>> retransmit in 1 second the first retransmission.
>>
>> anyone saw some issue like that ? or my version is old ? (asterisk-1.4.24.1)
>>
>> -- 
>> Eduardo Nunes Pereira
>> email: eduardonunesp at gmail.com
>>
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev




More information about the asterisk-dev mailing list