<!-- 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)

## UserAgentClient class

User Agent Client (UAC).

<b>Signature:</b>

```typescript
export declare class UserAgentClient implements OutgoingRequest 
```

## Remarks

A user agent client is a logical entity that creates a new request, and then uses the client transaction state machinery to send it. The role of UAC lasts only for the duration of that transaction. In other words, if a piece of software initiates a request, it acts as a UAC for the duration of that transaction. If it receives a request later, it assumes the role of a user agent server for the processing of that transaction. https://tools.ietf.org/html/rfc3261\#section-6

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(transactionConstructor, core, message, delegate)](./sip.js.useragentclient._constructor_.md) |  | Constructs a new instance of the <code>UserAgentClient</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [core](./sip.js.useragentclient.core.md) |  | <code>UserAgentCore</code> |  |
|  [delegate](./sip.js.useragentclient.delegate.md) |  | <code>OutgoingRequestDelegate &#124; undefined</code> |  |
|  [logger](./sip.js.useragentclient.logger.md) |  | <code>Logger</code> |  |
|  [loggerFactory](./sip.js.useragentclient.loggerfactory.md) |  | <code>LoggerFactory</code> |  |
|  [message](./sip.js.useragentclient.message.md) |  | <code>OutgoingRequestMessage</code> |  |
|  [transaction](./sip.js.useragentclient.transaction.md) |  | <code>ClientTransaction</code> | The transaction associated with this request. |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [authenticationGuard(message)](./sip.js.useragentclient.authenticationguard.md) |  | If a 401 (Unauthorized) or 407 (Proxy Authentication Required) response is received, the UAC SHOULD follow the authorization procedures of Section 22.2 and Section 22.3 to retry the request with credentials. https://tools.ietf.org/html/rfc3261\#section-8.1.3.5 22 Usage of HTTP Authentication https://tools.ietf.org/html/rfc3261\#section-22 22.1 Framework https://tools.ietf.org/html/rfc3261\#section-22.1 22.2 User-to-User Authentication https://tools.ietf.org/html/rfc3261\#section-22.2 22.3 Proxy-to-User Authentication https://tools.ietf.org/html/rfc3261\#section-22.3<!-- -->FIXME: This "guard for and retry the request with credentials" implementation is not complete and at best minimally passable. |
|  [cancel(reason, options)](./sip.js.useragentclient.cancel.md) |  | 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 |
|  [dispose()](./sip.js.useragentclient.dispose.md) |  |  |
|  [onRequestTimeout()](./sip.js.useragentclient.onrequesttimeout.md) |  | 8.1.3.1 Transaction Layer Errors In some cases, the response returned by the transaction layer will not be a SIP message, but rather a transaction layer error. When a timeout error is received from the transaction layer, it MUST be treated as if a 408 (Request Timeout) status code has been received. If a fatal transport error is reported by the transport layer (generally, due to fatal ICMP errors in UDP or connection failures in TCP), the condition MUST be treated as a 503 (Service Unavailable) status code. https://tools.ietf.org/html/rfc3261\#section-8.1.3.1 |
|  [onTransportError(error)](./sip.js.useragentclient.ontransporterror.md) |  | 8.1.3.1 Transaction Layer Errors In some cases, the response returned by the transaction layer will not be a SIP message, but rather a transaction layer error. When a timeout error is received from the transaction layer, it MUST be treated as if a 408 (Request Timeout) status code has been received. If a fatal transport error is reported by the transport layer (generally, due to fatal ICMP errors in UDP or connection failures in TCP), the condition MUST be treated as a 503 (Service Unavailable) status code. https://tools.ietf.org/html/rfc3261\#section-8.1.3.1 |
|  [receiveResponse(message)](./sip.js.useragentclient.receiveresponse.md) |  | Receive a response from the transaction layer. |

