Commit graph

729 commits

Author SHA1 Message Date
Daniel Gultsch e4b2bb4a42 throw exception when unable to encrypt 2021-03-03 08:22:21 +01:00
Daniel Gultsch 8a6430ae29 ground work for omemo dtls verification 2021-03-02 21:13:49 +01:00
Daniel Gultsch f92ea5c70b resend <propose/> only if server has stream mgmt 2021-02-21 13:37:08 +01:00
Daniel Gultsch 484f633180 let Conversations (not Android) play ringtone and vibration
fixes #3972 fixes #3801 fixes #3931
2021-02-18 20:55:31 +01:00
Daniel Gultsch 72e268e6b1 add TODO comments wrt to missing <retract/> parsing 2021-02-18 09:36:51 +01:00
Daniel Gultsch db447f845e resend session proposal on rebind 2021-02-12 11:36:44 +01:00
Daniel Gultsch 6cab0ad496 make rtp proposal tracked by SM. fixes #3983 2021-02-12 10:35:13 +01:00
Daniel Gultsch 7330d8a7f0 fixed race conditions around PROCEED state. fixes #3989 2021-02-11 16:56:57 +01:00
Daniel Gultsch b6d62c13ef use ascii notation for punycode domains in SNI 2021-02-07 09:38:55 +01:00
Daniel Gultsch 0a2c753620 do not use offline fallback rtp capability if account is disabled 2021-01-26 09:35:03 +01:00
Daniel Gultsch 8ce7bfb95e automated code clean up 2021-01-23 09:25:34 +01:00
Daniel Gultsch e711b3d294 remember last rtp capability 2021-01-22 08:24:19 +01:00
Ferdinand Pöll 453ca7c0ed Migrate from Android Support Library to AndroidX
Unignored gradle.properties since androidX requires additions there
See also https://developer.android.com/jetpack/androidx/migrate
2021-01-18 20:49:35 +01:00
Daniel Gultsch 372ddbfb49 Revert "offline presences aborts session proposals. fixes #3943"
This reverts commit f23016c967.
2021-01-06 09:03:42 +01:00
Emmanuel Gil Peyrot 17c697eed9 add 'id' attribute to outgoing ICE-UDP candidates
this attribute is mandatory as per the XEP.
2021-01-03 16:32:28 +00:00
Daniel Gultsch 2bec5459c5 properly null check ufrag and pwd before whitespace checking. fixes #3956 2021-01-03 16:05:17 +01:00
Daniel Gultsch 0569febf67 minor code clean up in XmppConnection class 2020-12-31 10:27:06 +01:00
Daniel Gultsch 0e54d8a2cf implement SCRAM-SHA512 2020-12-31 09:32:05 +01:00
Daniel Gultsch f23016c967 offline presences aborts session proposals. fixes #3943 2020-12-22 17:50:26 +01:00
Daniel Gultsch 1f392a688d initial (untested) support for easy onboarding invites 2020-12-01 20:31:30 +01:00
Daniel Gultsch d158eeaf72 terminate jingle call when regular call starts 2020-08-24 12:47:54 +02:00
Daniel Gultsch 91e94db747 extend isBusyState to check phone state as well 2020-08-24 09:51:26 +02:00
Daniel Gultsch 15b323ee69 fix crash after session-accept failed and session-accept contained candidates
Conversations would attempt to feed any candidates found in the session-accept into
WebRTC; even if the session wasn’t setup correctly.

this commit processes the candidates only if the session was setup correctly

fixes #3867
2020-08-22 08:12:28 +02:00
Daniel Gultsch 637c0cb15a fixed rare race condition when receiving transport info right after WebRTCWrapper closes
fixes #3849
2020-08-01 14:18:03 +02:00
Daniel Gultsch 1ae7d6be16 recover from pre-jingle connection states (discover etc) into full fledged jingle connection
fixes #3847
2020-08-01 09:50:54 +02:00
Daniel Gultsch f22e33e3ea fixed race condition of WebRTCWrapper being closed before transitioning into terminal state
JingleRTPConnection shuts down the WebRTCWrapper before transitioning into a terminal state.
(This allows us to make sure it is actually closed when reaching that state);
However that means that, when we get a UI redrawn inbetween closing and transitioning we might
still be in SESSION_ACCEPTED but with no PeerConnection. This traditionally has triggered
an IllegalStateException on getting the EndUserState.
This commit catches the ISE and returns 'ENDING' instead.
Chances are that this is only visibiliy for a very brief time in the UI before the transition
triggers the UI to redraw with the proper state.

fixes #3848
2020-08-01 08:20:10 +02:00
Daniel Gultsch 32d55346cc ensure server triggered jingle iq-errors get routed properly 2020-07-18 16:14:39 +02:00
Daniel Gultsch bf85a55930 catch NPE when detecting camera facing. fixes #3820 2020-07-09 20:11:09 +02:00
Daniel Gultsch 6a6c9fb3bf ignore race condition when toggling fixes #3822 2020-07-09 19:14:28 +02:00
Daniel Gultsch fada3a63c9 store entire transport info for after session was accepted. fixes #3790 2020-06-22 18:07:27 +02:00
Daniel Gultsch dddb7ece25 show app failure instead of crashing when egl fails to init. fixes #3795 2020-06-18 20:37:56 +02:00
Daniel Gultsch 169ee99afa do not attempt to reject call if session had already ended. fixes #3798 2020-06-18 20:32:58 +02:00
Daniel Gultsch 7bcb29c482 be more liberal in 0167 payload-type parameter parsing
some implementations will transform the following SDP coming from Firefox

m=audio 12346 RTP/AVP 101
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

to

<payload-type channels="1" name="telephone-event" clockrate="8000" id="101">
  <parameter value="0-15" xmlns="urn:xmpp:jingle:apps:rtp:1"/>
</payload-type>

While a missing name attribute is not legal according to the XEP; and 0-15 are
technically not just one value the following commit will accept it if there is
just one paramater.
2020-06-17 21:15:12 +02:00
Daniel Gultsch c8f23aef4e error response to sending the jingle ft hash should not file the transfer 2020-06-15 21:33:32 +02:00
Daniel Gultsch ccdc91a497 remove check that would ensure you use jingle only with full jids 2020-06-14 09:01:47 +02:00
Daniel Gultsch 400c8461fc fix feature discovery in jingle file transfer for empty resources 2020-06-13 22:53:24 +02:00
Daniel Gultsch 0ba4892d3e RTP: write log message on background thread 2020-06-12 09:08:09 +02:00
Daniel Gultsch 644ad99520 create rtp end user state for connection lost. fixes #3769 2020-06-12 07:57:11 +02:00
Daniel Gultsch 552e17e39a remember terminal RTP session state
if the activity is not connected during finish it won’t receive the last end user state.

this code remembers it even if the actual session is already gone. so when activity reconnects and
we can’t find the real rtp session we can look up the last state instead.
2020-06-11 21:17:15 +02:00
Daniel Gultsch 1853242c66 do not throw when finishing jingle ft twice. fixes #3765
the state machine in jingle file transfer does not prevent that the connection
is being finished twice
2020-06-07 15:00:00 +02:00
Daniel Gultsch b78d45c7cc fix Jingle FT candidate selection for equal priority. fixes #3771 2020-06-07 12:47:03 +02:00
Daniel Gultsch 637c208f55 ask for resource and use jingle direct init when JMI is not available. fixes #3751 2020-05-30 14:56:12 +02:00
Daniel Gultsch 8edfc61346 fixed concurrent modification when iterating over presences 2020-05-30 10:57:22 +02:00
Daniel Gultsch 59d1a2982e RtpSessionActivity: throw instead of finish when session wasn’t found 2020-05-28 09:22:58 +02:00
Daniel Gultsch 5e3aab3abe ensure that finishConnection succeeds 2020-05-27 13:54:35 +02:00
Daniel Gultsch 1c625e55a0 set candidate gathering to continually. fixes #3719
This should be good enough to survive some network switches where both networks are online at the same time to allow for some handover
(for example when enabling wifi the 3G connection will usually (probably depends on OS) live on for a moment
2020-05-25 11:11:29 +02:00
Daniel Gultsch 88cc097732 fail pending messages on policy violation. fixes #3735 2020-05-22 18:23:53 +02:00
Daniel Gultsch ed4d7bff92 reset tone manager after reaching NULL status 2020-05-22 16:25:29 +02:00
Daniel Gultsch 685e01e83f give TonManager control over audio mode to play dial tones on earpiece. fixes #3738 2020-05-21 15:39:59 +02:00
Daniel Gultsch a2a7256682 disable hardware AEC on some devices. fixes #3734 2020-05-21 11:13:46 +02:00
Daniel Gultsch 574bccfc59 avoid unnecessary call to Jid.ofDomain() 2020-05-21 07:57:57 +02:00
Daniel Gultsch df3273a6fc fix jid.withResource() for domain jids 2020-05-18 09:14:57 +02:00
Daniel Gultsch a0920b83e2 use Account.getDomain() for direct access to domain jid 2020-05-17 10:24:46 +02:00
Daniel Gultsch 7a21b2c5ed fixed parsing of unescaped jids with @ in local part 2020-05-16 10:40:26 +02:00
Daniel Gultsch 2195bce303 don’t allow escaped usernames in magic create 2020-05-16 08:55:13 +02:00
Daniel Gultsch ef7d4fca86 show escaped jid in most of the UI
for historical reasons we store unescaped variants in DB and use them in intents.
2020-05-15 18:22:04 +02:00
Daniel Gultsch b6703dbe38 switch xmpp-addr to jxmpp-jid 2020-05-15 17:06:16 +02:00
Daniel Gultsch 36d2ecfcfa always use private key for TLS connection when one is configured 2020-05-13 09:38:30 +02:00
Daniel Gultsch 2c4788b7c7 send retract when unable to setup webrtc as initiator. fixes #3717 2020-05-11 12:20:32 +02:00
Daniel Gultsch b845c601d0 include senders in jingle file offer 2020-05-11 11:09:18 +02:00
Daniel Gultsch 90526efbd4 fixed destination calculation for direct socks candidates. fixes #3715 2020-05-11 11:08:45 +02:00
Daniel Gultsch 46579550e4 fixed weird ToneGenerator crash. fixes #3712
obviously tones won’t work then anymore
2020-05-10 17:54:16 +02:00
Daniel Gultsch 4d3d3a7038 tie breaking racing jingle message proposals. fixes #3698 2020-05-10 14:09:16 +02:00
Daniel Gultsch 2c5bed61a1 introduce extra RTP state to handle going from sending proceed to receiving retract 2020-05-09 21:35:21 +02:00
Daniel Gultsch f4247379bd catch UnsatisfiedLinkError when trying to init libwebrtc. fixes #3707 2020-05-09 19:48:54 +02:00
Daniel Gultsch 92fc22b313 show call duration in audio calls. fixes #3708 2020-05-09 11:14:39 +02:00
Daniel Gultsch 285c750e69 throw IllegalStateException when trying to finish from a non terminal state 2020-05-08 18:36:52 +02:00
Daniel Gultsch 350fc57d87 properly wrap IPv6 addresses 2020-05-08 17:52:41 +02:00
Daniel Gultsch 5af4c865a7 make sure we finsh() the connection after transitioning into terminal state 2020-05-08 17:22:27 +02:00
Daniel Gultsch c159bbfc81 play dial sounds on wrong track to make them play in silent mode. fixes #3697 2020-05-03 23:15:21 +02:00
Daniel Gultsch 3c3f5d8e6f mark missed calls as unread (bold) in overview. fixes #3687 2020-05-03 18:07:00 +02:00
Daniel Gultsch 3577afea4e fixed crash caused by race when dedecting if mic is on 2020-05-03 11:54:58 +02:00
Daniel Gultsch e70b6eec98 do not mirror back camera. fixes #3693 2020-05-03 11:54:58 +02:00
Daniel Gultsch 63ddd97b6b add button to switch cameras during video call
RIP symmetry :-(

fixes #3683
2020-05-02 17:15:50 +02:00
Daniel Gultsch e4b906ebeb fix crash on unknown sasl mechanims 2020-05-02 10:20:18 +02:00
Daniel Gultsch 48163a5604 show proposal as ongoing call 2020-05-02 09:50:17 +02:00
Daniel Gultsch f7a0d2031a disable TLS cert validation for stun/turn server
turns out libwebrtc doesn’t use the system root CA store but comes with only a few default CAs.

in anyway we will probably only use tcp/443 to bypass firewalls and not to actually secure anything.
2020-05-01 20:17:23 +02:00
Daniel Gultsch 58429c42ee lower case protocol; we have seen upper case in the wild for some reason 2020-05-01 20:15:09 +02:00
Daniel Gultsch 7ac5e8e828 properly close WebRTCWrapper even when init failed 2020-05-01 13:56:24 +02:00
Daniel Gultsch eab4ac017f minor code clean up 2020-05-01 07:58:58 +02:00
Daniel Gultsch deae2b109f do not crash UI after ignoring improperly formatted jingle init 2020-04-29 15:54:02 +02:00
Daniel Gultsch 8a586527c4 check if setting local description was succesful 2020-04-29 15:32:27 +02:00
Daniel Gultsch a49d69c878 parse candidates from session-init and session-accept 2020-04-29 10:36:54 +02:00
Daniel Gultsch 333f509e53 synchronize public WebRTCWrapper methods so closes don’t race 2020-04-29 09:10:15 +02:00
Daniel Gultsch 0d4b175760 better failure behaviour after direct init from jitsi 2020-04-29 08:51:38 +02:00
Daniel Gultsch f93bac6d73 catch ISE around peerconnection.dispose() 2020-04-28 20:15:23 +02:00
Daniel Gultsch faf1ff365d modify call connected tone 2020-04-28 11:22:42 +02:00
Daniel Gultsch 27bf871472 play beep when voice call connects 2020-04-28 07:30:27 +02:00
Daniel Gultsch fc4397e5b9 play busy and dial tones 2020-04-27 17:51:38 +02:00
Daniel Gultsch 07911b2094 indicate ongoing call. fixes #3675 2020-04-27 11:53:31 +02:00
Daniel Gultsch 9fbf73d1ea do not log failed calls that never rang 2020-04-26 10:38:19 +02:00
Daniel Gultsch c41033e83c only take udp candidates from transport-info 2020-04-25 20:13:08 +02:00
Daniel Gultsch 4f5415ecba terminated rtp connection do not count as busy 2020-04-24 09:41:54 +02:00
Daniel Gultsch c0036b4ca6 increase busy timeout to 30s 2020-04-24 09:16:59 +02:00
Daniel Gultsch 96f6ae2b49 additional null check in case to is null 2020-04-23 20:11:45 +02:00
Daniel Gultsch 80cac3bd69 disable tcp candidates 2020-04-23 19:51:58 +02:00
Daniel Gultsch a008993d06 add 20s busy timeout to incoming calls 2020-04-22 21:59:20 +02:00
Daniel Gultsch 892d913e2c parsing iq erros also need to finish the connection 2020-04-22 18:42:07 +02:00
Daniel Gultsch 9fa9ca9cbc catch securityException when parsing rtp description 2020-04-22 16:35:08 +02:00
Daniel Gultsch 9afac21b0b don’t throw when user double taps accept button 2020-04-22 14:49:48 +02:00