Hi,
I am currently working on an iphone app where i have to make a call from my iphone app, which i am able to do. But i want to know the status of the call i.e. whether the call is active, or diconnected and so on...
I found some code for this as below using CTCallCenter class of Core Telephony framework. The code is below...While implementing this i am getting some error. I am not understanding where exactly to use this. Can anyone help me out on this
CTCallCenter *callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler=^(CTCall* call)
{
if (call.callState == CTCallStateDisconnected)
{
NSLog(@"Call has been disconnected");
}
else if (call.callState == CTCallStateConnected)
{
NSLog(@"Call has just been connected");
}
else if(call.callState == CTCallStateConnected)
{
NSLog(@"Call is incoming");
}
else
{
NSLog(@"None of the conditions");
}
};
Thanks in advance
I am currently working on an iphone app where i have to make a call from my iphone app, which i am able to do. But i want to know the status of the call i.e. whether the call is active, or diconnected and so on...
I found some code for this as below using CTCallCenter class of Core Telephony framework. The code is below...While implementing this i am getting some error. I am not understanding where exactly to use this. Can anyone help me out on this
CTCallCenter *callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler=^(CTCall* call)
{
if (call.callState == CTCallStateDisconnected)
{
NSLog(@"Call has been disconnected");
}
else if (call.callState == CTCallStateConnected)
{
NSLog(@"Call has just been connected");
}
else if(call.callState == CTCallStateConnected)
{
NSLog(@"Call is incoming");
}
else
{
NSLog(@"None of the conditions");
}
};
Thanks in advance