I want to detect if a phone is on calling or not, and I searched it on internet, I didn't find a function to get the statut of a phone....Could you give me some suggestions or codes to show how can I know if a phone is on calling or not? Thank you.
my code
self.callCenter.callEventHandler = { (call:CTCall!) in
switch call.callState {
case CTCallStateDialing:
self.toLogin = false
break
case CTCallStateIncoming:
self.toLogin = false
break
case CTCallStateConnected:
self.toLogin = false
break
case CTCallStateDisconnected:
self.toLogin = false
break
default:
self.toLogin = true
break
}
}
My question is When I want to call someone, after entre numero of phone of someone, and he doesn't answer my call yet. I can not get this state, this state is none of the four states, do you know how?