Commit Graph

84 Commits

Author SHA1 Message Date
Mario Jr
993c3a5a8a Do not show reconnect/disconnect message when new ICE candidates are found
Sometimes, when user already joined audio session, RTCPeerConnection may
find new ICE candidates, which triggers 'connected' state for peer's
'onconnectionstatechange' event. When this happens we process this
new state the same way when user is not running an audio session, which
makes html5client popup an annoying 'Audio Connected' message.
The audio keeps working fine, but this can make user think that there's a
connection issue, or the audio is reconnecting, while audio is ok.
2020-10-23 11:20:08 -03:00
Mario Jr
df67d2e680 Better handling audio reconnection
When getting disconnected with 1001 ("websocket closed unexpectedly" error) we were creating a new SIP session, therefore a new FreeSWITCH channel.
While reconnecting the socket, instead of closing the SIP session, we keep it alive during reconnection (audio should keep working in the meantime). When reconnected we keep using this same session (avoiding the creation of an extra one).
We also better handle WebSocket error codes from SIP.js.
FF immediately closes websocket when unloading page, so we now to stop user agent when 'beforeunload' event is triggered, to avoid leaving open sessions in FreeSWITCH when user leaves page.
2020-10-15 11:24:23 -03:00
Mario Jr
e9e436378a Correctly set audio input/output devices
When refusing ("thumbs down" button) echo test, user is able to select a different input device. This should work fine for chrome, firefox and safari (once user grants permission when asked by html5client).
For output devices, we depend on setSinkId function, which is enabled by default on current chrome release (2020) but not in Firefox (user needs to enable "setSinkId in about:config page). This implementation is listed as (?) in MDN.
In other words, output device selection should work out of the box for chrome, only.
When selecting an outputDevice, all alert sounds (hangup, screenshare , polling, etc) also goes to the same output device.
This solves #10592
2020-10-06 20:37:55 -03:00
Mario Jr
e1b9ad3536 Map stun/turn servers into WebRTC's iceServers, when using fallback stun 2020-10-02 16:19:55 -03:00
Mario Jr
49bfe9f48d Set stun/turn server for audio's peer in html5 client
Latest SIP.js version sets this using peerConnectionConfiguration property instead of UserAgent option.
This solves #10569
2020-10-01 10:16:48 -03:00
Mario Jr
619ffa0ec1 Port SIP.js to 0.17.1 release
This considerably changes the way we process audio signaling and start audio elements in user's browser.
We now avoid using AudioContext element for both microphone and listenonly calls, once it is unstable for some iOS devices (cracky audio, user stops hearing audio after a while).
Increased default value for listenOnlyCallTimeout: this avoids activating FreeSWITCH's fallback when ICE negotiation takes longer than 15sec (tested on DO).
Increased listenonly logs.
This fixes #8133 #10388
2020-09-25 20:26:22 -03:00
prlanzarin
dac3259c48 Merge remote-tracking branch 'pedrobmarin/bbb-multiple-webcams' into upstream-2.2-vpeg-base 2020-08-05 14:20:58 +00:00
Pedro Beschorner Marin
19e301e28e Add a minimum socket validation to full-audio connection 2020-07-29 13:10:17 -03:00
Anton Georgiev
ddb54273c1 Added callerIdName in audio logs where possible 2020-06-12 21:13:49 +00:00
prlanzarin
2cba85e866 html5: refactor STUN/TURN fetch, add fallback STUN, fix deadlock in audio join
Refactored STUN/TURN fetch to be done only once, when successful, per session and cache it in mem to avoid too many reqs. Current way is a bit dumb, this should increase reliability a bit more. The caching is configurable so folks who want to use very short lived TURN credentials can disable it

Add a fallback STUN config option to be used when the default STUN/TURN fetch fails

Clean the safari/no candidate generation pre flight check from 3rd party STUNs

Fix deadlock in audio join when STUN/TURN fetch failed
2020-05-21 04:35:17 +00:00
Chad Pilkey
5a678a4faf react to voice call state when connecting with FS LO 2020-03-04 10:25:54 -08:00
Chad Pilkey
ecfbe5e506 implmenent sip.js fallback for playing audio with web audio api 2020-02-29 00:38:30 +00:00
Chad Pilkey
6a4ba7a300 watch for voice call state updates instead of DTMFs in the client 2020-02-18 14:03:06 -08:00
Chad Pilkey
162dc4dbe4 the client will end the call when kicked 2020-01-09 15:50:10 -08:00
Chad Pilkey
f5cb7a64fb log the selected sip.js candidate 2019-12-18 16:11:24 -08:00
Pedro Beschorner Marin
5c71e2d0bb Included new getStats monitor for audio and video 2019-12-10 09:07:06 -03:00
Chad Pilkey
50365aa4da extra log messages for sipjs candidates 2019-12-05 16:33:38 -08:00
Chad Pilkey
66a705a87d hangup the sip.js call when a timeout hits 2019-11-22 13:48:46 -08:00
Chad Pilkey
c70577b05f add a counter to sipjs caller id 2019-11-13 16:00:47 -08:00
Chad Pilkey
927cbf35bb add option to reconnect audio with relay only 2019-10-26 02:57:49 +00:00
Anton Georgiev
612aca99e6 sipjs logCode-s preserve inconsistencies 2019-07-02 20:50:25 +00:00
Anton Georgiev
004547f681 prepend sip.js logCode-s 2019-07-02 19:56:25 +00:00
Anton Georgiev
3fcb95ab44 log structure {logCode, extraInfo}, comment 2019-06-28 21:45:50 +00:00
Anton Georgiev
fc1c4ed53f pass baseErrorCodes on SIPSession create 2019-06-25 19:13:31 +00:00
Anton Georgiev
8b53c32565 baseErrorCodes not defined 2019-06-24 20:41:58 +00:00
Chad Pilkey
cc7513279e IPv4 FS audio fallback, auto-reconnect, and fixed input select 2019-06-12 21:01:20 +00:00
Chad Pilkey
1e391695c1 strip mDNS candidates from sip.js SDPs 2019-06-03 18:54:30 +00:00
prlanzarin
9a563a006c Fixed typo in toPlanB conversion
Also tidy some stray lines
2019-05-21 17:38:22 +00:00
prlanzarin
8a7b53db20 Fixed safari detection on sip.js bridge 2019-05-21 16:56:57 +00:00
prlanzarin
ca9a0fad4a Added unified-plan/plan-b translation for Safari endpoints 2019-05-21 16:48:01 +00:00
Chad Pilkey
2bee179eff improved audio connect and transfer 2019-05-09 21:01:34 +00:00
Chad Pilkey
8c9d09dd49 increase audio timeouts in HTML5 2019-04-12 15:23:22 -07:00
Chad Pilkey
242a9f019f add transfer dtmf resend for firefox users 2019-03-14 14:02:51 -07:00
Chad Pilkey
5827ec7ff5 increase call connect timeout and only apply to firefox 2019-02-21 13:58:27 -08:00
Chad Pilkey
50670365c5 dont log ice closed if user requested hangup 2019-02-21 12:53:39 -08:00
Chad Pilkey
160ea38f5b Replace double quotes in audio name with single quotes 2019-02-21 12:49:04 -08:00
Chad Pilkey
89b8189087 html5 sipjs bridge has useful errors now 2019-02-20 13:58:37 -08:00
Anton Georgiev
cd531f91ff
Merge pull request #6702 from MaximKhlobystov/html5-logs
Improve logging
2019-02-01 16:03:23 -05:00
Maxim Khlobystov
b86a990612 Add logCode and build number to log messages 2019-02-01 14:12:06 -05:00
Chad Pilkey
f2ba2c8bc9 update the html5 sipjs logging with more messages 2019-01-31 15:15:29 -08:00
Chad Pilkey
d5189549bf webrtc call is ready in Edge when ICE completed not connected 2019-01-29 16:11:20 -08:00
Chad Pilkey
032460480d update the version of adapterjs and renable sipjs logging 2019-01-25 10:03:01 -08:00
Gustavo Trott
6d4cca9306 Fix audio in ios webview 2018-12-21 15:14:05 -02:00
Chad Pilkey
7e99929214 [HTML5] delay the notfication that the echo test is connected 2018-10-29 09:41:05 -07:00
Fred Dixon
c807da095f
Update sip.js
Fix #6167
2018-10-24 16:26:20 -04:00
Bobak Oftadeh
a5354c9c10 Merge branch 'v2.0.x-release' of https://github.com/bigbluebutton/bigbluebutton into fixes3 2018-07-13 12:18:55 -07:00
Bobak Oftadeh
c98bd10024 Replaced console.errors with client logger and alterted logger configurations 2018-07-13 12:16:50 -07:00
prlanzarin
d2bdb67ed3 Propagating configs to WebRTC screenshare script and added support for STUN/TURN config to SFU components 2018-07-09 21:29:59 +00:00
Anton Georgiev
915c1bae8b
Merge pull request #5757 from Tainan404/issue-5714
Add some messages about audio errors
2018-07-03 11:22:45 -04:00
prlanzarin
8c50ddf762 Removed audio failure listeners on graceful exit 2018-07-02 16:36:54 +00:00