fix: Incoming VoIP calls playing "dial" sound when answered (#36225)

This commit is contained in:
gabriellsh 2025-06-20 19:08:24 -03:00 committed by GitHub
parent 689f6dfbaa
commit 93acfbe014
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@rocket.chat/ui-voip": patch
---
Fixes incoming VoIP calls playing "dial" sound when answered

View File

@ -69,7 +69,12 @@ const VoipProvider = ({ children }: { children: ReactNode }) => {
};
const onOutgoingCallRinging = (): void => {
voipSounds.playDialer();
// VoipClient 'outgoingcall' event is emitted when the call is establishing
// and that event is also emitted when the call is accepted
// to avoid disrupting the VoipClient flow, we check if the call is outgoing here.
if (voipClient.isOutgoing()) {
voipSounds.playDialer();
}
};
const onIncomingCallRinging = (): void => {