Commit Graph

1713 Commits

Author SHA1 Message Date
Anton Georgiev
e62710298d
Fix typo 2020-11-30 15:59:12 -05:00
Joao Siebel
c0f42a3c07 Add missing semicolon 2020-11-30 17:11:57 -03:00
Joao Siebel
77d493792f Prevent a case where voiceUser collection was being clean for entire server 2020-11-30 17:01:41 -03:00
Tiago D J
1e4c634dd9
Merge branch 'v2.2.x-release' into remove-callbacks 2020-11-27 13:43:36 -03:00
Anton Georgiev
08a0a38f30 do not log client issues to Winston, only via nginx 2020-11-26 15:39:04 -05:00
Anton Georgiev
698199454c Reduce cursor logging, fix ExternalVideo object logging 2020-11-26 15:31:00 -05:00
Joao Siebel
ccda3b3a34 WIP remove callback from update methods 2020-11-26 13:23:57 -03:00
Joao Siebel
e4a5e88986 Fix selectors 2020-11-26 10:36:44 -03:00
Mario Jr
214cd12c59 Fix typo on dtmf log 2020-11-26 00:01:58 -03:00
Mario Jr
370e3cb39d Use INFO message as default for sending dtmf on call transfer
Instead of sending using rfc4733 standard, we use INFO message for all transfers
INFO message was used in older SIP.js version. Although this is not a standard for sending DTMF tones, this has more reliability (once it sent over TCP)
This might reduce occurrences of 1008
2020-11-25 18:33:45 -03:00
Joao Siebel
11f1a1ac47 Merge remote-tracking branch 'upstream/v2.2.x-release' into remove-callbacks 2020-11-25 10:54:18 -03:00
Joao Siebel
a244fc1acf WIP remove callback from remove operations 2020-11-24 17:44:13 -03:00
Anton Georgiev
21644a1a43 Remove string interpolation for server debug and verbose logs 2020-11-23 14:35:59 -05:00
Mario Jr
af48c8977d Reduce delay for the first reconnection attempt of audio's websocket
This is the same behavior we used to have on older sip.js version code
By doing this we reduce errors when user try to perform join/hangup during an websocket reconnection
2020-11-23 12:40:38 -03:00
Joao Siebel
bcc1d6c880 WIP remove callback from mongo operations 2020-11-23 10:13:46 -03:00
Mario Jr
2b89dd7db2 Do not trigger reconnect when ICE connection terminates before hanging up process is finished
This could leave users to have your audio reconnected in the main room, while joining a breakout room
Some information can be found in #10528
2020-11-20 00:25:46 -03:00
Mario Jr
9a2fcd27e0 Revert "Prevent Error 1006 when user has two or more occurrences of ':' (colon) in your name"
This reverts commit 0a601359bb.
2020-11-20 00:23:43 -03:00
Joao Siebel
4a88d0a6db Handle chat messages in sync way 2020-11-18 18:09:38 -03:00
Mario Jr
0a601359bb Prevent Error 1006 when user has two or more occurrences of ':' (colon) in your name
This happens because FreeSWITCH is not able to parse the "From" header when it has multiple occurrences of ':'. So user is not able to join audio.
To fix, we now changed the "callerId" to use the base64 value of the user name, instead of directly using user's input (the callerId format keeps being a triple like this: <user_id>-bbbID-<base64_encoded_name>).
Once this callerIdName is encoded at the same point it is generated, there shouldn't be server side effects for changing this value; except for those places where the callerName is retrieved by splitting this triple (such as the voice talking-indicator, as described below).
Updated the talking-indicator to retrieve the username from User's object, instead of retrieving from the one username generated by splitting the callerId triple.
This problem also happens in versions <= 2.2.26.
2020-11-17 15:31:43 -03:00
prlanzarin
a1f0276b64 [html5/audio] Add hackViaWs to SIP.js and make it configurable in settings.yml, 1002 workaround
This adds the possibility to configure the SIP Via header to plain WS to allow reverse proxying from WSS to WS, internally, to work around a bug in freeswitch where the WSS stack would get deadlocked due to a still unidentified bug in there that has to do with SSL termination
2020-11-10 15:04:45 +00:00
Mario Jr
b948bea11b Force using plan-b as default sdpSemantics for chrome
Although Chrome's default is now unified plan, Chrome <-> FreeSWITCH ICE connection fails for some Chrome installations (specially those running on Windows).
FS ICE fails when Chromes's SDP has "a=mid:<index>" (instead of "a=mid:audio").
This fixes Error 1010 and situations where echo test takes too long.
This fixes #6414 regression, once we do the same older version of SIP.js used to do.
2020-11-09 21:58:16 -03:00
Mario Jr
46e0c263fe Use iceConnectionState to monitor ICE connection status
We now use both peer's connectionstatechange and iceconnectionstatechange to monitor ICE state for audio sessions.
The same way we did with old sip.js version, we leave iceconnectionstate trigger audio actions , such as connect, disconnect, reconnect.
We still listen for 'failed' state for connectionstatechange event, because chrome triggers this (tested on 86+).
This should reduce the audio error 1010 ocurrences, once some browsers (specially Chrome/Android) don't trigger connectionstatechangeevent.
This might reduce problems reported in #10708, which still needs more investigation though.
2020-11-08 22:43:52 -03:00
Richard Alam
e28bba42fc
Merge pull request #10742 from KDSBrowne/2.2-issue-10705
Prevent users from sending multiple votes per poll
2020-11-06 16:33:56 -05:00
Mario Jr
3a689578c6 Monitor peer's iceconnectionstatechange event
This gives more information about ICE connection, combined with onconnectionstatechange event
2020-11-06 09:37:58 -03:00
Mario Jr
2585d957e8 Correctly map WebSocket error
Maps WebSocket's 1006 error to BBB's 1002, the same way it was done with old sip.js version
Set user agent's number of reconnection attempts to the same value as older sip.js version
2020-11-06 09:25:40 -03:00
KDSBrowne
2468ac225c return null in publishVote if user already voted 2020-11-05 17:02:31 +00:00
KDSBrowne
5076a2accd fix typo / use operator / add log 2020-11-05 14:19:36 +00:00
KDSBrowne
d2cb02b3bd prevent users from being able to send more than 1 poll vote 2020-10-28 18:33:09 +00:00
Mario Jr
3e3b648040 Properly stops userAgent / peer when audio connection/reconnection fails
Changed the maximum attempts of the UserAgent reconnection (this should be changed when binding audio's websocket to meteor's connection state).
Added a log to monitor WS reconnect attempts.
2020-10-28 15:04:30 -03:00
Mario Jr
d1e5f189ba Prevent 1005 error log when user close/reload bbb's window/tab
When closing/reloading tab with active microphone, audio exits successfully but a wrong log-error (1005) is shown.
We now process closing/reloading tab the same way we do when user hangup the call.
2020-10-25 16:12:58 -03:00
Mario Jr
18c20261e1 Change default value of iceGatheringTimeout to current's SIP.js default
For some reason (still investigating), using turn/coturn on 443/tcp makes firefox's iceGathering process (during echo test) takes 12+ seconds (tested on webrtc's trickle page with multiple instances).
This was found when testing the current default (15s) on production with a private turn/coturn server on port 443/tcp. For default bbb setup (stun only), echo test still runs fast.
To avoid adding extra delay to iceGathering on this scenario (Firefox + turn on 443/tcp), i am just setting the default value back to the 5s (old default).
So , for those who wants to reduce the 1004 occurrences, increasing the iceGatheringTimeout could help (just be aware this adds delay on the mentioned scenario).
2020-10-24 08:58:25 -03:00
Mario Jr
a86ff72aa3 Increase default iceGatheringTimeout
Added a default 'MEDIA' option: iceGatheringTimeout. This option allows admin to set a higher ICE gathering timeout, which can help when getting ICE errors during audio negotiation (eg 1004)
Default value set to 15s (current default is 5s).
2020-10-23 11:21:20 -03:00
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
Anton Georgiev
70eb028da9
Merge pull request #10667 from jfsiebel/improve-streamer-and-error-logs
Improve annotations and cursor streamer logs
2020-10-16 14:42:05 -04:00
Joao Siebel
109c18beb0 Improve annotations and cursor streamer logs, also add a type info for some logs in authentication process
and rollback some attempts to fix multiple leaving end call.
2020-10-16 10:30:50 -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
Anton Georgiev
b1e57e3d2f
Bump up log level of forced meeting end 2020-10-14 09:44:17 -04:00
Anton Georgiev
adcb05b1ec
Merge pull request #10612 from jfsiebel/improve-logs
Improve  log in/authentication logs
2020-10-09 13:43:09 -04:00
Anton Georgiev
bf555dc047
Merge pull request #10564 from KDSBrowne/2.2-publishVote-error
Fix exception while invoking method 'publishVote'
2020-10-09 13:36:21 -04:00
KDSBrowne
9827664efc fix textArea width / height sent from client 2020-10-09 14:20:22 +00:00
Joao Siebel
14388ec922 Improve logs for a better debug/understanding of problems related to authentication and log in process 2020-10-07 16:50:17 -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
Anton Georgiev
95277836f8
Merge pull request #10580 from mariogasparoni/v2.2.x-release
Set stun/turn server for audio's peer in html5 client
2020-10-02 13:50:35 -04:00
Joao Siebel
895e82f260 Remove unused method 2020-10-01 15:32:24 -03:00
Joao Siebel
78ead44d17 Fix reconnection flow 2020-10-01 14:31:38 -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
Joao Siebel
db7164253d Prevent repeated setUserId 2020-09-29 18:02:03 -03:00
Anton Georgiev
3ddf834de0
Merge pull request #10549 from jfsiebel/prevent-multiple-on-close-handler-attach
Prevent multiple on close handler attach
2020-09-29 12:57:55 -04:00
Anton Georgiev
64efa67412
Merge pull request #10548 from jfsiebel/rework-session-token-check
Add extra check for sessionToken
2020-09-29 12:39:02 -04:00