# Enum CallError

java.lang.Object
java.lang.Enum<CallError>
com.codename1.call.CallError

All Implemented Interfaces:
  `Comparable<CallError>`

public enum CallError extends Enum<CallError>

Typed error codes carried by every `CallException` thrown through the failure path of the `com.codename1.call` APIs. Callers branch on these via `CallException.getError()` rather than string-matching a message.

The set is deliberately shared between iOS and Android even though the two platforms refuse a call for different reasons and at different layers. CallKit answers a refusal through the `NSError` handed to `reportNewIncomingCall`'s completion block; Telecom answers it by calling `onCreateIncomingConnectionFailed`. Both funnel here, because an app that has to ask which platform it is on to find out why a call did not ring would end up with two code paths and would test only one of them.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ACTION_TIMEOUT`
  The system asked the app to act on a call and the app neither fulfilled nor failed the request in time, so the platform timed it out.
  `AUDIO_FAILED`
  The audio session could not be configured or was taken away, so the call has no audio even though its state says otherwise.
  `BUSY`
  A conflicting operation is already in progress.
  `CALL_FILTERED`
  The system suppressed the call before it ever rang: Do Not Disturb on iOS, or a number the user has blocked.
  `CALL_REFUSED`
  The system refused to place or ring this call right now, and may accept the same call later.
  `DIRECTORY_FAILED`
  The caller-identification or blocking data could not be installed.
  `DUPLICATE_CALL`
  A call with this identifier is already known to the system.
  `INVALID_ID`
  The supplied call identifier is not a canonical identifier, or names a call the system no longer has.
  `NOT_SUPPORTED`
  System call integration is not available on this port, this OS version or this device.
  `PROVIDER_RESET`
  The system's call provider was reset while the operation was in flight, so it can never be answered.
  `PUSH_UNAVAILABLE`
  VoIP push registration failed, or the platform revoked it.
  `TIMEOUT`
  The platform never delivered a completion callback within the safety timeout.
  `UNAUTHORIZED`
  A required runtime permission or role is missing: `MANAGE_OWN_CALLS` on Android, the microphone grant on either platform, or the call screening role the user declined.
  `UNKNOWN`
  Nothing more specific is known.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CallError`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static CallError[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### NOT_SUPPORTED

    public static final CallError NOT_SUPPORTED
    System call integration is not available on this port, this OS version or this device. Android self-managed calls need API 26; CallKit is absent from tvOS and watchOS. The capability queries -- `Calls.isSupported()` and `Calls.getCapabilities()` -- let cross-platform code branch before ever seeing this code, and the inert fallback bridge fails every operation with it.

  - ### UNAUTHORIZED

    public static final CallError UNAUTHORIZED
    A required runtime permission or role is missing: `MANAGE_OWN_CALLS` on Android, the microphone grant on either platform, or the call screening role the user declined.

  - ### CALL_REFUSED

    public static final CallError CALL_REFUSED
    The system refused to place or ring this call right now, and may accept the same call later. An emergency call is in progress, another application holds a self-managed call, or the user has switched this app's calling off. This is the `onCreateIncomingConnectionFailed` case, and it is not an error in the app.

  - ### CALL_FILTERED

    public static final CallError CALL_FILTERED
    The system suppressed the call before it ever rang: Do Not Disturb on iOS, or a number the user has blocked. The call was not shown and no action will arrive for it.

  - ### DUPLICATE_CALL

    public static final CallError DUPLICATE_CALL
    A call with this identifier is already known to the system. Reporting the same identifier twice is a hard error on iOS rather than a no-op, so the ports collapse a duplicate report into an update and only surface this when the collision cannot be reconciled.

  - ### INVALID_ID

    public static final CallError INVALID_ID
    The supplied call identifier is not a canonical identifier, or names a call the system no longer has. Acting on a call that has already ended reports this rather than failing silently.

  - ### ACTION_TIMEOUT

    public static final CallError ACTION_TIMEOUT
    The system asked the app to act on a call and the app neither fulfilled nor failed the request in time, so the platform timed it out. See `CallAction`.

  - ### AUDIO_FAILED

    public static final CallError AUDIO_FAILED
    The audio session could not be configured or was taken away, so the call has no audio even though its state says otherwise.

  - ### PUSH_UNAVAILABLE

    public static final CallError PUSH_UNAVAILABLE
    VoIP push registration failed, or the platform revoked it. On iOS this is permanent for the installed app once the deadline has been missed often enough.

  - ### DIRECTORY_FAILED

    public static final CallError DIRECTORY_FAILED
    The caller-identification or blocking data could not be installed. The extension rejected the file, the entries were out of order, or the store exceeded the platform limit.

  - ### TIMEOUT

    public static final CallError TIMEOUT
    The platform never delivered a completion callback within the safety timeout.

  - ### BUSY

    public static final CallError BUSY
    A conflicting operation is already in progress.

  - ### UNKNOWN

    public static final CallError UNKNOWN
    Nothing more specific is known. Ports use this only when the platform itself gave no usable reason.

  - ### PROVIDER_RESET

    public static final CallError PROVIDER_RESET

    The system's call provider was reset while the operation was in flight, so it can never be answered. See `CallActionListener.providerReset()`.

    Last deliberately, and never sent by a port: it is raised by the facade itself. Every other value crosses the SPI as an ordinal, so a new one has to be appended or every port's error mapping shifts by one.

- ## Method Details

  - ### values

    public static CallError[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static CallError valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null