1. 21 Aug, 2019 1 commit
  2. 04 Aug, 2019 3 commits
  3. 02 Aug, 2019 1 commit
    • Eden Abitbol's avatar
      upnp: support libupnp and libnatnatpmp simultaneously · 60515d89
      Eden Abitbol authored
      Update libupnp to version 1.8.4.
      
      For windows, the IPV6 preprocessor must be undefined. Or else
      libupnp won't initialize. Added visual studio 2017 support
      via one patch for windows that also combines previous windows
      patches.
      
      UPnPController: Class that the jami classes use to control the
      opening and closing of ports. Every  service has it's own upnp
      controller. The controller does it's actions by using the upnp
      context class. Also refactored the functions used to add
      mappings. Instead of using two different functions with
      different types of parameters, we now use one function with
      parameters that have default values. The logic stays the same
      but the function call is more clear.
      
      UPnPContext: Class that holds a (linked) list of discovered IGDs
      and their corresponding protocols (which discovered them).
      Whenever the controller wants to add or remove a mapping, the
      context picks a valid IGD in it's list and uses the correct
      protocol to complete the required action. This class also has
      the ability to swap protocols for an IGD that was discovered
      by more then one protocol.
      
      UPnPProtocol: Virtual base class that defines the functions
      needed by the context to use the corresponding protocol.
      
      PUPnP: UPnPProtocol derived class that represents a upnp client
      that uses the portable upnp library (libupnp). Every time the
      client discovers a new IGD it uses a callback to add it to the
      context's main IGD linked list. It also has an internal list of
      IGDs that it discovered. Added features to this class include:
      	- IGD event subscription.
      	- Use UpnpInit2 function instead of deprecated UpnpInit
      	  function. It's also supposed to support IPv6.
      
      NatPmp: UPnPProtocol derived class that represents a upnp client
      that uses the NAT-PMP library (libnatpmp). Unlike libupnp,
      libnatpmp only supports discovering one IGD. Also uses callbacks
      to add the IGD it finds to the context's main IGD class.
      
      Also inclided debug warning prints whenever a controller opens
      and closes the ports. That way we can keep track of whenever
      the application opens and closes ports on the internet
      gateway device.
      
      Gitlab: #96
      
      Change-Id: I199271edac2c6d93dc60c24e2e2aefe36de7950c
      60515d89
  4. 12 Jul, 2019 1 commit
    • Sébastien Blin's avatar
      sip: negotiate both UDP and TCP for the control channel · 4bade6fa
      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: I01210da3abfcc448071268b4e1e38abdd58f9f05
      Gitlab: #103
      Gitlab: #108
      4bade6fa
  5. 21 Jun, 2019 1 commit
  6. 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
  7. 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
  8. 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
  9. 08 Apr, 2019 1 commit
  10. 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
  11. 02 Jan, 2019 1 commit
  12. 18 Sep, 2018 1 commit
  13. 13 Sep, 2018 1 commit
  14. 07 Sep, 2018 1 commit
  15. 30 Jan, 2018 2 commits
  16. 23 Jan, 2018 1 commit
  17. 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
  18. 05 Dec, 2017 1 commit
  19. 01 Dec, 2017 1 commit
  20. 19 Nov, 2017 1 commit
  21. 21 Jun, 2017 1 commit
  22. 28 Apr, 2017 2 commits
  23. 12 Apr, 2017 2 commits
  24. 16 Mar, 2017 1 commit
  25. 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
  26. 12 Jan, 2017 1 commit
  27. 05 Jan, 2017 1 commit
  28. 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
  29. 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
  30. 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
  31. 26 Oct, 2016 1 commit
  32. 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