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

Regression: No audio when call comes from Skype/IP phone #24602

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

amolghode1981
Copy link
Contributor

@amolghode1981 amolghode1981 commented Feb 24, 2022

Proposed changes (including videos or screenshots)

The audio was not rendered because of re-rendering of react element based on
queueCounter and roomInfo. queueCounter and roomInfo cause the dom to re-render when call gets accepted
because after accepting call, queueCounter changes or a room gets created.
The audio element gets recreated. But VoIP user probably holds the old one.
The behaviour is not predictable when such case happens. If everything gets cleanly setup,
even if the audio element goes headless, it still continues to play the remote audio.
But in other cases, it is unreferenced the one on dom has its srcObject as null.
This causes no audio.

This fix provides a way to re-initialise the rendering elements in VoIP user
and calls this function on useEffect() if the re-render has happen.

Issue(s)

https://app.clickup.com/t/22hy1k4

Steps to test or reproduce

The issue is not consistently reproduced. Usually it is difficult to reproduce on local setup. It does not happen on Safari if the browser is refreshed for every call. But the reproducibility is > 40%.

  1. Login on rocket.chat agent.
  2. Use Provider trunk to call from cellphone/skype or use internal queue extension.
  3. Call the queue.
  4. Expect that MOH is heard.
  5. Call should ring on agent's console.
  6. When agent accepts the call, there is no audio.
  7. Customer can hear agent's audio but the agent does not hear customer's.

Further comments

This reloading of DOM happens for room creation as well. But the problem is not that significant.

Description :
The audio was not rendered because of re-rendering of react element based on
queueCounter and roomInfo. This causes the dom to re-render when call gets accepted
because after accepting call, queueCounter changes.
The audio element gets recreated. But VoIP user probably holds the old one.
The behaviour is not predictable when such case happens. If everything gets cleanly setup,
even if the audio element goes headless, it still continues to play the remote audio.
But in other cases, it is unreferenced the one on dom has its srcObject as null.
This causes no audio.

This fix provides a way to re-initialise the rendering elements in VoIP user
and calls this function on useEffect() if the re-render has happen.
@lgtm-com
Copy link

lgtm-com bot commented Feb 24, 2022

This pull request introduces 1 alert when merging 378bacb into 8242369 - view on LGTM.com

new alerts:

  • 1 for Expression has no effect

@casalsgh casalsgh changed the title [FIX] : Not able to hear audio when called from IP phone(Skype) Regression: Fix Not able to hear audio when called from IP phone(Skype) Feb 24, 2022
@casalsgh casalsgh added this to the 4.5.0 milestone Feb 24, 2022
@KevLehman KevLehman changed the title Regression: Fix Not able to hear audio when called from IP phone(Skype) Regression: No audio when call comes from Skype/IP phone Feb 24, 2022
@KevLehman KevLehman merged commit dbb2eab into develop Feb 24, 2022
@KevLehman KevLehman deleted the new/noaudio branch February 24, 2022 14:59
gabriellsh added a commit that referenced this pull request Feb 28, 2022
…age-template-2

* 'develop' of github.com:RocketChat/Rocket.Chat: (61 commits)
  Regression: Server crashing if Voip credentials are invalid (#24646)
  Regression: Extension List panel UI not aligned with designs (#24645)
  Regression: Queue counter aggregator for incoming/hanged calls (#24635)
  Regression: Fix double value on holdTime and empty msg on last message (#24630)
  Regression: If Asterisk suddenly goes down, server has no way to know. Causes server to get stuck. Needs restart (#24624)
  Regression: Prevent connect to asterisk when VoIP is disabled (#24601)
  Regression: Encode registration info as JWT when signing key is provided (#24626)
  Regression: Fix time fields and wrap up in Voip Room Contexual bar (#24625)
  Regression: Fix in-correct room status shown to agents (#24592)
  Regression: Do not show toast on incoming voip calls (#24619)
  Regression: Fix incoming voip call ringtone is not ringing (#24616)
  Regression: Mark all rooms as read modal closing instantly. (#24610)
  Regression: Fix translations for call started message (#24615)
  Regression: Bunch of settings fixes for VoIP (#24594)
  Regression: Admin Sidebar colors inverted (#24609)
  Regression: No audio when call comes from Skype/IP phone (#24602)
  Regression: Fixes in Voice Contextual Bar and Directory (#24596)
  Regression: Fix time format on Voip system messages (#24603)
  Regression: VoIP service button displayed when VoIP is disabled (#24598)
  Add support to namespace within micro services (#24581)
  ...
@pierre-lehnen-rc pierre-lehnen-rc mentioned this pull request Mar 1, 2022
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.

3 participants