twilio / voice-quickstart-objc

Twilio Voice Quickstart for iOS with Objective-C
MIT License
39 stars 24 forks source link

Not receiving push notifications for incoming calls #178

Closed emostar closed 5 years ago

emostar commented 5 years ago

Description

I'm unable to receive push notifications of incoming calls. I am using Flutter and Firebase Messaging, and have it setup to receive push notifications from Firebase.

I configured the VOIP certificate and uploaded the certificate and private key to Twilio. When I make a call to the number that outputs the TwiML, it rings, but I don't see any log output for my iOS device.

An example call SID is CA7d6c2573f8f931810973e8f2ee311e89

Steps to Reproduce

Code

Expected Behavior

Push notification to be delivered

Actual Behavior

No push notification is received

Reproduces How Often

100% of the time

Logs

2019-07-26 13:35:36.836880-1000 Runner[12231:2130094] Twilio Voice Version: 4.1.0
2019-07-26 13:35:37.880867-1000 Runner[12231:2130094] TRACE:Twilio:[Platform]:Registering for Twilio push notifications
Access Token:   ey...
VoIP Registry Token:    <2f4d84e6 ....>
2019-07-26 13:35:37.882316-1000 Runner[12231:2130094] DEBUG:Twilio:[Platform]:Register for push notifications.
2019-07-26 13:35:38.590459-1000 Runner[12231:2130174] DEBUG:Twilio:[Platform]:Completed registration request.
2019-07-26 13:35:38.590547-1000 Runner[12231:2130094] INFO:Twilio:[Platform]:Inside register:deviceToken:completion:, registered for Twilio push notifications.
2019-07-26 13:35:38.590569-1000 Runner[12231:2130094] Successfully registered for VoIP push notifications.

Versions

All relevant version information for the issue.

Voice iOS SDK

4.1.0

Xcode

10.2.1

iOS Version

12.3.1

iOS Device

iPhone XR

bobiechen-twilio commented 5 years ago

Hi @emostar

Thanks for providing the Call SID. It looks like the status-callback URL you provided in your response returned a 405 response, thus caused a failure when the Twilio Voice service tried to connect to the callee. Could you check the status of the callback?

Thanks -bobie

emostar commented 5 years ago

Hi @bchen-twilio

Thanks for the quick reply.

I have it working on Android despite the 405 response for the status callback. I went ahead and removed that, but am experiencing the same issue.

The latest call SID is CA64cd503c8eac8a4e68d29cd096cbf0f3

Thanks

bobiechen-twilio commented 5 years ago

Hi @emostar

Thanks for the update. I've checked the Call SID and the callee identity, and confirmed that the notifications were delivered to Apple's APN/VoIP service for callee. Are you not able to see the didReceiveIncomingPushWithPayload callback being triggered? You may also want to check the device log from the Mac OS Console app and see if the device does receive the notification but somehow the they were not delivered to the app.

-bobie

emostar commented 5 years ago

Thanks for the quick update again @bchen-twilio, it is really appreciated.

I was expecting the message to come through Firebase, but the callback you mentioned was the one that was getting triggered, after I implemented it. I was worried it was something to do with Flutter or Firebase... but it looks like I should be able to handle it from here. Thanks again!