# Enum CallState

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

All Implemented Interfaces:
  `Comparable<CallState>`

public enum CallState extends Enum<CallState>

Where a call is in its life. The ports map their platform's own state machine onto this one, so app code has a single set of states to reason about.

The ordinals cross the SPI boundary, so existing constants must not be reordered -- new ones go on the end.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ACTIVE`
  Connected, with audio expected to be flowing.
  `DIALING`
  An outgoing call the system has accepted and is placing, but which the far end has not yet answered.
  `ENDED`
  Over.
  `HELD`
  Connected but held, either by this app or by the system taking the audio for another call.
  `RINGING`
  Reported to the system but not yet connected, and ringing.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CallState`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static CallState[]`
  `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

  - ### RINGING

    public static final CallState RINGING
    Reported to the system but not yet connected, and ringing. An incoming call starts here.

  - ### DIALING

    public static final CallState DIALING
    An outgoing call the system has accepted and is placing, but which the far end has not yet answered.

  - ### ACTIVE

    public static final CallState ACTIVE
    Connected, with audio expected to be flowing.

  - ### HELD

    public static final CallState HELD
    Connected but held, either by this app or by the system taking the audio for another call.

  - ### ENDED

    public static final CallState ENDED
    Over. Terminal: a call never leaves this state, and acting on one that has reports `CallError.INVALID_ID`.

- ## Method Details

  - ### values

    public static CallState[] 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 CallState 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