Skip to content
  • Guillaume Roguez's avatar
    ice: fix ICE init failure with unreachable TURN · 0bc5829b
    Guillaume Roguez authored
    This commit patches PJSIP to not terminate with failure an ICE stream
    transport during its initialization if a TURN is set
    and this one is unreachable.
    
    In such situation, as we don't try to negotiate with
    remaining candidates, we don't let the session have a chance
    to succeed with these candidates.
    
    The commit also fixes an "over-trying" of contact
    the TURN server: a contact phase is normaly done
    PJ_STUN_MAX_TRANSMIT_COUNT (7 currently) time with
    an incrementally sized duration between tries.
    But the whole process is made PJ_TURN_MAX_DNS_SRV_CNT
    time (was 4, changed for 1) even if it's always
    the same IP. This leds with our current settings
    to an very long time before contact phase timeout
    (around 2 minutes!).
    
    We also increase number of STUN servers per transport
    (PJ_ICE_MAX_STUN) to 3 as we need 2 entries for
    IPv4 and IPv6, and one set by user.
    
    Finaly, our code is changed to not depend on an timeout
    now for the Ring account ICE initialization
    (the one for SIP), to let TURN registring enough time
    to succeed. This fixes also blocking client issue
    when it want to cancel the call during this init phase.
    
    Change-Id: I1aa2e95c1668d4706213930526aaccaffbe0538d
    Tuleap: #1047
    0bc5829b