currentState()
Note: This API is supported from version 10.0.0.
The currentState() API retrieves the current status of an ongoing call.
Returns:
- SalesIQCallState: An instance representing the state and direction.
- state: A SalesIQCallStatus value representing the current state of the call.
- direction: A SIQCallDirection indicating whether the call is incoming or outgoing
Example
Copied let callState = ZohoSalesIQCalls.currentState
// Check the call status
let status = callState.status
print("Call Status: \(status)")
// Check if a call is active
if status.isCallActive {
print("A call is currently active.")
}
// Print call direction if available
let direction = callState.direction
print("Call Direction: \(direction)")