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

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.

Related

How to close Callkit UI when call is not connected

I'm using Twilio Programmable Voice SDK. I'm facing an issue where call doesn't connect but CallKit UI starts. When I send app into background I can see the CAllKit UI running with green notification bar at the top.
There seems to be some issue with Twilio which twilio support hasn't been able to figure out and can't provide a solution.
As a workaround I want to close CallKit UI after a time interval when call doesn't connect.
I know how to kill CallKit UI when a call is connected but this doesn't apply in my case as call isn't connected at all.
My question is how do I kill CallKit UI when call isn't connected?
My issue is exactly similar to what is reported here How to close call kit when call doesn't connect but call kit ui is running in the background
Please read it again.
Call is not connected but CallKit UI is started and I want to close it. Note that when a call is not connected you will not get uuid hence you can't call disconnect.
Looking at the ViewController code, it seems like the UUID should be stored in one of this two members:
var callInvite: TVOCallInvite?
var call: TVOCall?
In the case of an incoming call that has not been already answered the UUID is contained in callInvite, otherwise (i.e. outgoing call or answered incoming call) in the call object.

Phone Call Recording in iOS

In phone.app (iOS Native calling app), Is there any mean by which I can perform task like
1.Identify the caller (Incoming and Outgoing), so that on the behalf of caller I can perform some task.
2.Recording of call.
3.If some audio recording already in running state then how a call record can be handled.?
In my finding a reached at below outcome
1. CTCallCenter class have the information about call but i don't get phone number.
2. Call recording is not possible as there is no Apple API to do so.There are some apps on app store but they are not capable to record the call from phone.app. I think they are recording the call by their server (3 Way call.)
3. I think it will lead towards a crash as phone call is a high priority task so that the control of mic and speaker is given to phone call.
Is there any way to get expected result ? Is it possible with call kit.?
Thanks.
Unfortunately, what you're asking for is not possible as far as I know. Your app can be aware of incoming calls and their states, but not access the phone number. Using the CallKit APIs introduced in iOS 10, you can provide a label for an incoming phone number, but even then you have to set up a predefined list of numbers and labels. Your app won't know which number called. See "Identifying Incoming Callers" in the documentation and this SO question.
As for recording calls, there are no ways to do this without introducing a third party to the call, or routing the call to a service you control.
Regards,
Martin

Hooks for phone call state iOS

I am looking for something similar to what is TrueCaller doing for android Don't know how it works in iOS, is it same way ?
Basically what is need is
A hook method to get call when call state changes.
And should be able to get the details in hook like phone number etc.
And make call to service with phone number for displaying name (unknown in case of no user found in our service) of who is calling in the screen.
Core Telephony does not allow you to retrieve any other information that the connection state.
So you CAN NOT get the phone number that is calling you, this has to do with privacy.
The CTCall Class only has two properties:
callID which is jus a unique id for this call, but not the phone number.
callState which is the state of the call, which is CTCallStateDialing, CTCallStateIncoming, CTCallStateConnected or CTCallStateDisconnected.

How to intercept and parse incoming calls via an app

How does Truecaller intercept incoming phonecalls on the iphone to display caller ID?
I didn't think this was possible from within the app?
Specifically, if I wanted to build this functionality, what protocols would I go about using?
http://www.truecaller.com/how-it-works
On an iPhone, without jailbreaking it:
- you cannot intercept a call in any way
- you cannot determine the phone number nor the caller ID identifying information regarding the call. Even if you could there
is no way to alter what is displayed on the call screen
- you cannot block the call
- your program can get a notification when a call is being made/terminated etc. But only if your app is executing in the
foreground at the time of the call or if the app is in the
background and has a relevant background mode (even then you can
only know there is a call in some circumstance, depending upon what
you're doing in the background and what state your in etc. Its too complex to describe the exact situation here briefly)
True Caller doesn't do that on iOS as it isn't supported with the native SDK. See their FAQ:
http://www.truecaller.com/support , specifically the "Why don't I receive live caller ID?" Section under "iPhone/Windows Phone". If you must though, try looking into a solution for jailbroken devices.
It's impossible to "intercept" calls. It is possible to handle the "background event call" when a iPhone get's a call. That said, Truecaller doesn't intercept calls. More info can be found on their website.

Intercept incoming call ios sdk (Non Jailbreak)

Hi i have tried for bundle of times and find out that iOS SDK does not give us access due to security reasons for getting following data;
Intercept an incoming call (Getting phone number from incoming call)
Read Call history
Intercept SMS (Getting phone number from incoming SMS and reading its contents)
Block an incoming call
etc
Here are some of the links resulting from my search about this issue:-
How can I get the callers phone number from an incoming call on iphone
http://iosstuff.wordpress.com/2011/08/19/accessing-iphone-call-history/
Programmatically get the number of the incoming call
Can I fetch details of the incoming call phone number in my applicaton?
Hook into incoming call?
handling an incoming call through an app in iphone xcode
Identify number of incoming call in iPhone
I also found that CoreTelephony CTCall object provide us only limited info, Just call state and its unique Id. But nothing else we can get by using CoreTelephony framework.
But, I have seen one application on app store that does gets incoming call phone number.
I wonder how this app
Callinize iPone App
works and gets incoming call info?
I also want the same thing to do with my app. But i did't find such a way to do. Please help if you can.
Thanks!
I'm late to the party here, but I was just reading the description of Callinize. They built an integration with the Asterix pbx system and it only works with Asterix. So this app does not really access iOS phone calls.

Resources