1. 27 Feb, 2017 1 commit
    • Guillaume Roguez's avatar
      sipcall: fix nullptr access in remote sdp handling · a20eff52
      Guillaume Roguez authored
      sipvoiplink code may set remote sdp to nullptr and this case was not
      handled correctly later.
      This patch fixes that by not using the nullptr to set ICE call transport.
      Also moved the code to use the remote sdp, duplicated, into sipcall
      for factorization.
      
      Change-Id: I6dcfd3bebed3fd754c91dd7f2cab7ca110d3de09
      a20eff52
  2. 22 Feb, 2017 1 commit
  3. 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
  4. 02 Feb, 2017 1 commit
    • Guillaume Roguez's avatar
      sip: factorize dialog and invite session creation · a3a5311f
      Guillaume Roguez authored
      SIP dialog and invite session creation code is duplicated
      in SIPAccount and RingAccount call creation code.
      This patch factorizes this code by moving identical parts
      into SIPAccountBase base class.
      The new common method is now CreateClientDialogAndInvite().
      
      By the way notice that previous duplicated code was locked
      the dialog. This extra lock it uneeded and wrong:
      - wrong because pjsip_dlg_inc_lock() was used, but it should
      be used only temporarily [1]
      - uneeded as the dialog session counter is increased by the invite
      session itself
      The correct way is to call pjsip_dlg_inc_session if we need long
      lock, that not our case here as we manage the invite session.
      
      [1] http://www.pjsip.org/pjsip/docs/html/group__PJSIP__DIALOG.htm#ga5d87304615303ffbe20a09e0a3ff59df)
      
      Change-Id: I8c2042b4c0278315cf76ea38affa8b90cab5cc7f
      Tuleap: #64
      a3a5311f
  5. 11 Jan, 2017 1 commit
  6. 05 Jan, 2017 1 commit
  7. 02 Dec, 2016 1 commit
    • Guillaume Roguez's avatar
      fix SipsIceTransport implementation · e375f828
      Guillaume Roguez authored
      SipsIceTransport doesn't set internal PJSIP transport correctly
      causing many troubles in how our ICE/DTLS underlaying transport
      works with PJSIP.
      
      This patch:
      * adds a custom dtls PJSIP transport type
      * implement correctly custom PJSIP transport creation
      * revert unneeded patches about IM fixes (da0a2d17 and 0cf16b30)
        as this patch fixes also the 30s issue
      
      Side-effect: this fixes the 'call failed' effect when peer hangs-up
      
      Change-Id: If88b8245d6c9ff76bc2f2456f06ff65bc5e723b1
      e375f828
  8. 29 Nov, 2016 2 commits
    • Guillaume Roguez's avatar
      sipcall: re-implement sip info request · 0cf16b30
      Guillaume Roguez authored
      Change the SIPCall::sendSipInfo method to not use a transaction
      but direct endpoint send method.
      This fixes the dialog termination in case of packet drop.
      
      Change-Id: I56f2590ba4b00ac5783ec656b8c442dbcee92c75
      Tuleap: #1077
      Tuleap: #1297
      0cf16b30
    • Guillaume Roguez's avatar
      sip instant message refactoring · da0a2d17
      Guillaume Roguez authored
      This patch is an re-implementation of instant messaging system
      for the SIP layers, to use endpoint's request than dialog's request.
      
      This fix an issue where a packet drop during the request processing
      causes the dialog to be shutdown with error code 408 afer 30 seconds.
      This leds to shutdown of the whole attached invite session, so the
      call itself it terminated.
      
      Change-Id: I948c3eb1d6df992ed8364a01806cd92a42cf98a5
      Tuleap: #1077
      Tuleap: #1297
      da0a2d17
  9. 04 Nov, 2016 1 commit
    • Guillaume Roguez's avatar
      prevent a crash if im::sendSipMessage fails · da39835b
      Guillaume Roguez authored
      im::sendSipMessage() may throw an exception but caller
      doesn't take that into account. This may cause undefined behaviour,
      like a crash on some platforms.
      
      This patch encapsulates the im::sendSipMessage() call into a try/catch.
      
      Change-Id: Ie07105f02d64a37a009e510bb674716ec20212c9
      Tuleap: #1172
      da39835b
  10. 22 Oct, 2016 1 commit
  11. 21 Oct, 2016 1 commit
    • Guillaume Roguez's avatar
      sipcall: fix crash · 54bfbeef
      Guillaume Roguez authored
      Fix crash introduced by commit b384cceb
      by reverting the code.
      The change was also unrelated to the commit msg and wasn't reviewed
      by peer.
      
      Change-Id: I25b0f6922f321a67b6fd1a10da45d83908ef0311
      54bfbeef
  12. 20 Oct, 2016 1 commit
  13. 19 Oct, 2016 1 commit
  14. 18 Oct, 2016 1 commit
    • 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
  15. 14 Oct, 2016 1 commit
  16. 12 Oct, 2016 1 commit
    • Adrien Béraud's avatar
      multi-device: initial implementation · 1dccd81b
      Adrien Béraud authored
      * generate device certificate
      * generate encrypted archive including:
       - Account certificate
       - Generated Ethereum key
      * adds "signed receipt" to the account configuration
      * adds mechanism to export/import account over the DHT
      
      Change-Id: Iac77f990b094c3405785fb0df41bc8a993995a26
      Tuleap: #938
      1dccd81b
  17. 07 Oct, 2016 1 commit
  18. 15 Aug, 2016 1 commit
    • Adrien Béraud's avatar
      sip: set transport secure state · b3b3a6ce
      Adrien Béraud authored
      When receiving an incoming SIPS or Ring call, enforces the
      secure state of the media as it should be per the SIP
      standard.
      
      Also prevents to accidentally configure an insecure
      transport on a secure call.
      
      Change-Id: I28836c76f79218a026b07d7c182adbaaf50aedbb
      Tuleap: #901
      b3b3a6ce
  19. 10 Aug, 2016 1 commit
    • Edric Milaret's avatar
      fix audio loop being restarted when call is on hold · 90504256
      Edric Milaret authored
      This caused an "infinite loop" for audio media resulting
      in CPU being overcharged for nothing
      
      This fix the problem on MacOS and on GNU/Linux when using PulseAudio
      There is still a similar problem with Alsa.
      
      Change-Id: I70e111c59125143d60b657898b04a0b65a638bd6
      Tuleap: #576
      90504256
  20. 07 Jul, 2016 1 commit
    • Stepan Salenikovich's avatar
      configure: remove --without-instant_messaging · 7cf181ac
      Stepan Salenikovich authored
      Ring does not build with this option. Instant messaging is now a
      core functionality of Ring, so there is no reason to support building
      Ring without it.
      
      Change-Id: I2dfa06a711aaabb27c62fef96d9ec12c8f4f08b8
      Tuleap: #739
      7cf181ac
  21. 06 Apr, 2016 1 commit
  22. 04 Apr, 2016 1 commit
    • Adrien Béraud's avatar
      rename namespace InstantMessaging to im · 3677f3ad
      Adrien Béraud authored
      Make the namespace shorter and lower-case to better
      respect coding conventions and reduce the pain when using it.
      
      Tuleap: #501
      Change-Id: I5fdfb3893605523aba1bcc3436b2e9716f402e6c
      3677f3ad
  23. 09 Mar, 2016 1 commit
  24. 25 Feb, 2016 1 commit
    • Guillaume Roguez's avatar
      videomanager: fix bad memory access · 4d295519
      Guillaume Roguez authored
      - remove videoManager global instance.
      - allocate a VideoManager instance when Manager instance is created.
      - add Manager::getVideoManager() method to get this instance.
      - force getSignalHandlers() to be called before Manager instance creation.
      
      All of this prevents VideoManager to access to signal handlers map,
      already destroyed, causing a memory access violation.
      
      Change-Id: I21ebff08fa8d49e797f99299de12dab023c37769
      Tuleap: #413
      4d295519
  25. 14 Dec, 2015 1 commit
  26. 25 Nov, 2015 1 commit
    • Julien Grossholtz's avatar
      dbus: Add video source in dbus getDetails call · 517c25f3
      Julien Grossholtz authored
      Ring daemon clients need to know what data is streamed to a client
      during a call. This patch creates an VIDEO_SOURCE field within getDetails
      that contains a string with thei video source used by the daemon.
      In case there is no video the string will be empty
      
      Change-Id: I4e5c8a1dcdbd375c327bd20c6674e9b2c2d62bf5
      Tuleap: #99
      517c25f3
  27. 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
      2074c7fb
  28. 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
      5236ab05
  29. 11 Sep, 2015 2 commits
    • Stepan Salenikovich's avatar
      im: use pjsip api to create and parse messages · b7ee00ee
      Stepan Salenikovich authored
      This supports both simple and multipart content types.
      
      *WARNING* the daemon API has not changed; however the previous
      implementation was not RFC compliant and thus messages sent from or
      received by a previous version of the daemon will not be interpreted
      correctly. Additionally the behaviour of the API has slightly changed.
      It will no longer split multiple message pairs received in the
      map<string, string> into multiple, separate SIP messages if they do not
      all fit into one. If there is only one pair in the map, then a message
      with a single content-type will be created and sent. If multiple pairs
      exist, then a multipart/mixed type message will be created. If the
      created message is too large to be sent, then no parts will be sent.
      
      Support for storing the URI of the original sender is dropped for now as it
      was not being used by the clients and the implementation was buggy.
      
      The APIs for creating XML recipient lists as defined by RFC 5365 remains
      but is no longer used for now.
      
      Issue: #79657
      Change-Id: I2b00cbd797fbb423ee0a7eb24748d2362e9f9ff8
      Signed-off-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
      b7ee00ee
    • Guillaume Roguez's avatar
      utils: c++11'ify RING_ARRAYSIZE and CONST_PJ_STR macros · 6f868d66
      Guillaume Roguez authored
      Macros (C relica) are easly transformed into C++ using constexpr.
      Using template provides type-safe.
      
      RING_ARRAYSIZE becomes arraySize.
      CONST_PJ_STR has been also moved into sip_utils.
      
      Issue: #79703
      Change-Id: Ic197f53bbfeba363f0609908fa680f18529f8075
      6f868d66
  30. 25 Aug, 2015 1 commit
  31. 19 Aug, 2015 3 commits
    • Guillaume Roguez's avatar
      sipcall: protect reinvite to be called during invite · d0caa3f8
      Guillaume Roguez authored
      Sending a reINVITE request when a previous one is not finished
      cause both requests to be aborted (second one by PJSIP, first as
      all ICE sockets are destroyed by caller).
      
      Note: this is not a definitive solution as only the first reINVITE
      is kept in this patch. A better approch is to cancel the first
      reINVITE but not sure on design implications.
      
      Issue: #79075
      Change-Id: Ice0cbc5dc9f3cc322996d86e65cf6bb1754eadba
      d0caa3f8
    • Guillaume Roguez's avatar
      sipcall: factorize pjsip_inv_end_session calls · b4be5352
      Guillaume Roguez authored
      Ending an INVITE session follows a specific scheme on Ring.
      This patch factorize all pjsip_inv_end_session calls to having
      one point to implement INVITE termination.
      By this way we fix also non consistent termination over the code.
      
      Issue: #79075
      Change-Id: Icf6d56caedf75c128ad967ed89d1bacb19696a40
      b4be5352
    • Guillaume Roguez's avatar
      sip_utils: remove sip_printerror API · 40364ed6
      Guillaume Roguez authored
      sip_utils::sip_printerror function has been removed as doesn't give
      interresting information (file/line context not displayed).
      Use sip_utils::sip_strerror in conjunction with RING_XXX() to display
      PJSIP errors.
      
      Issue: #79075
      Change-Id: I7f4124d0716fb4d3aa48dead217d14053151cc4a
      40364ed6
  32. 17 Aug, 2015 1 commit
    • Guillaume Roguez's avatar
      debug: cleanup or add a bunch of debug strings · eb39e6f2
      Guillaume Roguez authored
      This cleanup permits a better lisibility (and so usability) of
      debug string over the code.
      This is not exhaustive, just for the related issue needs.
      
      Issue: #79075
      Change-Id: I8885f6d46b6edb454a2d15305ba48d7e9bdf6d42
      eb39e6f2
  33. 10 Aug, 2015 1 commit
    • Guillaume Roguez's avatar
      ringaccount: register a public address at ICE creation · e4cdde22
      Guillaume Roguez authored
      This patch tries to solve a situation where one peer has
      a TURN server registered but the other peer doesn't have
      any NAT traversal systems.
      To solve that we use a recent OpenDHT API that returns
      a list of public IP discovered during DHT transferts.
      The most seen address is used to register a new relflective
      candidate, coupled to an existing and registered host address.
      It's port is stolen, but as this candidate is added after
      ICE initialization, the candidate is not used for negotiation.
      This is mosly a PJSIP hack as we use an implementation details.
      
      Issue: #78582
      Change-Id: Ic16527f04b4e07905c405d8681223a02fee16d55
      e4cdde22
  34. 31 Jul, 2015 1 commit
  35. 29 Jul, 2015 1 commit
  36. 22 Jul, 2015 1 commit
    • Guillaume Roguez's avatar
      media: refactor live bitrate change · ad477a2f
      Guillaume Roguez authored
      This refactoring improves user experience, fix an issue and simplify code.
      
      - less exposed "internal" stuff (RTP sequence value)
      - don't expose internal business logic to upper layers.
      - remove uneeded full media restart: only media_encoder is restarted
      - fixed non protected shared access to codec isRunning value causing
        a race condition on access and good design practices violation
        (tight coupling between unrelated classes).
      
      Refs #77483
      
      Change-Id: Idb1e3940601ff0d483e7721f627a0c8dd766f844
      ad477a2f