1. 14 Oct, 2020 1 commit
  2. 25 Sep, 2020 1 commit
  3. 17 Sep, 2020 1 commit
  4. 11 Aug, 2020 2 commits
  5. 09 Jul, 2020 1 commit
    • Sébastien Blin's avatar
      pjproject: avoid to declare check valid too soon · 3f598a6a
      Sébastien Blin authored
      The relay candidate was declared as suceeded even if not in the valid list.
      Because of this, some negotiations were successful but no valid candidates
      were given to the app.
      
      Moreover, the connection timeout checks were using the wrong timer. This
      avoids to cancel successful negotiations to check a connection timeout.
      
      Finally, some clean is done with this patch
      
      Change-Id: Iacfbf3b9f5faafe1bd05f66157485226761c30bf
      Gitlab: #256
      3f598a6a
  6. 07 Jul, 2020 1 commit
  7. 06 Jul, 2020 1 commit
  8. 18 Jun, 2020 1 commit
    • Mohamed Chibani's avatar
      ice-turn: Fixes the issue of audio loss after 5mn. · 971b9197
      Mohamed Chibani authored
      Send outgoing packets to the default remote address (the address
      present in the 'c=' or 'a=rtcp' lines in case of RTP connections)
      instead of the ICE nominated address.
      
      Gitlab: #223
      Change-Id: I4b17ee55ebd92292f994baf7a972514d95ae728b
      971b9197
  9. 13 May, 2020 1 commit
  10. 06 May, 2020 1 commit
    • Sébastien Blin's avatar
      pjproject: avoid to fail the negotiation when TURN needs a retry · d10e7a1e
      Sébastien Blin authored
      This aims to fix the some negotiation failure when:
      UserA (TURN ipv4) calls UserB (ipv4 only)
      
      In fact, the first user will take some time to know the userB
      addresses to allow on the TURN. So, during this time, the TURN will
      give some EPIPE errors. EPIPE is code 32 defined by 120032 in pjsip
      (PJ_STATUS_FROM_OS(EPIPE)).
      
      So previous code was a mistake
      
      Change-Id: If38c5d36dc38bfe89e3b2ccfbf1b64c934639adb
      d10e7a1e
  11. 27 Apr, 2020 1 commit
  12. 01 Apr, 2020 1 commit
  13. 25 Mar, 2020 1 commit
    • jrun's avatar
      contrib: bump pjsip version to 2.10 · 1a78baf9
      jrun authored
      also remove what has been upstreamed.
      also, logic of how upstream has implements dealing with pending packets
      on the socket is different now and therefore needs testing.
      
      minor change:
      - patches are now done in order.
      - all configs are moved to config_site.h; TODO: also move HOSTVARS to use.mak
      - enable epoll on linux
      
      Change-Id: I87b9389a845d4c4a41fc9e70c3a94a0a990ca83d
      1a78baf9
  14. 09 Mar, 2020 1 commit
  15. 28 Feb, 2020 1 commit
  16. 22 Feb, 2020 2 commits
    • Adrien Béraud's avatar
      ice_transport: destroy transport after thread · 4409c5fc
      Adrien Béraud authored
      Change-Id: Ia60f621d1847e57634ae387de10d12b7eb2cb965
      4409c5fc
    • Sébastien Blin's avatar
      sip: maintain SIP connections with contacts · 0196c5ec
      Sébastien Blin authored
      This patch includes major changes on how messages are transmitted. It's the first
      patch that uses the ConnectionManager. Each time a device is detected via the DHT,
      Jami will ask a new p2p connection with that device and then will open a new SIP
      channel. Also, the same mechanism exists when the user try to send a new message
      through the DHT.
      
      In the future, that SIP channel will be used to send vCards, presence status,
      read status, etc.
      
      Change-Id: I415553193accd8b1259ffdc037e684524fe03876
      0196c5ec
  17. 14 Feb, 2020 2 commits
    • Sébastien Blin's avatar
      pjproject: send keep alive on socket and add callback · 2df2f02d
      Sébastien Blin authored
      Change-Id: I8d99d7f229e25f970a2a12cd7d2a2bee69017a5a
      2df2f02d
    • Sébastien Blin's avatar
      ConnectionManager: first version · eb0fb2bd
      Sébastien Blin authored
      This patch introduces the first version for the first layer of group chat, the
      ConnectionManager.
      
      This class provides an API to get a channel socket between two devices. Behind
      that API, channel sockets are working on top of a MultiplexedSocket, working
      on top of a TLS Socket.
      
      So, if an user want a socket, they just have to call connectDevice. The manager
      will contact the other device through the DHT, negotiate (via the ICE protocol)
      a socket, start a TLS session and then open a new channel. Channel 0 is used as
      a control channel (to get channel requests and answer). Other channels are for
      the user.
      
      When a TLS packet is sent, the format is usually:
      | 16 bits = len of the content | 16 bits = channel | content... |
      
      Scenarios are described in the unitTest linked to that patch.
      
      Finally, each Jami accounts has its own ConnectionManager.
      
      Change-Id: I9cdd681e91ca71f24338e728fc382349393c6912
      eb0fb2bd
  18. 03 Jan, 2020 1 commit
  19. 03 Dec, 2019 1 commit
  20. 18 Nov, 2019 1 commit
    • Sébastien Blin's avatar
      ice: wait to close all sockets when destroying · f3f3b69b
      Sébastien Blin authored
      TURN is destroyed via some timer events in pjsip, so we need to poll the queue
      to be sure to close all sockets when destroying the ICE transport
      
      Change-Id: I3e41014230925acb5a6b2ce08cd061608fcece11
      f3f3b69b
  21. 13 Nov, 2019 1 commit
  22. 08 Nov, 2019 1 commit
    • Sébastien Blin's avatar
      upnp: asynchronous open/close ports · 2d909770
      Sébastien Blin authored
      The UPnP stack now opens and closes ports with an
      asynchronous mechanic and with callbacks.
      
      Every time a mapping request (open or close) is sent,
      a callback is registered and managed by the context.
      When the corresponding protocol executes the request and
      gets an answer, the right callback is found and dispatched
      to its controller. A timeout of 1 second is implemented
      on each request.
      
      Controllers can now be tracked with a unique Id (a string
      that represents its location in memory).
      
      The IGD class now tracks its current active ports and
      manages the number of users for each port.
      
      The PMPIGD class now operates using a queue of mapping
      requests. Whenever a request is made to the natpmp protocol,
      it saves the request to its corresponding list (mapToAdd,
      mapToRemove or mapToRenew in the PMPIGD class) and notifies
      the main natpmp thread. The thread then checks if there
      is any pending map requests in the PMPIGD queue and treats
      them accordingly.
      
      Add Nat-Pmp support for windows.
      
      Fixed bug where nat-pmp wouldn't find an IGD on a new interface
      after a connectivity change. The problem stems from the fact
      that, for one, the nat-pmp handle didn't get cleared internally
      once a connectivity change occured. This would cause the nat-
      pmp library to try and send searches on a socket that was
      bound on the old gateway. Secondly, if you don't wait for a
      little period of time, the natpmp library would discover the
      old IGD on the old interface before the connectivity change
      modifications were completed. Now we restart the nat-pmp
      process one second after the connectivity change triggers.
      
      Change-Id: I39a9b57e237deaa65eef4464a1838eaa3c5bbb03
      2d909770
  23. 31 Oct, 2019 1 commit
  24. 26 Sep, 2019 1 commit
  25. 22 Aug, 2019 1 commit
    • Sébastien Blin's avatar
      p2p: use one IceTransport by sub transfer · c66f56d8
      Sébastien Blin authored
      Because several devices can answer for a transfer, we must use
      separate ice transport for each transfer to avoid to re-init
      the transport during another transport.
      
      Change-Id: I1ba5561bbc331e74320d9dcd6d15cca965588fec
      Gitlab: #128
      c66f56d8
  26. 21 Aug, 2019 1 commit
  27. 04 Aug, 2019 3 commits
  28. 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
  29. 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
  30. 21 Jun, 2019 1 commit
  31. 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
  32. 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
  33. 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
  34. 08 Apr, 2019 1 commit