end()

Note: This API is supported from version 10.0.0.

The end() API ends the ongoing call anywhere within your application.

Parameter:

  • completion: An optional closure that returns the result of the call termination.
    • error: An object describing the failure (or nil if successful).
      • message (String): A brief description of the error.
      • code (Int): A numeric value representing the error code.
  • conversation: Upon successful call termination, the SalesIQConversation object is returned on successful call termination, and nil for failure. 

Example

CopiedZohoSalesIQCalls.end { error, conversation in
    if let error = error {
        print("Failed to end call: Code = \(error.code), Message = \(error.message)")
    } else {
        if let callConversation = conversation as? SalesIQCall {
            // Handle call conversation
        } else if let chatConversation = conversation as? SalesIQChat {
            // Handle chat conversation
        }
    }
}