<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [SubscriptionDialog](./sip.js.subscriptiondialog.md) &gt; [initialDialogStateForSubscription](./sip.js.subscriptiondialog.initialdialogstateforsubscription.md)

## SubscriptionDialog.initialDialogStateForSubscription() method

When a UAC receives a response that establishes a dialog, it constructs the state of the dialog. This state MUST be maintained for the duration of the dialog. https://tools.ietf.org/html/rfc3261\#section-12.1.2

<b>Signature:</b>

```typescript
static initialDialogStateForSubscription(outgoingSubscribeRequestMessage: OutgoingRequestMessage, incomingNotifyRequestMessage: IncomingRequestMessage): DialogState;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  outgoingSubscribeRequestMessage | <code>OutgoingRequestMessage</code> |  |
|  incomingNotifyRequestMessage | <code>IncomingRequestMessage</code> |  |

<b>Returns:</b>

`DialogState`

