<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [sip.js](./sip.js.md) &gt; [UserAgentClient](./sip.js.useragentclient.md) &gt; [cancel](./sip.js.useragentclient.cancel.md)

## UserAgentClient.cancel() method

Since requests other than INVITE are responded to immediately, sending a CANCEL for a non-INVITE request would always create a race condition. A CANCEL request SHOULD NOT be sent to cancel a request other than INVITE. https://tools.ietf.org/html/rfc3261\#section-9.1

<b>Signature:</b>

```typescript
cancel(reason?: string, options?: RequestOptions): OutgoingRequestMessage;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  reason | <code>string</code> |  |
|  options | <code>RequestOptions</code> | Cancel options bucket. |

<b>Returns:</b>

`OutgoingRequestMessage`

