Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/net/sip/SipSession.State#constants) \| [Methods](https://developer.android.com/reference/android/net/sip/SipSession.State#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/net/sip/SipSession.State#inhmethods)

# SipSession.State

*** ** * ** ***


`
public
static


class
SipSession.State
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.sip.SipSession.State |

<br />

*** ** * ** ***

Defines SIP session states, such as "registering", "outgoing call", and "in call".

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#DEREGISTERING` When the unregistration request is sent out. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#INCOMING_CALL` When an INVITE request is received. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#INCOMING_CALL_ANSWERING` When an OK response is sent for the INVITE request received. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#IN_CALL` When a call is established. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#NOT_DEFINED` Not defined. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#OUTGOING_CALL` When an INVITE request is sent. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#OUTGOING_CALL_CANCELING` When a CANCEL request is sent for the INVITE request sent. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#OUTGOING_CALL_RING_BACK` When a RINGING response is received for the INVITE request sent. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#PINGING` When an OPTIONS request is sent. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#READY_TO_CALL` When session is ready to initiate a call or transaction. |
| `int` | `https://developer.android.com/reference/android/net/sip/SipSession.State#REGISTERING` When the registration request is sent out. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/net/sip/SipSession.State#toString(int)(int state) ` Converts the state to string. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### DEREGISTERING

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DEREGISTERING
```

When the unregistration request is sent out.

<br />

Constant Value:

2
(0x00000002)


### INCOMING_CALL

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int INCOMING_CALL
```

When an INVITE request is received.

<br />

Constant Value:

3
(0x00000003)


### INCOMING_CALL_ANSWERING

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int INCOMING_CALL_ANSWERING
```

When an OK response is sent for the INVITE request received.

<br />

Constant Value:

4
(0x00000004)


### IN_CALL

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IN_CALL
```

When a call is established.

<br />

Constant Value:

8
(0x00000008)


### NOT_DEFINED

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NOT_DEFINED
```

Not defined.

<br />

Constant Value:

101
(0x00000065)


### OUTGOING_CALL

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OUTGOING_CALL
```

When an INVITE request is sent.

<br />

Constant Value:

5
(0x00000005)


### OUTGOING_CALL_CANCELING

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OUTGOING_CALL_CANCELING
```

When a CANCEL request is sent for the INVITE request sent.

<br />

Constant Value:

7
(0x00000007)


### OUTGOING_CALL_RING_BACK

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OUTGOING_CALL_RING_BACK
```

When a RINGING response is received for the INVITE request sent.

<br />

Constant Value:

6
(0x00000006)


### PINGING

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PINGING
```

When an OPTIONS request is sent.

<br />

Constant Value:

9
(0x00000009)


### READY_TO_CALL

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int READY_TO_CALL
```

When session is ready to initiate a call or transaction.

<br />

Constant Value:

0
(0x00000000)


### REGISTERING

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int REGISTERING
```

When the registration request is sent out.

<br />

Constant Value:

1
(0x00000001)


## Public methods

### toString

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static String toString (int state)
```

Converts the state to string.

<br />

| Parameters ||
|---|---|
| `state` | `int` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |