Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: voip call history doesn't always log the correct call information #35006

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

pierre-lehnen-rc
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc commented Jan 22, 2025

Proposed changes (including videos or screenshots)

Issue(s)

Several problems with the data currently stored on the VoIP call history:

  • It doesn't always identify the right caller / callee.
  • It logs too many "empty" calls that didn't happen (Still unknown why freeswitch is sending the events that are causing those in the first place)
  • If the same freeswitch server is used elsewhere, it is logging all of its calls as if the rocket.chat workspace had been involved on them.
  • If the same freeswitch server is used in multiple workspaces, it will log every call in every workspace, each of them with their own users.

Steps to test or reproduce

Further comments

  • this is technically a regression;
  • wip
  • moved the event parsing code from the freeswitch service to the freeswitch package as it was getting too big.
  • changed the schema of the collecions used to store the events and calls (including an index)
  • changed the client to send custom data to the freeswitch server, such as the workspace url - this is then used to identify if the call should be logged or not and also to identify which users are internal or external.

Caveats:

  • If an incoming external call doesn't reach the rocket.chat user (either because they are offline or because they ignored the call without accepting or rejecting it), then the server will not receive any workspace information from the client and the call will not be logged. If the call was initiated from another rocket.chat workspace, it'll be logged as "internal" there.

Copy link
Contributor

dionisio-bot bot commented Jan 22, 2025

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Jan 22, 2025

⚠️ No Changeset found

Latest commit: edf86bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 22, 2025

PR Preview Action v1.6.0

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35006/

Built to branch gh-pages at 2025-01-24 00:22 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 6.89655% with 27 lines in your changes missing coverage. Please review.

Project coverage is 59.29%. Comparing base (c9a5c78) to head (f423ba7).
Report is 16 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #35006      +/-   ##
===========================================
+ Coverage    59.18%   59.29%   +0.10%     
===========================================
  Files         2822     2822              
  Lines        68131    68003     -128     
  Branches     15149    15102      -47     
===========================================
- Hits         40320    40319       -1     
+ Misses       24979    24852     -127     
  Partials      2832     2832              
Flag Coverage Δ
unit 75.42% <6.89%> (+0.41%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant