1. 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
  2. 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
    • 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
  3. 08 Apr, 2019 1 commit
  4. 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
    • Adrien Béraud's avatar
      ice transport: cleanup · 1d71c178
      Adrien Béraud authored
      Change-Id: Ia7c6cf3b0215f10bdb36c8c9bd4160501d7f3fa8
  5. 02 Jan, 2019 1 commit
  6. 18 Sep, 2018 1 commit
  7. 13 Sep, 2018 1 commit
  8. 07 Sep, 2018 1 commit
  9. 30 Jan, 2018 2 commits
  10. 23 Jan, 2018 1 commit
  11. 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
      * 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>
  12. 05 Dec, 2017 1 commit
  13. 01 Dec, 2017 1 commit
  14. 19 Nov, 2017 1 commit
  15. 21 Jun, 2017 1 commit
  16. 28 Apr, 2017 2 commits
  17. 12 Apr, 2017 2 commits
  18. 16 Mar, 2017 1 commit
  19. 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>
  20. 12 Jan, 2017 1 commit
  21. 05 Jan, 2017 1 commit
  22. 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
  23. 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>
  24. 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".
      Change-Id: I38d133bd8891675251521e14916eeeaa557703f2
      Reviewed-by: default avatarStepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
  25. 26 Oct, 2016 1 commit
  26. 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
    • 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
  27. 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
  28. 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
  29. 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
  30. 09 Mar, 2016 1 commit
  31. 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
  32. 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
      This destroys what has already been initialized including the thread.
      Change-Id: I81b6ec1f52b9312a1d6ea24c5f55dfa94da7e877
      Tuleap: #189
      Tuleap: #258
  33. 18 Nov, 2015 1 commit
    • Guillaume Roguez's avatar
      Ice: fix implementation · 2074c7fb
      Guillaume Roguez authored
      IceTransport::isXXX() API are not thread-safe, not clear in which
      state the transport is and not easy to manipulate (order of state).
      This patch tries to solve that by:
      - Procted API by a mutex
      - Remove uneeded isComplete() API
      - Ensure that each API are ordered (one at true implies true
        on all lower states: INITIALIZED -> STARTED -> RUNNING).
        All return false on Fail state.
      - Change usage accordingly
      Tuleap: #107
      Change-Id: I17211e54322d70bbfe18c28f06cf9967b9ef93d2
  34. 21 Sep, 2015 1 commit
    • Guillaume Roguez's avatar
      update Copyright header · 5236ab05
      Guillaume Roguez authored
      - remove OpenSSL exception
      - fix Savoir-faire Linux naming
      - fix common Author: representation
      Issue: #80663
      Change-Id: I6c3b2ca1ed48ed474a0ecd5a30fe793526e11b00