twilio call inturuption by receiving sim call ios - ios

We are creating app for iPhone with twilio client to client call . We can achieve that successfully .
The issue is When i create a client to client call and call is in progress i receive another call on sim that inturrupted my twilio call.
Now when I am back to my app the call is disconnected!
How can we stop the call from disconnecting ? cant we reconnect the same call after the PSTN (sim) call hang up ??
Is it possible to put a call on hold while receiving a call ??? and rejoin again !
Please we do need to implement this thing in our app , Kindly guide me !

Related

How to receive multiple incoming calls in same browser device at the same time?

Currently we are getting incoming call in Twilio Javascript client device using the code below
Device.on('incoming', function(incomingCall) {
console.log(incomingCall)
incomingCall.accept();
});
We need to receive a second incoming call in the same device simultaneously, after answering the first call ( That is, when the first call is in progress )
We are able to receive the second call only if the first one is in ringing state, We have to find a solution to receive the second call while the first one is in progress
Thanks
In the Device options you need to set allowIncomingWhileBusy to true. Then when the Device receives an incoming call while there is already an active call, it will fire the incoming event.
Check out more detail in the Device Options documentation.

Get caller number from app when it is in background or in open state in iOS 10 or below?

I am looking for some source code for iOS 10 and below by which I can get the caller number when some phone call arrived and that call can be rejected by the application, if call is some fraud call (checking the local database). 

I have followed following post but did not get any fruitful result.
Via call kit: how to get the incoming call number by using callkit

True caller app already added that feature:
https://blog.truecaller.com/2016/10/26/truecaller-now-available-on-ios-10/

I think it is possible, can anyone help me by giving some idea or source code by which that can be achieved?
It is not possible to get caller's number when user receives a call. Truecaller has a lot of conditions for it to be able to show caller's details. The truecaller app should be active. The caller should call using the truecaller app. Both the calling and call receiving devices should be connected to the internet.
So what it basically does is that when a user presses the call button on the app to call somebody, they simply send him a notification that this person is calling you. It has nothing to do with CallKit and the caller id is not displayed on the call receiving screen.

Twilio Client - Sometimes no receiving disconnect from the caller

We're using twilio client (1.4) to place/receive calls and we have noticed that sometimes when the caller hangs up the call, twilio client doesn't receive the disconnect signaling and therefore, it keeps like it has a ongoing call.
Could we somehow avoid or minimize this behavior?
Regards,
Carlos
You can check call status issue in twilio website www.twilio.com with your credentitals. Go to calllogs and find the particular call(with SID- this Sid you can get it from twilio.device.incoming method ) and check the call status http response.(Most probably your statuscallback has some issue)

Twilio incoming call issue in twilio iOS Sdk

I am using twilio iOS sdk in my application and am having problem with incoming call . I can able to get incoming call, but the caller disconnect the call after he spoke i didn't get any callback in my app. so i can't able to identify that call has been disconnected in my app.
Note:
Right now I'm using the below callback method in my application, it has been called once when the incoming call is ignore, but it didn't call when the caller spoke and disconnect the call.
- (void)connectionDidDisconnect:(TCConnection *)connection
You might try to update your code with a call to - (void)disconnectAll after a caller disconnects.
https://www.twilio.com/docs/api/client/ios/tcdevice#disconnectAll
This a convenience routine that disconnects all current incoming and outgoing connections.

How can I cancel a Twilio call in iOS after it's been initiated?

I'm running into a problem with an app that I'm building that I'm a little stuck on.
I have an iOS app (handles initiating the call via Twilio SDK) that communicates with a Ruby on Rails back-end (handles the Twilio server side implementation) to enable communication between the iDevice and the phone number being called.
The issue I'm having is that when a call is initiated accidentally (user error or misunderstanding how the app works) and the user goes to terminate the call Twilio has already received the request to create the call and it still goes through.
I've tried disabling the TCConnection and the TCDevice using their respective disconnect methods ("disconnect" and "disconnectAll"), but I'm still seeing the call go through (phone number being called still receives the call from the Twilio side of things). I haven't tried anything on the server side of things because I'd like to avoid building a set of "oh &$^$%" protocols if I can avoid it.
Has anyone experienced this before? Does anyone have any suggestions? Is there anyway to terminate calls made accidentally?
Thanks in advance!
Checking back in to share what I've discovered after reaching out to Twilio support in the event anyone finds this in the future.
From Twilio support:
For canceling a call, you can use the REST API to modify the live call and set the Status to "completed", which will cancel a ringing call and end an established call:
https://www.twilio.com/docs/api/rest/change-call-state
So, in short, build some "oh #^%$*" protocols that you can ping as necessary to actively terminate any call that you need to. Not ideal, but the options are limited.

Resources