Skip to content

Commit 9303ff5

Browse files
committed
fix(voip): tag OS-originated end events as 'remote' in MediaCallEvents
The CallKit/Telecom endCall listener fires when the OS terminates the call, not when the user presses the in-app end button. The previous code delegated to mediaSessionInstance.endCall(), which always tagged the reason as 'local'. Now dispatches callLifecycle.end('remote') directly so the callEnded event carries the correct reason. MediaSessionInstance.endCall remains the 'local' (in-app button) path called from CallView.
1 parent 44d741b commit 9303ff5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/lib/services/voip/MediaCallEvents.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { isIOS, normalizeDeepLinkingServerHost } from '../../methods/helpers';
22
import type { VoipPayload } from '../../../definitions/Voip';
33
import { registerPushToken } from '../restApi';
4+
import { callLifecycle } from './CallLifecycle';
45
import { MediaCallLogger } from './MediaCallLogger';
56
import { mediaSessionInstance } from './MediaSessionInstance';
67
import { useCallStore } from './useCallStore';
@@ -88,7 +89,7 @@ export function createVoipEventDispatcher(adapters: MediaCallEventsAdapters): (e
8889
switch (e.type) {
8990
case 'endCall': {
9091
mediaCallLogger.log(`${TAG} End call event listener:`, e.callUuid);
91-
mediaSessionInstance.endCall(e.callUuid);
92+
callLifecycle.end('remote');
9293
return false;
9394
}
9495

0 commit comments

Comments
 (0)