File tree Expand file tree Collapse file tree 2 files changed +1
-23
lines changed
Expand file tree Collapse file tree 2 files changed +1
-23
lines changed Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments