Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOS] Not receiving calls if App is not opened for few days #239

Open
soapthepro opened this issue Jun 14, 2024 · 4 comments
Open

[IOS] Not receiving calls if App is not opened for few days #239

soapthepro opened this issue Jun 14, 2024 · 4 comments
Assignees

Comments

@soapthepro
Copy link

Issue Summary

If my IOS app is in terminated state for a few days (3-4 days) then it just stops receiving phone call. In twilio console I can see that an attempt was made to call on my client but there's no ring. Its like the second the call is made from twilio to my client, the very next second the call ends with "no-answer" status and twilio console shows no error logs. But If I open my app, logout or login and then try, then it works perfectly fine.

Steps to Reproduce

  1. Keep the app in terminated state for few days then try calling
@bazl-E
Copy link

bazl-E commented Jun 18, 2024

@soapthepro It's not because of the package error, it's because the call token will only have a maximum validity of 24 hours you should implement some other methods to token every 24 hours

@soapthepro
Copy link
Author

@bazl-E Hey, I have seen many forums and ticket and from my understanding, after the device is registered with a valid token and if that token expires after any x amount of time, the incoming call shouldn't face any issues because firebase handles it differently and they have some other type of token and works on device token rather than the twilio token that we generate. The token that we generate is mainly used for outbound calls only.

And regarding refreshing it every 24 hours or early, I don't think it is possible in IOS. I have seen some packages that allow to execute some code in background but almost all of them have certain restrictions for IOS which makes it really difficult to execute the code of this package in background when the app is terminated.

I am still awaiting the reply from @cybex-dev on this but I am pretty sure that after successfully registering once with valid token, we should receive the call even after that token is expired.

@cybex-dev
Copy link
Owner

Hi everyone

The limitation (TTL) of Twilio tokens are for outbound calls only. After a maximum of 24 hours (set upon generating the token), attempting to make any further calls will be met with an Twilio token expired error however calls should still be received for as long as the device's APNs token is valid (and able to receive Apple Push Notifications).

See this for more information: https://www.twilio.com/docs/voice/sdks/ios/faq#incoming-calls-and-registration-for-push-notifications.

@thetyagiayush
Copy link

Hey @cybex-dev Yes, I knew that I should be receiving calls even after expiration of token but somehow there arises a situation when the iOS app stops receiving incoming calls. Although it only happened twice to my clients, I am not sure what it can be. A simple application start fixed the issue for one of them and for the other we have to reinstall the app, so I am guessing it can be something on the app level too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants