CallState

public indirect enum CallState : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum

Describes the current call state

  • The call is pending, waiting to be accepted by a user

    • isCreated: True, if the call has already been created by the server
    • isReceived: True, if the call has already been received by the other party

    Declaration

    Swift

    case pending(isCreated: Bool, isReceived: Bool)
  • The call has been answered and encryption keys are being exchanged

    Declaration

    Swift

    case exchangingKeys
  • The call is ready to use

    • protocol: Call protocols supported by the peer
    • connections: Available UDP reflectors
    • config: A JSON-encoded call config
    • encryptionKey: Call encryption key
    • emojis: Encryption key emojis fingerprint
    • allowP2p: True, if peer-to-peer connection is allowed by users privacy settings

    Declaration

    Swift

    case ready(protocol: CallProtocol, connections: [CallConnection], config: String, encryptionKey: Bytes, emojis: [String], allowP2p: Bool)
  • The call is hanging up after discardCall has been called

    Declaration

    Swift

    case hangingUp
  • The call has ended successfully

    • reason: The reason, why the call has ended
    • needRating: True, if the call rating should be sent to the server
    • needDebugInformation: True, if the call debug information should be sent to the server

    Declaration

    Swift

    case discarded(reason: CallDiscardReason, needRating: Bool, needDebugInformation: Bool)
  • The call has ended with an error

    • error: Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout

    Declaration

    Swift

    case error(error: Error)