Commit Graph

12443 Commits

Author SHA1 Message Date
ca5ecfa0ee daemon v3.0.0
Change-Id: I53502e1bbd898f46d1a5b65e9615308159bd69d8
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-11-01 14:46:55 -04:00
8b7629bd57 ice: new ice message format
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: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-31 16:21:55 -04:00
d739bb771c ringtones : compress default.wav
The default ringtone was too big (2.4MB) and calls was not work on Android.
This commit compresses the quality (44100Hz to 8000Hz) and reduces the time (13s to 1s).

Change-Id: Iceb8b00968a8b326fde5c516a219245d316f7928
Tuleap: #1145
2016-10-31 16:17:15 -04:00
a2e4ce1179 ffmpeg: fix screen sharing on GNU/Linux
ffmpeg must be configured with --enable-indev=x11grab_xcb for the
x11grab (for screen sharing) to work

Change-Id: Iec6010dd4854d7b6d043c294be4aaa6215a27851
Tuleap: #1146
2016-10-31 13:26:14 -04:00
299abb884c ring: use turn.ring.cx as default TURN server
Give a default TURN server at Ring account creation.
This server is a proposed by Savoir-faire Linux.

Reviewed-by: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
Change-Id: I076849fa54ade84744983e445d3513aac407afd9
2016-10-29 10:01:47 -04:00
600848639b ice: fix addReflectiveCandidate() with new PJNATH
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: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-28 23:08:03 -04:00
730b920237 tool: add a script to simulate network bandwith
add a python script to simulate network bandwith using netem tbf to
throttle the connection.
The bandwith used in upload is also monitored. The amount of packets
dropped by netem is also monitored

Change-Id: I895a81f51946914071b7fafa7a102931fa2ec7d6
Tuleap: #1049
2016-10-28 22:44:13 -04:00
0176fa85e2 ringdht: register DHT pub address at right time
Move the DHT public address of the node when ICE is really initialized.

Change-Id: Ie5551b3c9b6802a4a05c6a707d8263d80d0062cc
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-28 20:25:33 -04:00
918c67d9d0 save default video device
Now setting the default video device will update the order of the
video preferences and then save the config. This ensures that the
default video device setting persists between dring sessions as
the order of the video preferences in dring.yml is used to determine
the default device when launching dring.

Reviewed-by: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
Change-Id: I7af715c80db58b83eaf4b7584b34ca2279023a2c
Tuleap: #1035
2016-10-28 14:22:21 -04:00
10f592d549 nameservice: resolve outgoing names
Tuleap: #938
Change-Id: I4685a91dd7e345349855abdfbc041105bd6ae2a2
2016-10-27 11:52:05 -04:00
f062220cd2 nameservice: add name directory
Change-Id: I89c26b87c29d8c9dd541583f67dd13dbdc3ff37a
Tuleap: #938
2016-10-27 11:51:54 -04:00
7e42bf1eab contrib: fix IPv6 support in PJSIP ioqueue sendto.
PJSIP pj_ioqueue_sendto() fails in exception if addr argument
is an IPv6 address and if there is a pending write.
This is due to an PJ_ASSERT_RETURN() check not ported for IPv6.

This patch adds this support to the check and change
the internal write_operation structure to support generic IP addresses.

Change-Id: I966ef74c807995149d1db367188610374650dac0
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-26 09:33:55 -04:00
821d339158 ice: implement multi turn/stun servers
This patch implements the possibility of set multiple STUN and TURN
servers to an ICE transport.
This also by same way fixes bad given username/realm (security fix).

Change-Id: Ibcc249c78fd4ef5f5657806b2354b5914bf8a360
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-26 09:33:51 -04:00
0e90ddb7e9 turn: use official PJSIP patch to fix TURN
Commit 0bc5829b88 has introduced
a patch recently partialy integrated in PJSIP (see [1]).
But it doesn't take in account TURN error during ALLOCATING state.
This patch replace our patch by the PJSIP one and modify it
to handle the ALLOCATING case.

[1] https://trac.pjsip.org/repos/changeset/5465

Change-Id: Ic45458609e11b55641f13c3e6294eeda599d304e
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-26 00:27:57 -04:00
c1f2673ac4 dht: add DHTLOGLEVEL env var to select DHT log
This patch adds the support of DHTLOGLEVEL environment variable
to let the user choose OpenDHT log level when the deamon instance
is created.

Following level are available:
 - 0 : disable all logs
 - 1 : only errors
 - 2 : level 1 + warnings
 - 3 : level 2 + debugs

Change-Id: Ib55bdabdea2e3ac72c86fa78260a5e3d16b52179
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-25 23:13:29 -04:00
00bab087b2 call: wait for CONNECTED state to send messages
In multi-device, we buffer outgoing messages and send them to subcalls
when their SIP session become available.
For this purpose we waited for CallState::ACTIVE which is not enough,
since ConnectionState should be CONNECTED to ensure the SIp session to
be availble.

Change-Id: I2d84fdd4b4340e9ba198f75530212e83be575920
Tuleap: #1154
2016-10-25 22:36:47 -04:00
e0cf7a6682 thread pool: add minimum size of 4 threads
rationale: a minimum thread pool size of N allows up to N dependent
tasks to block on each other without resulting in a deadlock on monothread
systems, while limiting the number of concurrent running tasks.
Ring currently uses up to two dependent tasks with ThreadPool.

Change-Id: I66ec6ebb64ee4e1fb84af2db9aa465c62e08eadd
2016-10-25 16:49:39 -04:00
7adf9f4d1e contrib: bump opendht
Change-Id: I9010e69966b1d7cab27c52ec9c0bbb496ad9f986
2016-10-23 18:29:35 -04:00
5cf97bd364 sipcall: multidevice text messages improvements
Tuleap: #938
Change-Id: I28d690aacbbf9a20fa50891a7a330c5c9feeb36b
2016-10-22 03:41:01 -04:00
cd959c9f03 contrib: bump opendht
Change-Id: I9a1af27bdc5b2533c017ae923ef765b107d1b1fa
2016-10-22 03:29:33 -04:00
54bfbeef22 sipcall: fix crash
Fix crash introduced by commit b384ccebae
by reverting the code.
The change was also unrelated to the commit msg and wasn't reviewed
by peer.

Change-Id: I25b0f6922f321a67b6fd1a10da45d83908ef0311
2016-10-21 19:19:58 -04:00
823fe75d8f contrib: fix cryptopp detection on RedHat-based
This patch adds the RedHat-based package detection of cryptopp.
RedHat-based cryptopp package is not named as Debian-based one.

Change-Id: Ibc9b1bde6f49d1a1b986f9048c18c08d708eee83
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-21 11:59:35 -04:00
b384ccebae sip: handle sip messages during multi-device ringing
Change-Id: I5bb43cf1506adc1a11f0af899b07b540bae52bf9
Tuleap: #938
2016-10-20 19:34:18 -04:00
e999636120 ringaccount: fix ICE init for incoming call
ICE transport was a blocking method before
the commit 0bc5829b88.
Since not and this led to an error during incoming
ICE msg reception, when the ice start method is called
as the ice transport is not initalized yet.

This patch implements this wait using asynchronous methods
as the outgoing call implementation does.

Change-Id: Idc69cefcf67eb1c902a197ea689fae2fc6b6c8d0
Tuleap: #1047
2016-10-20 19:02:39 -04:00
df7d90f842 sip: handle sip messages during multi-device ringing
Change-Id: Ia9433e5477d94fffc2085e8edbf01c205431e2cb
Tuleap: #938
2016-10-19 16:26:57 -04:00
238e033af6 contrib: bump opendht
Change-Id: I8c634259c50db104e265e1daf08d9883b2343f1d
2016-10-19 16:23:18 -04:00
bf357c0d9b README: mention gnu.org mailing list
Change-Id: Ia2e85184fc5f4dc47b3f2550fd72d4ae6a61ed63
2016-10-19 14:23:36 -04:00
8e7302e266 README: Ring -> GNU Ring
More replacements will be done in future changesets. Including
Links to mailing lists on Savannah.

Change-Id: Ia7f89eb159858eece065addfe0032326ddad9a39
2016-10-19 11:08:12 -04:00
b1d4a5c604 audio: fix recording
Audio recording files are not closed properly, making them corrupt
on mac osx (wave header for file size or duration is 0) . Also
recording filenames contain duplicates, and sometimes missing
the entire filename.

This patch :
- adds call to closeFile when a call is remove from manager
- prevents filename duplication
- ensures filename is initialized on audio recorder

Change-Id: Iec3a606f9e65bbbfb5bcaf50ba924223c396507b
Tuleap: #999
2016-10-18 17:03:19 -04:00
18533eb24f build: fix daemon build for mingw32 when restbed is needed.
Fix compilations options problem when building
for mingw32.
 * configure.ac: Removed some LDFLAGS preventing test for
   librestbed to work. Also added -lws2_32 as restbed needs
   it.
 * src/Makefile.am: LDFLAGS removed from configure.ac are
   included here.

Change-Id: Ie6256663778eb1376d4ae7930cbc94e7a240c714
2016-10-18 19:31:04 +00:00
b1e576a372 ice: fix IceTransport getLocalAddress/getRemoteAddress APIs
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
2016-10-18 12:00:19 -04:00
0bc5829b88 ice: fix ICE init failure with unreachable TURN
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
2016-10-18 11:35:02 -04:00
44b876a2e0 contrib: bump opendht
Change-Id: I041e4abaf940b680778e77ff3801ec5de6970c46
2016-10-17 21:47:02 -04:00
12c1dec5c0 ringaccount: support for IPv6
This patch tags PJSIP custom ICE transports as "TLS IPv6"
if the local address support this family.

Change-Id: I0ca01b5f373b4e873ed7be24b58497992a99fc9d
Tuleap: #891
2016-10-17 19:06:21 -04:00
aeb3a7ae3e ice: ipv6 support
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
2016-10-17 19:06:08 -04:00
f119d148b8 contrib: bump opendht
Change-Id: I41645b3a33850543a6b9c2d28bde9c82e2d220f5
2016-10-17 14:52:41 -04:00
d6a90bf95c video: add multi gpu support for vaapi
This iterates over all DRM devices under
/dev/dri (card* and renderD*) and returns the first
device that works

Change-Id: I4a4aea565122abf81786b0ccc69539631f10b5f8
Tuleap: #1082
2016-10-17 13:19:38 -04:00
e03b970d13 android: enable vp8, cleanup
Fix and enable VPX on Android.
Since the Android build moved to clang and libc++,
it's no longer necessary to redefine some common
standard C++ methods.

Change-Id: I3488633782ded31bc260c5a234802ebd6f251377
2016-10-15 02:39:44 -04:00
c86a2a4bc8 multi-device: misc fixes
Change-Id: I2a69b5b59ae8ee2e6ceedbb448148872c0d55fd4
2016-10-14 18:52:40 -04:00
f6ffeb907b multi-device/im: report account ID instead of device ID
Change-Id: I00451dd6ba853dcdc985b13be506b3613ca596d6
Tuleap: #938
2016-10-12 18:41:23 -04:00
94148e96f0 multi-device: emit state change on account creation ended
Tuleap: #938
Change-Id: I3569786d66771578d10b13a87464302a73982a19
2016-10-12 16:07:14 -04:00
67f74aae2b multi-device: add text message support
Tuleap: #938
Change-Id: I92e6116702b5eb70d39ec1e0a6f6b876c98ce2cb
2016-10-12 15:02:50 -04:00
4b3ca5c7b5 multi-device: add getKnownRingDevices
* adds mechanism to find other devices with a Ring account
* adds API to list those devices

Change-Id: Idde0aa5524be58290c345a530df1b0aba2252279
Tuleap: #938
2016-10-12 15:02:50 -04:00
1dccd81b6f multi-device: initial implementation
* 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
2016-10-12 15:02:50 -04:00
4e4a609d86 Revert "video: use ffmpeg on OSX"
- libav is still selected when building the daemon
- patch 0005-add-avfgrab-device.patch does not compile
- video does not work with the avfcapture device

This reverts commit 762ce5d190.

Change-Id: Iebe59520877bbcd8fb9e8581341ff77be6d326b0
2016-10-12 10:43:34 -04:00
4eda26c34c contrib: fix vp8 regression
Commit ac44cbaa03 introduces a regression
in the support of vp8 video codec. The change uses v1.6.0 of libvpx
for all platforms except OSX. But this version causes a segfault
into the vp8 codec code.

This patch reverts libvpx in contrib to the previous working version,
for all platform, except for ANDROID as the author of the incrimined
commit has used v1.6.0 as a version buildable on ANDROID with clang.

WARNING: current android client build libvpx but doesn't enable VP8
coded! So we don't have any way to test the library on android!

Change-Id: I764907c28d24dcbe90fb69748bed5cf684d594f3
Reviewed-by: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
2016-10-11 15:34:35 -04:00
660bc3404d video: fallback from hardware to software decoding
This patch also implements a way for the Call object to restart
the media receiver

Change-Id: I1090575f14425d383eb5471a388c4c9e8d888b0e
2016-10-07 15:17:35 -04:00
c49f136864 video: fix hardware acceleration bugs
Now correctly takes into account user setting. Will no longer try
to retrieve data from the GPU buffer if acceleration has failed.
Uses hardware acceleration when flushing the video stream.

Change-Id: Id7787a181b3822e8c7da0e8c2ce2cdfa302a3ddd
2016-10-07 15:14:57 -04:00
762ce5d190 video: use ffmpeg on OSX
Switch to ffmpeg for video processing on OSX.
FFmpeg provides hardware acceleration for video decoding

Change-Id: Ic1136ac7c4f4917c1250a4ea732775c47a6e6c39
2016-10-07 14:09:47 -04:00
bd90c3657c build: fix v4l2 build with system installed ffmpeg
Missing ffmpeg/libav build flags in v4l2 Makefile.
This fix the build of this last when deps are installed
on system (i.e. using contrib, where the path doesn't contain
the implementation name).

Change-Id: I966e501ddfdeba95a87ff89ee77faa4938ebe15d
Tuleap: #1058
2016-10-07 12:30:42 -04:00