Skip to content

Commit 4a0e2f7

Browse files
committed
chore(voip): iOS CallKit call-waiting + drop JS callee busy-reject after rebase
- AppDelegate: always prepareIncomingCall with storeEventsForJs true; no hasActiveCall/rejectBusyCall - MediaSessionInstance: remove single-call JS busy guard; keep requestPhoneStatePermission in startCall Made-with: Cursor
1 parent 385991d commit 4a0e2f7

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

app/lib/services/voip/MediaSessionInstance.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,6 @@ class MediaSessionInstance {
8585

8686
this.instance?.on('newCall', ({ call }: { call: IClientMediaCall }) => {
8787
if (call && !call.hidden) {
88-
if (call.role === 'callee') {
89-
// media-signaling emits newCall only when session goes from no call to has call; reject if app is busy with another id.
90-
const { call: existingCall, nativeAcceptedCallId } = useCallStore.getState();
91-
const activeCallId = existingCall?.callId ?? nativeAcceptedCallId ?? null;
92-
if (activeCallId != null && call.callId !== activeCallId) {
93-
console.log('[VoIP] Rejecting incoming call — busy with different call:', call.callId);
94-
call.reject();
95-
RNCallKeep.endCall(call.callId);
96-
return;
97-
}
98-
}
99-
10088
call.emitter.on('stateChange', oldState => {
10189
console.log(`📊 ${oldState}${call.state}`);
10290
console.log('🤙 [VoIP] New call data:', call);

ios/Libraries/AppDelegate+Voip.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,7 @@ extension AppDelegate: PKPushRegistryDelegate {
4040
return
4141
}
4242

43-
// Check BEFORE reporting — if the user is already on a call, we still must
44-
// report to CallKit (PushKit requirement) but will immediately reject it.
45-
let isBusy = VoipService.hasActiveCall()
46-
47-
// Keep DDP + timeout for busy reject, but do not expose this call via getInitialEvents.
48-
VoipService.prepareIncomingCall(voipPayload, storeEventsForJs: !isBusy)
43+
VoipService.prepareIncomingCall(voipPayload, storeEventsForJs: true)
4944

5045
RNCallKeep.reportNewIncomingCall(
5146
callId,
@@ -61,11 +56,6 @@ extension AppDelegate: PKPushRegistryDelegate {
6156
payload: payloadDict,
6257
withCompletionHandler: {}
6358
)
64-
65-
if isBusy {
66-
VoipService.rejectBusyCall(voipPayload)
67-
}
68-
6959
completion()
7060
}
7161
}

0 commit comments

Comments
 (0)