1. 21 Jun, 2019 1 commit
  2. 20 Jun, 2019 1 commit
    • Sébastien Blin's avatar
      sip: negotiate both UDP and TCP for the control channel · e83a1006
      Sébastien Blin authored
      NOTE: SIP over TCP is disabled for now on Windows, waiting for
      TLS 1.3 support. To re-enable it, check the #ifdef _WIN32 in
      ice_transport.cpp
      
      Our pjsip version supports the RFC6544. With this patch, when
      starting a call, the daemon is using two ICE sessions for the SIP
      channel. One is negotiating a UDP socket, and the other a TCP socket
      and transmits both SDP on the DHT.
      
      If both negotiations succeed, TCP is prefered and will be used
      to transmit SIP messages and the VCard. This should solve the 30
      seconds timeout on bad networks.
      
      Note that the media channel is still using UDP to transmit audio
      and video.
      
      MAJOR CHANGE: the SIP channel use TLS on top of TCP, no DTLS,
      so the transport is considered as reliable.
      
      Also lot of changes in rfc6544.patch to link to rfc6062. The patch
      needs to be cleaned, cf TODO notes
      
      Also this seems to fix the ICE shutdown at the end of the call
      (after the IDLE Timeout)
      
      Change-Id: I55c5f51377fd8787bc951d6d282eec46f8eaf977
      Gitlab: #103
      Gitlab: #108
      e83a1006
  3. 30 Apr, 2019 1 commit
    • Sébastien Blin's avatar
      sonarqube: fix some code smells · 5aa17595
      Sébastien Blin authored
      + Remove some unused using
      + Remove useless std::move
      + Reduce duplicate code
      + Avoid some copy
      
      Change-Id: I7bdbc14aa1b79ce10d30f2f1ef005dd8839de62a
      5aa17595
  4. 29 Apr, 2019 2 commits
    • Sébastien Blin's avatar
      upnp: add TCP port mapping · ecf198bf
      Sébastien Blin authored
      P2P file transfer should support UPnP as a NAT traversal technique.
      
      Change-Id: I62f9990fd646c874f611d3dba7277bef54caeb46
      Gitlab: #86
      ecf198bf
    • Sébastien Blin's avatar
      ice: support RFC 6544 ICE over TCP · ee2fe1a4
      Sébastien Blin authored
      This patch is the first one used to perform ICE over TCP. Leads to
      major changes:
      
      + IceTransport has now a tcpEnable parameters to use TCP instead
      of UDP. Also, this patch makes ICE aggressive nomination available.
      + File transfer is now usable without TURN in a local network. For
      now, UPnP is not supported, this will come in a near future. Now,
      it can use a direct connection between two pairs.
      
      If the negotiation between peer fails, the TURN is used as a
      fallback. Moreover, to avoid breaking compability when a peer wants
      to connect, it will send the SDP message followed by TURN ips (like
      the current version).
      
      Change-Id: I0425c7da34ff2bc272c376261847195be768d522
      ee2fe1a4
  5. 08 Apr, 2019 1 commit
  6. 02 Apr, 2019 2 commits
    • Adrien Béraud's avatar
      sources: rename to jami · 2130f067
      Adrien Béraud authored
      * rename namespace from ring to jami
      * rename logs methods from RING_* to JAMI_*
      * rename RING_VIDEO to ENABLE_VIDEO
      
      Change-Id: Ic98498652d7059fafe58a96220d565bcdfa53658
      2130f067
    • Adrien Béraud's avatar
      ice transport: cleanup · 1d71c178
      Adrien Béraud authored
      Change-Id: Ia7c6cf3b0215f10bdb36c8c9bd4160501d7f3fa8
      1d71c178
  7. 02 Jan, 2019 1 commit
  8. 18 Sep, 2018 1 commit
  9. 13 Sep, 2018 1 commit
  10. 07 Sep, 2018 1 commit
  11. 30 Jan, 2018 2 commits
  12. 23 Jan, 2018 1 commit
  13. 03 Jan, 2018 1 commit
    • Guillaume Roguez's avatar
      make TlsSession great again · bdafdfb4
      Guillaume Roguez authored
      Or at least independant of underlaying transport...
      
      To make TlsSession able to handle both TLS and DTLS
      this patch removes the ICE dependency and replace is
      by the generic network ABC class 'GenericTransport'.
      As a first step this class is declared in tls_session.h.
      Side effects of this change are:
      
      * refactoring of PMTUD procedure: 'MTU' for gnutls has the meaning
        on 'payload-for-gnutls' so this information is now drived by
        the generic transport and not hardcoded anymore.
        The minimal value of probing remains hardcoded, as is a minimum
        given by RFC's documentation and it's based on an IPv4 packet
        associated with UDP protocol.
      
      * getMtu() is now maxPayload() and represent correctly what
        the application must have.
      
      * TlsSession implements itself GenericTransport: we can chain
        GenericTransport instances to construct an overlayed transport
        protocol.
      
      * TlsSession is now considered as non thread-safe for its public API.
        Caller must bring itself this property.
        This permit to remove a redundant mutex in send() operation.
        Note: and it's the case in the only user (SipsIceTransport),
        that why the mutex is redundant in 100% of cases.
      
      Notice the benefit of this genericity refactoring let us
      write a unit-test for this TlsSession class without having
      an heavy ICE transport to mock-up.
      
      Also ICE transport gained of this by adding a new IceSocketTransport
      to replace IceSocket in a near future (need async IO in GenericSocket,
      but not required for the moment).
      
      Change-Id: I6f4591ed6c76fa9cb5519c6e9296f8fc3a6798aa
      Reviewed-by: default avatarOlivier Soldano <olivier.soldano@savoirfairelinux.com>
      bdafdfb4
  14. 05 Dec, 2017 1 commit
  15. 01 Dec, 2017 1 commit
  16. 19 Nov, 2017 1 commit
  17. 21 Jun, 2017 1 commit
  18. 28 Apr, 2017 2 commits
  19. 12 Apr, 2017 2 commits
  20. 16 Mar, 2017 1 commit
  21. 15 Feb, 2017 1 commit
    • Olivier SOLDANO's avatar
      Path MTU discovery implementation · 29ae5d8a
      Olivier SOLDANO authored
      This implementation uses gnutls dtls heartbeat API to test path MTU.
      heartbeat allowing messages with automated response in a datagram,
      the application is able to guess the MTU via a timeout in the heartbeat.
      (timeout on packet sent and no response, implies that the MTU is lower
      than the lost payload.)
      To minimize false positives (a response is lost for example), each attempt
      triggers one retry on the first timeout.
      This version ensures a minimal MTU of 512 bytes will be returned in
      case of any failure in the procedure.
      For retrocompatibility with non heartbeat capable clients,
      a fallback MTU is set at 1280.
      
      Change-Id: Ib9a7f63a70e8bdad239d8fc103779a0f2c387e87
      Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
      29ae5d8a
  22. 12 Jan, 2017 1 commit
  23. 05 Jan, 2017 1 commit
  24. 15 Dec, 2016 1 commit
    • atraczyk's avatar
      build: use thread_local instead of __thread for UWP build · e0f5c89b
      atraczyk authored
      - Causes the UWP build condition to use thread_local when
        registering threads with pj_thread_register(), as __thread is
        not available. Note: __declspec(thread) is also equivalent.
      
      Change-Id: Ibee418d4c7084264acb0591015cdb8f72abc50ba
      Tuleap: #790
      e0f5c89b
  25. 31 Oct, 2016 1 commit
    • Guillaume Roguez's avatar
      ice: new ice message format · 8b7629bd
      Guillaume Roguez authored
      WARNING: this patch breaks the compatibility of ICE message format.
      
      This patch introduces a new ICE message format to serialize
      ICE transport information.
      This format permits futur evolutions of this functionality by:
       - adding a version tag to indicate the format used
       - use msgpack to have a compact and easy way to handle data
      
      Change-Id: I1df6197e487ec119cf55a34fc531d2514f6fcf16
      Reviewed-by: default avatarStepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
      8b7629bd
  26. 29 Oct, 2016 1 commit
    • Guillaume Roguez's avatar
      ice: fix addReflectiveCandidate() with new PJNATH · 60084863
      Guillaume Roguez authored
      addReflectiveCandidate is a hack of how PJNATH ICE transport work
      and has made some assumptions only available on PJSIP 2.4.x.
      
      PJNATH has changed of implementation when PJSIP 2.5.5 has been released
      to support IPv6 addressing.
      
      This bump to 2.5.5 invalids these assumptions causing some
      nasty effects when addReflectiveCandidate is called (ex: UPnP).
      
      This patch adapts the hack by a wonder-more-powerful hack.
      
      It hacks the ICE transport STUN server array, that normally
      filled by at leas one or two local host IP (as a local host is
      seen as a local STUN server by PJNATH ICE transport layer).
      This permits internal PJNATH implementation to be "happy".
      
      -sorry
      
      Change-Id: I38d133bd8891675251521e14916eeeaa557703f2
      Reviewed-by: default avatarStepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
      60084863
  27. 26 Oct, 2016 1 commit
  28. 18 Oct, 2016 2 commits
    • Guillaume Roguez's avatar
      ice: fix IceTransport getLocalAddress/getRemoteAddress APIs · b1e576a3
      Guillaume Roguez authored
      This patch contains following changes:
      
      * getLocalAddress : wasn't return the negotiated IP if available
      * getRemoteAddress : do not check for negotiation state
      * some debug added
      
      This fixes bugs during call establishement when IPv6 pair is negotiated,
      but an IPv4 TURN is given as candidate (and not selected,
      but used as default IP).
      
      Change-Id: I89a973c16674b24cce35dc6dd9433554cb3a41bd
      Tuleap: #891
      b1e576a3
    • 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
  29. 17 Oct, 2016 1 commit
    • Guillaume Roguez's avatar
      ice: ipv6 support · aeb3a7ae
      Guillaume Roguez authored
      This patch follows the bump of PJSIP to 2.5.5 version, introducing IPv6
      support to PJNATH library.
      
      - ICE configuration is modified to support IPv6 STUN and TURN servers
      - we add by default the host addresses in IPv6 and IPv4
        (in this order, so IPv6 can be selected in priority)
      
      Tuleap: #891
      Change-Id: Ia0355c2691e3d03346e85295265dd9acc424d58e
      aeb3a7ae
  30. 01 Jun, 2016 1 commit
    • aviau's avatar
      Add testAccountICEInitialization API method · 992bc011
      aviau authored
      This new method allows for testing the initialization of an ICE
      transport with the current account configuration.
      
      Tuleap: #671
      Change-Id: I364958ea420186e44275b47c4b2a6a7c99ff1fe1
      992bc011
  31. 26 Apr, 2016 1 commit
    • Guillaume Roguez's avatar
      ice: increase stun RTO · ae543227
      Guillaume Roguez authored
      This patch increases STUN RTO to 500ms.
      This gives a better total time to check all ICE connections
      (during negotiation). The previous RTO let less than 8s, too short
      for ICE messages exchange over DHT.
      
      Change-Id: I8088abdc4d2306931adb3fdc19edda290479ab6f
      Tuleap: #614
      ae543227
  32. 09 Mar, 2016 1 commit
  33. 15 Feb, 2016 1 commit
    • Guillaume Roguez's avatar
      security: extract TLS session from SipsIceTransport · c8f451e4
      Guillaume Roguez authored
      TLS session (class handling gnutls session client/server) has
      to be extracted from SipsIceTransport class.
      This last is PJSIP transport related, but we need TLS session
      to securise other kind of network socket.
      
      This extract has moslty re-written all previous classes
      has the global working model has change.
      
      This also introduces:
      - flood protection in server SYN cookie state
      - better FSM model in TLS session
      - network statistics recording
      - simplify SipsIceTransport design
      - ICE fixes to not block in waitForData() if ICE is stopped
      - integrate Diffie-Hellman params generation from RingAccount
      
      Change-Id: I32cf1f0c82dee548912d9efdaca5a4447ab05ec7
      Tuleap: #106
      c8f451e4
  34. 27 Jan, 2016 1 commit
    • Alexandre Lision's avatar
      transport: catch std::runtime_error · 927f3b9c
      Alexandre Lision authored
      When there is no internet connection, an error is thrown in IceTransport
      constructor.
      This destroys what has already been initialized including the thread.
      
      Change-Id: I81b6ec1f52b9312a1d6ea24c5f55dfa94da7e877
      Tuleap: #189
      Tuleap: #258
      927f3b9c