<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [SessionState](./sip.js.sessionstate.md)

## SessionState enum

[Session](./sip.js.session.md) state.

<b>Signature:</b>

```typescript
export declare enum SessionState 
```

## Enumeration Members

|  Member | Value | Description |
|  --- | --- | --- |
|  Established | <code>&quot;Established&quot;</code> | If <code>Inviter</code>, sent INVITE and received 200 final response and sent ACK. If <code>Invitation</code>, received INVITE and sent 200 final response. |
|  Establishing | <code>&quot;Establishing&quot;</code> | If <code>Inviter</code>, sent INVITE and waiting for a final response. If <code>Invitation</code>, received INVITE and attempting to send 200 final response (but has not sent it yet). |
|  Initial | <code>&quot;Initial&quot;</code> | If <code>Inviter</code>, INVITE not sent yet. If <code>Invitation</code>, received INVITE (but no final response sent yet). |
|  Terminated | <code>&quot;Terminated&quot;</code> | If <code>Inviter</code>, sent INVITE and received non-200 final response (or sent/received BYE after receiving 200). If <code>Invitation</code>, received INVITE and sent non-200 final response (or sent/received BYE after sending 200). |
|  Terminating | <code>&quot;Terminating&quot;</code> | If <code>Inviter</code>, sent INVITE, sent CANCEL and now waiting for 487 final response to ACK (or 200 to ACK &amp; BYE). If <code>Invitation</code>, received INVITE, sent 200 final response and now waiting on ACK and upon receipt will attempt BYE (as the protocol specification requires, before sending a BYE we must receive the ACK - so we are waiting). |

## Remarks

The [Session](./sip.js.session.md) behaves in a deterministic manner according to the following Finite State Machine (FSM).

```txt
                  ___________________________________________________________
                 |  ____________________________________________             |
                 | |            ____________________________    |            |
Session          | |           |                            v   v            v
Constructed -> Initial -> Establishing -> Established -> Terminating -> Terminated
                               |               |___________________________^   ^
                               |_______________________________________________|

```

