1. 21 Aug, 2019 2 commits
  2. 04 Aug, 2019 1 commit
  3. 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
  4. 21 Jun, 2019 1 commit
  5. 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
  6. 08 Apr, 2019 1 commit
    • Sébastien Blin's avatar
      tls_session: close transport after cleanup · ca342f2b
      Sébastien Blin authored
      The TlsSession object works as a state machine. Currently, when
      shutdown() is called, the state is changed and the transport is
      directly closed. This mean that the cleanup launched by the state
      machine can be called after the transport is closed.
      
      Change-Id: I2565259156073862d4eee1fc47003a8022de2126
      ca342f2b
  7. 02 Apr, 2019 1 commit
    • 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
  8. 21 Feb, 2019 2 commits
  9. 02 Jan, 2019 1 commit
  10. 31 Dec, 2018 1 commit
  11. 23 Aug, 2018 1 commit
  12. 26 Jul, 2018 1 commit
  13. 13 Jun, 2018 1 commit
  14. 23 Mar, 2018 1 commit
  15. 18 Mar, 2018 1 commit
    • Olivier SOLDANO's avatar
      deactivate path mtu discovery · bfe6121c
      Olivier SOLDANO authored
      until futher work on system level sockets that make us able
      to control packet fragmentation, PMTUD is counter productive.
      
      Change-Id: I7755d7af126742d8259868685fb7682a8bce383d
      bfe6121c
  16. 02 Mar, 2018 1 commit
  17. 15 Feb, 2018 1 commit
    • Olivier SOLDANO's avatar
      fix infinite loop in PMTUD · 5ebe2918
      Olivier SOLDANO authored
      When the TLS session was closed during path mtu discovery,
      the EINTR signal was captured by the retry loop, causing
      it to loop indefinitelly as the state of the session was
      TlsSessionState::SHUTDOWN ; each retry triggering another EINTR
      from TlsSessionImpl::waitForRawData, making gnutls_heartbeat_ping
      to return GNUTLS_E_INTERRUPTED on the pong wait).
      the guard to this loop was modified to take into account the state
      of the session on GNUTLS_E_ITERRUPTED.
      
      Another do/while loop was guarded by the same condition in
      TlsSessionImpl::send, the same countermeasures have been
      put in place.
      
      Change-Id: Ib2ab8975c8044d9bac0abdcace94d79b5eeb75b9
      Reviewed-by: Philippe Gorley's avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
      5ebe2918
  18. 07 Feb, 2018 1 commit
  19. 30 Jan, 2018 3 commits
  20. 23 Jan, 2018 1 commit
  21. 18 Jan, 2018 1 commit
  22. 10 Jan, 2018 1 commit
    • Guillaume Roguez's avatar
      data transfer: fix data transfer destruction · 73dea6d8
      Guillaume Roguez authored
      fix crash occuring during data transfer destruction due to nullptr access
      when the turn transport is destroyed.
      
      list of changes:
      * fix Turn/PJSIP callbacks registration (was a NPA due to unique_ptr dtor implementation)
      * add a shutdown method to GenericSocket.
      * implement shutdown into TlsSession and TurnTransport.
      * use shutdown to unlock PeerConnection blocked into a read.
      * do not call blocking methods that raises CtrlMsg into the eventloop.
      * destroy clients/servers before turn socket .
      * fix Turn pool cache destruction causing bad mem free.
      
      Change-Id: I9995ce9419e8af965def9328a5de4a8973a4334f
      Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
      73dea6d8
  23. 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
  24. 05 Dec, 2017 1 commit
  25. 28 Nov, 2017 1 commit
  26. 21 Nov, 2017 2 commits
  27. 10 Jul, 2017 1 commit
    • Adrien Béraud's avatar
      mtu: remove MTU of 1500 bytes · 62aa7346
      Adrien Béraud authored
      Remove the highest, rare case of 1500 bytes MTU, and mitigate the case
      of fragmented packets dropped asymmetrically - IP_NOFRAG unavailable in
      PJNATH for the moment -
      while still allowing to use a lower MTU on links where the actual MTU is
      very low and no packet fragmentation is possible.
      In this case the ping packet would be dropped and the correct MTU would
      be discovered on both sides.
      
      Change-Id: I1870eb08ad8298aff134995388b4958490426351
      62aa7346
  28. 09 Jul, 2017 1 commit
    • Anthony Léonard's avatar
      tls: set errno with gnutls function on Windows · 4a773328
      Anthony Léonard authored
      On some platforms, such as Windows, the errno variable is not a
      reliable way to send an error code to GnuTLS. A function called
      gnutls_transport_set_errno is provided as a better way for push/pull
      callbacks to return those error codes to GnuTLS.
      
      We now use it in the push callback which prevent cases where a TLS
      session could be terminated due to a misreading of errno by GnuTLS
      (especially if an EAGAIN error code is to be returned).
      
      Moreover, as the SIP session MTU is queried during media session setup,
      we ensure that the session is still alive at this moment. If not, we
      throw a runtime error as it is a nonsense to establish a media
      communication if SIP is dead.
      
      Change-Id: Id9220f1b3c7feea72e6ad18481fc039b4b5a2f4e
      Reviewed-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
      4a773328
  29. 22 Jun, 2017 1 commit
    • Guillaume Roguez's avatar
      tls: prevent recursive call to flushRxQueue() · 8c9e75af
      Guillaume Roguez authored
      TlsSession::flushRxQueue() let TlsSession::handleDataPacket() to be called
      causing a recursive call to TlsSession::flushRxQueue(), finally resulting
      into application crash.
      
      Solve that by testing if we're in flush opeation and just no-op in such case.
      
      Change-Id: Ie4d52a9df495784e36e3691404f44cd8f66dbb6d
      8c9e75af
  30. 17 Jun, 2017 1 commit
    • Guillaume Roguez's avatar
      tweak jitter-buffers values · 5f78b14b
      Guillaume Roguez authored
      Increase jitter-buffers size/delay in TLS and RTP channels.
      Gives better results on high-latency connections (i.e. with TURN enabled).
      
      Note: also refactor RTP constants coding to be more easier to tweak.
      
      Change-Id: Ia4cb78306465e2385a52728629942b4d07330f13
      5f78b14b
  31. 24 May, 2017 1 commit
  32. 17 May, 2017 1 commit
    • Guillaume Roguez's avatar
      dtls: try to flush rx queue at reception · f62dccac
      Guillaume Roguez authored
      give a chance to rx queue to immediatly push packets to application
      when packet is received. This reduces a bit the latency of packet
      handling.
      
      Change-Id: I7c09d91ab505e9e65ebbb990f1d155b3d639e024
      f62dccac
  33. 15 May, 2017 1 commit
    • Guillaume Roguez's avatar
      dtls: refactoring and fix of PMTUD/Established code · b44d24e8
      Guillaume Roguez authored
      There are various issues in the PMTUD code:
      - OOO handler wasn't applied to the first packet
        due to unseen code duplication in PMTU code.
      - first packet sequence has to be known in case of OOO on it
      - bug in losts detection.
      - decrease the lost threshold time.
      - temporary packet allocation is not efficient.
      - code duplication and functional flow not well designed.
      - comments needed
      
      This patch fixes all of that.
      
      Change-Id: I93ec71e22f6cb7a66ad9ab0f927d31044966f1e3
      Reviewed-by: default avatarAnthony Léonard <anthony.leonard@savoirfairelinux.com>
      b44d24e8
  34. 04 May, 2017 1 commit
  35. 28 Apr, 2017 1 commit