Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we handle incoming call using VOIP push for twilio client?

I have develop VOIP call functionality using TWilio Client iOS SDK. I get success to App to App call between two user. I have three case for App to App call.

Case 1 : User 1 and User 2. User 1 have a active app and User 2 have also active app. In this case I have successful establish call between them.

Case 2 : User 1 and User 2. User 1 have a active app and User 2 have Inactive app(Background app mean minimize app). I have an implement local notification in this case and i get local notification.

Case 3 : User 1 and User 2. User a have a active app and User 2 have a suspended app (App is kill). For this case i have implement voip push notification. User 2 get voip push notification. When user 2 click on push notification nothing happen. Call is not establish.

I have manage twilio client token and also ask user to accept , reject and ignore call.

I have message from twilio that use below link : https://www.twilio.com/help/faq/twilio-client/twilio-client-ios-sdk-background-best-practices

I follow all step as mention in doc. But call is not establish after app is suspended (App is kill). How twilio client is listen current user when app is kill. How can we establish call ? many many question are in my mind.

I post question previously in stack Can we do VOIP push notification using Twilio iOS SDK?

How can i resume twilio device connection when app is open from push notification?

I also contact twilio developer but nothing happen.

Please please help me as soon as possible.

like image 946
Wos Avatar asked Jun 16 '16 07:06

Wos


People also ask

How does twilio handle incoming calls?

Twilio makes answering a phone call as easy as responding to an HTTP request. When a Twilio phone number receives an incoming call, Twilio will send an HTTP request to your web application, asking for instructions on how to handle the call. Your web application will respond with an XML document containing TwiML.

What is push to VoIP?

What is a VoIP push? Answer: VoIP push notification is a background push that generates no alert or sound, and used to wake up an app and pass it the information about the incoming call. The app should display a local notification to users, and the call is established when the user swipes the notification.

How do you hold a call on twilio?

To put the caller on hold, simply POST to the Participants Resource.


1 Answers

Twilio Client doesn't have Apple's Push Notification Service integrated.

The suggested workaround is to integrate your own push-notification service and use the push-notification as a "fallback mechanism" that when the mobile client failed to connect to a callee (not due to rejection but some network connectivity issue or the callee is "not present"). Example for implementation:

  1. Set up the VoIP Push using the PushKit framework
  2. In the pushRegistry:didUpdatePushCredentials:forType: delegate method, save the device token as well as the Twilio client-name used in the capability token to set up the TCDevice, so that the application can send push notification to the device with the client-name associated with the notification device token (credentials).
  3. In the connection:didFailWithError: delegate callback method (assuming the scenario of "callee not reachable at the time"), trigger a push-notification from the caller mobile client application to notify the callee about the missed call.

Please tell me if this helps at all.

like image 69
Megan Speir Avatar answered Oct 28 '22 05:10

Megan Speir