I'm using PushKit + CallKit and Agora for my app video call feature. So far everything works as expected, but I'm not entirely sure how to handle the following situtation:
Given:
User A (with account A1) logs into device 1, 2 and 3.
User B (with Account B1) logs into device 4 and calls user A via an in-app video call feature.
At the moment:
Devices 1, 2 and 3 all ring given the condition above. User A accepts the call via device 2. Device 1 and 3 continue to ring (which is expected) until timeout or picked up.
What I want:
I would like to end the call/ring on device 1 and 3, as soon as user A accepts the call via device 2. Currently there is a timeout, but I dont want to rely on that.
Is there an elegant way to handle this? I was thinking about letting device 2 notify my api server that it has accepted the call, so that the server can notifies device 1 and 3 to end the call/hang up early.
Using another VoIP notification in this case might not work, because I read via Apple docs that all VoIP Notification handler call must use reportNewIncomingCall(with:update:completion:) to report an incoming to call to the system or risk getting shut down otherwise.
Given:
User A (with account A1) logs into device 1, 2 and 3.
User B (with Account B1) logs into device 4 and calls user A via an in-app video call feature.
At the moment:
Devices 1, 2 and 3 all ring given the condition above. User A accepts the call via device 2. Device 1 and 3 continue to ring (which is expected) until timeout or picked up.
What I want:
I would like to end the call/ring on device 1 and 3, as soon as user A accepts the call via device 2. Currently there is a timeout, but I dont want to rely on that.
Is there an elegant way to handle this? I was thinking about letting device 2 notify my api server that it has accepted the call, so that the server can notifies device 1 and 3 to end the call/hang up early.
Using another VoIP notification in this case might not work, because I read via Apple docs that all VoIP Notification handler call must use reportNewIncomingCall(with:update:completion:) to report an incoming to call to the system or risk getting shut down otherwise.