WebsiteBeaver / CordovaCall

Cordova CallKit & ConnectionService plugin for iOS/Android that displays the native call UI for VOIP apps
MIT License
196 stars 91 forks source link

No answer timeout #61

Open abardik opened 5 years ago

abardik commented 5 years ago

Hi! Is it possible to add a timeout to be fired when a receiver did not answer the call in N seconds? I'm asking because on iOS there is no way to setTimeout to be fired in the background. If I set it in receiveCall, it never fires because the app goes to the background after few seconds a push notification has been received and cordova-call UI is shown. So, the only way I can handle it it's to send a "cancel" push notification from the sender's side and then close cordova-call UI on the receiver's side. But if a sender ends a call by swiping the app out, the "cancel" push will never be sent and cordova-call UI will ring forever. So, it would be very convenient to be able to set a no answer timeout in cordova-call, which, I beleive, can emit it natively.

AleksandarTokarev commented 3 years ago

@abardik Did you find a way to do this ?

abardik commented 3 years ago

@AleksandarTokarev I found a workaround, it's heavy and ugly, but it does the job. Since every call offer and subsequent answer and candidates are going through the signal server, it's possible to set a timeout on the server side and send a "cancel" push if the call is not established.