> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# Call

The `Call` object represents one audio or video call leg in a VoxEngine scenario. It is typically received from call events or returned by dialing APIs, then methods such as `answer`, `sendMediaTo`, `record`, and `addEventListener` are called on that call instance. Related event names, event payloads, and parameter objects are documented on this page because they describe the same call lifecycle.

## Related guides

Understand call legs, sessions, and media units in VoxEngine.

Start from the standard inbound call pattern.

Start from the standard outbound call pattern.

Route calls through SIP trunks, SIP users, and SIP registrations.

## Contents

* &#x20;[Methods](#methods): answer, reject, bridge media, record, play audio, and control call state.
* &#x20;[CallEvents](#callevents): event names and callback payload fields for the call lifecycle.
* &#x20;[Parameter types](#parameter-types): option objects used by Call methods.

## Methods

### &#x20;addEventListener

Adds a handler for the specified [CallEvents](/api-reference/voxengine/call#callevents) event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.

```ts
addEventListener(event: CallEvents | string, callback: (event: object) => any): void
```

**Parameters**

| Parameter  | Type                                | Req. | Description                                   |
| ---------- | ----------------------------------- | ---- | --------------------------------------------- |
| `event`    | <code>CallEvents \| string</code>   | ✓    | Event constant or event name to subscribe to. |
| `callback` | <code>(event: object) => any</code> | ✓    | Function called when the event is emitted.    |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;answer

Answers the incoming call. Use it only for non-P2P call legs connection. Remember that you can use the `Call.startEarlyMedia` method before answering a call.

```ts
answer(extraHeaders?: { [header: string]: string }, parameters?: CallAnswerParameters): void
```

**Parameters**

| Parameter      | Type                                        | Req. | Description |
| -------------- | ------------------------------------------- | ---- | ----------- |
| `extraHeaders` | <code>\{ \[header: string]: string }</code> | ✗    |             |
| `parameters`   | <code>CallAnswer<wbr />Parameters</code>    | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;answerDirect

Answer the incoming call in the peer-to-peer mode. Use it only for P2P call legs connection.

```ts
answerDirect(peerCall: Call, extraHeaders?: { [header: string]: string }, parameters?: CallAnswerParameters): void
```

**Parameters**

| Parameter      | Type                                        | Req. | Description |
| -------------- | ------------------------------------------- | ---- | ----------- |
| `peerCall`     | `Call`                                      | ✓    |             |
| `extraHeaders` | <code>\{ \[header: string]: string }</code> | ✗    |             |
| `parameters`   | <code>CallAnswer<wbr />Parameters</code>    | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;callerid

Returns the callerID of the caller, which is displayed to the callee. Normally it is some phone number that can be used for callback. IMPORTANT: test numbers rented from Voximplant cannot be used as CallerIDs, the values can be only real numbers.

```ts
callerid(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;clientType

Returns a type of the client. The possible values are: 'pstn', 'sip', 'user', 'wab'.

```ts
clientType(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;customData

Sets or gets a custom string associated with the particular call (the Call object). The **customData** value could be sent from WEB/iOS/Android SDKs, and then it becomes the **customData** value in the [Call](/api-reference/voxengine/call) instance. Note that if you receive a value from an SDK, you can always replace it manually.
SDKs can pass customData in two ways:

1. when SDK calls the Voximplant cloud
2. when SDK answers the call from the Voximplant cloud. See the syntax and details in the corresponding references: [WEB SDK call()](/docs/references/websdk/voximplant/client#call) / [WEB SDK answer()](/docs/references/websdk/voximplant/call#answer) / [iOS call:settings:](/docs/references/iossdk/client/viclient#callsettings) / [iOS answerWithSettings](/docs/references/iossdk/call/vicall#answerwithsettings:) / [Android call()](/docs/references/androidsdk/client/iclient#call) / [Android answer()](/docs/references/androidsdk/call/icall#answer)

```ts
customData(customData?: string): string
```

**Parameters**

| Parameter    | Type     | Req. | Description |
| ------------ | -------- | ---- | ----------- |
| `customData` | `string` | ✗    |             |

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;decline

Use `Call.reject` instead

Rejects the incoming call.

```ts
decline(code: number, extraHeaders?: { [header: string]: string }): void
```

**Parameters**

| Parameter      | Type                                        | Req. | Description |
| -------------- | ------------------------------------------- | ---- | ----------- |
| `code`         | `number`                                    | ✓    |             |
| `extraHeaders` | <code>\{ \[header: string]: string }</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;disableBeepDetection

Disables beep detection in a call.

```ts
disableBeepDetection(): void
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;displayName

Returns the name of the caller, which is displayed to the callee. Normally it is a human-readable version of `Call.callerid`, e.g. a person's name.

```ts
displayName(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;enableBeepDetection

Enables beep detection in a call. The beep detection is used to detect beeps in the call audio stream.

```ts
enableBeepDetection(parameters: CallEnableBeepDetectionParameters): void
```

**Parameters**

| Parameter    | Type                                                                | Req. | Description |
| ------------ | ------------------------------------------------------------------- | ---- | ----------- |
| `parameters` | <code>CallEnable<wbr />Beep<wbr />Detection<wbr />Parameters</code> | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;handleBlindTransfer

Whether to enable blind transfers. When enabled, the `CallEvents.BlindTransferRequested` event is triggered to request for the third call leg within an existing session and notify the transfer initiator of the result.

```ts
handleBlindTransfer(handle: boolean): void
```

**Parameters**

| Parameter | Type      | Req. | Description |
| --------- | --------- | ---- | ----------- |
| `handle`  | `boolean` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;handleMicStatus

Whether to enable detection of microphone status in the call. If detection is enabled, the `CallEvents.MicStatusChange` event is triggered at each status' change.

```ts
handleMicStatus(handle: boolean): void
```

**Parameters**

| Parameter | Type      | Req. | Description |
| --------- | --------- | ---- | ----------- |
| `handle`  | `boolean` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;handleTones

Changes DTMF processing mode (in-band DTMF, RFC 2833 DTMF and DTMF over SIP INFO) telephony signals. If true, each received DTMF signal triggers the `CallEvents.ToneReceived` and removes from audio stream.

```ts
handleTones(doHandle: boolean, supportedDtmfTypes?: DTMFType): void
```

**Parameters**

| Parameter                              | Type       | Req. | Description |
| -------------------------------------- | ---------- | ---- | ----------- |
| `doHandle`                             | `boolean`  | ✓    |             |
| <code>supported<wbr />DtmfTypes</code> | `DTMFType` | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;hangup

Attempts finishing the current call. Triggers one of the following events:

1. `CallEvents.Disconnected` if the call is active before hangup.
2. `CallEvents.Failed` if it is an outgoing call that is not connected previously.
   If there are no other active calls and/or SmartQueue requests in the call session, the `AppEvents.Terminating` and `AppEvents.Terminated` events are triggered in 60 seconds (see the [session limits](/docs/guides/voxengine/limits) for details).

```ts
hangup(extraHeaders?: { [header: string]: string }): void
```

**Parameters**

| Parameter      | Type                                        | Req. | Description |
| -------------- | ------------------------------------------- | ---- | ----------- |
| `extraHeaders` | <code>\{ \[header: string]: string }</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;id

Returns the call's id. Each call in a JavaScript session has its own unique id.

```ts
id(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;incoming

Whether the call is incoming.

```ts
incoming(): boolean
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type      | Description                    |
| --------- | ------------------------------ |
| `boolean` | The requested `boolean` value. |

### &#x20;monitorMediaStatistics

Enables the retrieval of multimedia statistics during a call. When enabled, the `CallEvents.MediaStatisticsReceived` event is triggered and retrieves multimedia statistics during a call.

```ts
monitorMediaStatistics(parameters: MonitorMediaStatisticsParameters): void
```

**Parameters**

| Parameter    | Type                                                        | Req. | Description |
| ------------ | ----------------------------------------------------------- | ---- | ----------- |
| `parameters` | <code>MonitorMedia<wbr />Statistics<wbr />Parameters</code> | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;notifyBlindTransferFailed

Sends a notification about a failed call transfer with an error code and reason.

```ts
notifyBlindTransferFailed(code: number, reason: string): void
```

**Parameters**

| Parameter | Type     | Req. | Description |
| --------- | -------- | ---- | ----------- |
| `code`    | `number` | ✓    |             |
| `reason`  | `string` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;notifyBlindTransferSuccess

Sends a notification of a successful call transfer with the **200 OK** message.

```ts
notifyBlindTransferSuccess(): void
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;number

Returns a dialed number of the incoming or outgoing call.

```ts
number(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;playProgressTone

Provides country-specific dial tones. The method sends a command to the Voximplant cloud to start playing dial tones in the call. The dial tones fully depend on the Voximplant cloud. Note that in order to work properly in a call that is not connected yet, you need to call the `Call.startEarlyMedia` method before using this function. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.

```ts
playProgressTone(country: string): void
```

**Parameters**

| Parameter | Type     | Req. | Description |
| --------- | -------- | ---- | ----------- |
| `country` | `string` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;record

Starts recording the incoming and outgoing audio for this call.
This method triggers the `CallEvents.RecordStarted` event.
The default quality is **8kHz / 32kbps**; the format is **mp3**.

```ts
record(parameters: CallRecordParameters): void
```

**Parameters**

| Parameter    | Type                                     | Req. | Description |
| ------------ | ---------------------------------------- | ---- | ----------- |
| `parameters` | <code>CallRecord<wbr />Parameters</code> | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;reject

Rejects the incoming call. First it triggers the `CallEvents.Disconnected` event immediately. The `AppEvents.Terminating` and `AppEvents.Terminated` events are triggered in 60 seconds.

```ts
reject(code: number, extraHeaders?: { [header: string]: string }): void
```

**Parameters**

| Parameter      | Type                                        | Req. | Description |
| -------------- | ------------------------------------------- | ---- | ----------- |
| `code`         | `number`                                    | ✓    |             |
| `extraHeaders` | <code>\{ \[header: string]: string }</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;removeEventListener

Removes a handler for the specified [CallEvents](/api-reference/voxengine/call#callevents) event.

```ts
removeEventListener(event: CallEvents | string, callback?: (event: object) => any): void
```

**Parameters**

| Parameter  | Type                                | Req. | Description                                   |
| ---------- | ----------------------------------- | ---- | --------------------------------------------- |
| `event`    | <code>CallEvents \| string</code>   | ✓    | Event constant or event name to subscribe to. |
| `callback` | <code>(event: object) => any</code> | ✗    | Function called when the event is emitted.    |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;ring

Plays dial tones for the incoming call. The method sends a low-level command to the endpoint device to start playing dial tones for the call. So the dial tones depend on endpoint device's behavior rather than on the Voximplant cloud. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.

```ts
ring(extraHeaders?: { [header: string]: string }): void
```

**Parameters**

| Parameter      | Type                                        | Req. | Description |
| -------------- | ------------------------------------------- | ---- | ----------- |
| `extraHeaders` | <code>\{ \[header: string]: string }</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;say

Say some text to the `CallEvents.Connected` call. If text length exceeds 1500 characters the `PlayerEvents.PlaybackFinished` event is triggered with error description.
IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.

```ts
say(text: string, parameters?: CallSayParameters): void
```

**Parameters**

| Parameter    | Type                                  | Req. | Description |
| ------------ | ------------------------------------- | ---- | ----------- |
| `text`       | `string`                              | ✓    |             |
| `parameters` | <code>CallSay<wbr />Parameters</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;sendDigits

Sends DTMF digits to the remote peer.

```ts
sendDigits(digits: string): void
```

**Parameters**

| Parameter | Type     | Req. | Description |
| --------- | -------- | ---- | ----------- |
| `digits`  | `string` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;sendInfo

Sends info (SIP INFO) message to the call.

```ts
sendInfo(mimeType: string, body: string, headers?: { [header: string]: string }): void
```

**Parameters**

| Parameter  | Type                                        | Req. | Description |
| ---------- | ------------------------------------------- | ---- | ----------- |
| `mimeType` | `string`                                    | ✓    |             |
| `body`     | `string`                                    | ✓    |             |
| `headers`  | <code>\{ \[header: string]: string }</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;sendMediaTo

Starts sending media (voice and video) from the call to the media unit. The target call has to be `CallEvents.Connected` earlier. IMPORTANT: each call object can send media to any number of the media units, but can receive only one audio stream. A new incoming stream always replaces the previous one.

```ts
sendMediaTo(mediaUnit: VoxMediaUnit, parameters?: SendMediaParameters): void
```

**Parameters**

| Parameter    | Type                                    | Req. | Description |
| ------------ | --------------------------------------- | ---- | ----------- |
| `mediaUnit`  | `VoxMediaUnit`                          | ✓    |             |
| `parameters` | <code>SendMedia<wbr />Parameters</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;sendMessage

Sends a text message to the call.

```ts
sendMessage(text: string): void
```

**Parameters**

| Parameter | Type     | Req. | Description |
| --------- | -------- | ---- | ----------- |
| `text`    | `string` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;startEarlyMedia

Informs the call endpoint that early media is sent before accepting the call. It allows playing voicemail prompt or music before establishing the connection. It does not allow to listen to call endpoint. Note that unanswered call can be in "early media" state only for 60 seconds, see the [session limits](/docs/guides/voxengine/limits) for details.

```ts
startEarlyMedia(extraHeaders?: { [header: string]: string }, scheme?: string, maxVideoBitrate?: number, audioLevelExtension?: boolean, conferenceCall?: boolean, disableDtxForAudio?: boolean): void
```

**Parameters**

| Parameter                               | Type                                        | Req. | Description |
| --------------------------------------- | ------------------------------------------- | ---- | ----------- |
| `extraHeaders`                          | <code>\{ \[header: string]: string }</code> | ✗    |             |
| `scheme`                                | `string`                                    | ✗    |             |
| <code>maxVideo<wbr />Bitrate</code>     | `number`                                    | ✗    |             |
| <code>audioLevel<wbr />Extension</code> | `boolean`                                   | ✗    |             |
| <code>conference<wbr />Call</code>      | `boolean`                                   | ✗    |             |
| <code>disableDtx<wbr />ForAudio</code>  | `boolean`                                   | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;startPlayback

Starts to play an audio file to the answered call. You can stop playback manually via the `Call.stopPlayback` method. You can attach media streams later via the `Call.sendMediaTo` method etc. IMPORTANT: each call object can send media to any number of other calls (media units), but can receive only one audio stream. A new incoming stream always replaces the previous one.

```ts
startPlayback(url: string, parameters?: StartPlaybackParameters): void
```

**Parameters**

| Parameter    | Type                                               | Req. | Description |
| ------------ | -------------------------------------------------- | ---- | ----------- |
| `url`        | `string`                                           | ✓    |             |
| `parameters` | <code>Start<wbr />Playback<wbr />Parameters</code> | ✗    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;state

Returns the current state of the call. Possible values are: **TERMINATED** | **CONNECTED** | **PROGRESSING** | **ALERTING**.

```ts
state(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;stopMediaTo

Stops sending media (voice and video) from the call to media unit.

```ts
stopMediaTo(mediaUnit: VoxMediaUnit): void
```

**Parameters**

| Parameter   | Type           | Req. | Description |
| ----------- | -------------- | ---- | ----------- |
| `mediaUnit` | `VoxMediaUnit` | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;stopPlayback

Stops audio playback started before via the `Call.startPlayback` method.

```ts
stopPlayback(): void
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;toString

Returns the human-readable description of the call's status.

```ts
toString(): string
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type     | Description                 |
| -------- | --------------------------- |
| `string` | The requested string value. |

### &#x20;transferTo

Transfers a SIP call to a 3rd party provider which supports the REFER command. If the transfer is successful, Voximplant disconnects from handling this call and the `CallEvents.TransferComplete` event is triggered. Otherwise, the `CallEvents.TransferFailed` event is triggered.

```ts
transferTo(parameters: TransferToParameters): void
```

**Parameters**

| Parameter    | Type                                     | Req. | Description |
| ------------ | ---------------------------------------- | ---- | ----------- |
| `parameters` | <code>TransferTo<wbr />Parameters</code> | ✓    |             |

**Returns**

| Type   | Description              |
| ------ | ------------------------ |
| `void` | Does not return a value. |

### &#x20;vad

Returns VAD (Voice Activity Detection) status. The including of the ASR also activates VAD so in that case vad() returns true.

```ts
vad(): boolean
```

**Parameters**

This method does not accept parameters.

**Returns**

| Type      | Description                    |
| --------- | ------------------------------ |
| `boolean` | The requested `boolean` value. |

## CallEvents

Subscribe with `Call.addEventListener`. Each event callback receives an object with the fields documented below.

<a id="-audiostarted" />

Triggers after remote peer answered the call or set the call into the `Call.startEarlyMedia` state. Note that event is not triggered in P2P mode.

This event occurs after receiving the 183 Session Progress SIP message regardless of receiving actual media packets.

Event constant: `CallEvents.AudioStarted`

**Payload**

| Field     | Type                                        | Req. | Description                                                         |
| --------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`    | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`    | `string`                                    | ✓    | The name of the event                                               |
| `id`      | `string`                                    | ✓    | The call's ID                                                       |
| `headers` | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |

<a id="-audioidentificationstarted" />

Triggers when [voicemail detection](/docs/guides/calls/voicemail-detection) system connects to the VMD/AMD server and starts detecting voicemail.

Event constant: `CallEvents.AudioIdentificationStarted`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-audioidentificationresult" />

Triggers when [voicemail detection](/docs/guides/calls/voicemail-detection) ends detecting voicemail and the audio identification result is received.

Event constant: `CallEvents.AudioIdentificationResult`

**Payload**

| Field          | Type                                         | Req. | Description                   |
| -------------- | -------------------------------------------- | ---- | ----------------------------- |
| `call`         | `Call`                                       | ✓    | Call that triggered the event |
| `name`         | `string`                                     | ✓    | The name of the event         |
| `id`           | `string`                                     | ✓    | The call's ID                 |
| `audioType`    | <code>AMD.<wbr />ResultClass</code>          | ✓    |                               |
| `audioSubType` | <code>AMD.<wbr />Result<wbr />Subtype</code> | ✓    |                               |
| `confidence`   | `number`                                     | ✓    |                               |

<a id="-audioidentificationstopped" />

Triggers when [voicemail detection](/docs/guides/calls/voicemail-detection) stops detecting voicemail.

Event constant: `CallEvents.AudioIdentificationStopped`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-audioidentificationerror" />

Triggers when [voicemail detection](/docs/guides/calls/voicemail-detection) occurs an error.

Event constant: `CallEvents.AudioIdentificationError`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-blindtransferrequested" />

Triggered when blind transfers are enabled by `Call.handleBlindTransfer`.

Event constant: `CallEvents.BlindTransferRequested`

**Payload**

| Field        | Type                                        | Req. | Description                                                         |
| ------------ | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`       | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`       | `string`                                    | ✓    | The name of the event                                               |
| `id`         | `string`                                    | ✓    | The call's ID                                                       |
| `headers`    | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `transferTo` | `string`                                    | ✓    | Username                                                            |

<a id="-connected" />

Triggers after an incoming/outgoing call is connected. For incoming call, it happens after the `Call.answer` is called. For outgoing call, it happens when a remote peer answers the call.

Event constant: `CallEvents.Connected`

**Payload**

| Field        | Type                                                         | Req. | Description                                                          |
| ------------ | ------------------------------------------------------------ | ---- | -------------------------------------------------------------------- |
| `call`       | `Call`                                                       | ✓    | Call that triggered the event                                        |
| `name`       | `string`                                                     | ✓    | The name of the event                                                |
| `id`         | `string`                                                     | ✓    | The call's ID                                                        |
| `customData` | `string`                                                     | ✗    | Custom data that was passed from the client with call accept command |
| `headers`    | <code>\{ \[header: string]: string }</code>                  | ✗    | SIP headers received with the message (the ones starting with "X-")  |
| `scheme`     | <code>\{ \[id: string]: \{ audio: any, video: any } }</code> | ✗    | Internal information about codecs.                                   |

<a id="-forwarding" />

Triggers on an incoming/outgoing call forwarding.

Event constant: `CallEvents.Forwarding`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-disconnected" />

Triggered when a call is terminated.

Most frequent status codes (returned when a call is terminated before being answered):

CodeDescription

408Call is not answered within 60 seconds
603Call is rejected
486Destination number is busy
487Request terminated

You can find the complete list of rfc3261 response codes [on Wikipedia](https://en.wikipedia.org/wiki/List_of_SIP_response_codes).

Note that this event does not mean the end of the JavaScript session.
The session without calls and/or ACD requests are automatically terminated after some time (see the [session limits](/docs/guides/voxengine/limits) for details).
It is a good idea to explicitly terminate the session with `VoxEngine.terminate`(/docs/references/voxengine/voxengine/terminate) after it is no longer needed.

Event constant: `CallEvents.Disconnected`

**Payload**

| Field          | Type                                        | Req. | Description                                                         |
| -------------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`         | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`         | `string`                                    | ✓    | The name of the event                                               |
| `id`           | `string`                                    | ✓    | The call's ID                                                       |
| `headers`      | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `internalCode` | `number`                                    | ✓    | Status code of the call (i.e., 486)                                 |
| `reason`       | `string`                                    | ✓    | Reason of the call failure                                          |
| `duration`     | `number`                                    | ✓    | Total call duration in seconds                                      |
| `cost`         | `number`                                    | ✓    | Call cost in account currency                                       |
| `direction`    | `string`                                    | ✓    | Call direction type according to billing                            |

<a id="-failed" />

Triggered when an outgoing call is terminated before connection.
Most frequent status codes:

CodeDescription

486Destination number is busy
487Request terminated
404Invalid number
480Destination number is unavailable
402Insufficient funds
603Call was rejected
408Call was not answered within 60 seconds

Event constant: `CallEvents.Failed`

**Payload**

| Field     | Type                                        | Req. | Description                                                         |
| --------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`    | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`    | `string`                                    | ✓    | The name of the event                                               |
| `id`      | `string`                                    | ✓    | The call's ID                                                       |
| `headers` | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `code`    | `number`                                    | ✓    | Status code of the call (i.e., 486)                                 |
| `reason`  | `string`                                    | ✓    | Status message of call failure                                      |

<a id="-inforeceived" />

Triggered when an INFO message is received.

Event constant: `CallEvents.InfoReceived`

**Payload**

| Field      | Type                                        | Req. | Description                                                         |
| ---------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`     | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`     | `string`                                    | ✓    | The name of the event                                               |
| `id`       | `string`                                    | ✓    | The call's ID                                                       |
| `headers`  | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `mimeType` | `string`                                    | ✓    | MIME type of INFO message                                           |
| `body`     | `string`                                    | ✓    | Content of the message                                              |

<a id="-messagereceived" />

Triggered when a text message is received.

Event constant: `CallEvents.MessageReceived`

**Payload**

| Field     | Type                                        | Req. | Description                                                         |
| --------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`    | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`    | `string`                                    | ✓    | The name of the event                                               |
| `id`      | `string`                                    | ✓    | The call's ID                                                       |
| `headers` | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `text`    | `string`                                    | ✓    | Content of the message                                              |

<a id="-micstatuschange" />

Triggers each time when microphone status changes. There is the method for enabling status analyzing - `Call.handleMicStatus`.

Event constant: `CallEvents.MicStatusChange`

**Payload**

| Field    | Type      | Req. | Description                      |
| -------- | --------- | ---- | -------------------------------- |
| `call`   | `Call`    | ✓    | Call that triggered the event    |
| `name`   | `string`  | ✓    | The name of the event            |
| `id`     | `string`  | ✓    | The call's ID                    |
| `active` | `boolean` | ✓    | Whether the microphone is active |

<a id="-offhold" />

Triggered when a call is taken off hold.

Event constant: `CallEvents.OffHold`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-onhold" />

Triggered when a call is put on hold.

Event constant: `CallEvents.OnHold`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-playbackfinished" />

Triggered when the audio/voice playback is completed.
Note that the `Call.stopPlayback` method finishes any media\*\*, so the `CallEvents.PlaybackFinished` event is not triggered. The playback may be started by the `Call.say` or `Call.startPlayback` methods.

Event constant: `CallEvents.PlaybackFinished`

**Payload**

| Field   | Type     | Req. | Description                             |
| ------- | -------- | ---- | --------------------------------------- |
| `call`  | `Call`   | ✓    | Call that triggered the event           |
| `name`  | `string` | ✓    | The name of the event                   |
| `id`    | `string` | ✓    | The call's ID                           |
| `error` | `string` | ✗    | Error that occurred during the playback |

<a id="-playbackready" />

Triggers by the `Call.startPlayback` and `Call.say` methods when:

1. the audio file download to the Voximplant cache is finished;
2. the audio file is found in the cache (i.e., it is in the cache before).

Event constant: `CallEvents.PlaybackReady`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-playbackstarted" />

Triggers by the `Call.startPlayback` and `Call.say` methods when audio/voice playback is started.

Event constant: `CallEvents.PlaybackStarted`

**Payload**

| Field      | Type     | Req. | Description                   |
| ---------- | -------- | ---- | ----------------------------- |
| `call`     | `Call`   | ✓    | Call that triggered the event |
| `name`     | `string` | ✓    | The name of the event         |
| `id`       | `string` | ✓    | The call's ID                 |
| `duration` | `number` | ✓    | Playback duration             |

<a id="-pushsent" />

Triggered when a push notification is sent.

Event constant: `CallEvents.PushSent`

**Payload**

| Field    | Type     | Req. | Description                   |
| -------- | -------- | ---- | ----------------------------- |
| `call`   | `Call`   | ✓    | Call that triggered the event |
| `name`   | `string` | ✓    | The name of the event         |
| `id`     | `string` | ✓    | The call's ID                 |
| `result` | `string` | ✓    |                               |

<a id="-reinviteaccepted" />

Triggered when the Voximplant cloud receives the **ReInviteAccepted** message. This message means that a call received video from the other participant.

Event constant: `CallEvents.ReInviteAccepted`

**Payload**

| Field      | Type                                        | Req. | Description                                                         |
| ---------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`     | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`     | `string`                                    | ✓    | The name of the event                                               |
| `id`       | `string`                                    | ✓    | The call's ID                                                       |
| `headers`  | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `mimeType` | `string`                                    | ✓    | MIME type of INFO message                                           |
| `body`     | `string`                                    | ✓    | Content of the message                                              |

<a id="-reinvitereceived" />

Triggered when the Voximplant cloud receives the **ReInviteReceived** message. This message means that a caller:

1. started sending video;
2. started/stopped screensharing;
3. put a call on hold / took a call off hold.

Event constant: `CallEvents.ReInviteReceived`

**Payload**

| Field      | Type                                        | Req. | Description                                                         |
| ---------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`     | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`     | `string`                                    | ✓    | The name of the event                                               |
| `id`       | `string`                                    | ✓    | The call's ID                                                       |
| `headers`  | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `mimeType` | `string`                                    | ✓    | MIME type of INFO message                                           |
| `body`     | `string`                                    | ✓    | Content of the message                                              |

<a id="-reinviterejected" />

Triggered when the Voximplant cloud receives the **ReInviteRejected** message. This message means that a call does not receive video from the other participant.

Event constant: `CallEvents.ReInviteRejected`

**Payload**

| Field     | Type                                        | Req. | Description                                                         |
| --------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`    | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`    | `string`                                    | ✓    | The name of the event                                               |
| `id`      | `string`                                    | ✓    | The call's ID                                                       |
| `headers` | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |

<a id="-recordstarted" />

Triggered when call recording is started. The recording may be started by the `Call.record` method.

Event constant: `CallEvents.RecordStarted`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |
| `url`  | `string` | ✓    | Link to the record file.      |

<a id="-recordstopped" />

Triggered when call recording is stopped. This happens after the `CallEvents.Disconnected` event is triggered.

Event constant: `CallEvents.RecordStopped`

**Payload**

| Field      | Type     | Req. | Description                                              |
| ---------- | -------- | ---- | -------------------------------------------------------- |
| `call`     | `Call`   | ✓    | Call that triggered the event                            |
| `name`     | `string` | ✓    | The name of the event                                    |
| `id`       | `string` | ✓    | The call's ID                                            |
| `url`      | `string` | ✓    | Link to the record file.                                 |
| `cost`     | `string` | ✓    | Record cost (in the account's currency: USD, EUR or RUB) |
| `duration` | `number` | ✓    | Record duration (sec)                                    |

<a id="-recorderror" />

Triggers in case of errors during the recording process.

Event constant: `CallEvents.RecordError`

**Payload**

| Field   | Type     | Req. | Description                                             |
| ------- | -------- | ---- | ------------------------------------------------------- |
| `call`  | `Call`   | ✓    | Call that triggered the event                           |
| `name`  | `string` | ✓    | The name of the event                                   |
| `id`    | `string` | ✓    | The call's ID                                           |
| `error` | `string` | ✓    | Triggers in case of errors during the recording process |

<a id="-ringing" />

Triggers after outgoing call receives progress signal from a remote peer.

Event constant: `CallEvents.Ringing`

**Payload**

| Field     | Type                                        | Req. | Description                                                         |
| --------- | ------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`    | `Call`                                      | ✓    | Call that triggered the event                                       |
| `name`    | `string`                                    | ✓    | The name of the event                                               |
| `id`      | `string`                                    | ✓    | The call's ID                                                       |
| `headers` | <code>\{ \[header: string]: string }</code> | ✗    | SIP headers received with the message (the ones starting with "X-") |

<a id="-statechanged" />

Triggered when a call status is changed.

Event constant: `CallEvents.StateChanged`

**Payload**

| Field      | Type     | Req. | Description                   |
| ---------- | -------- | ---- | ----------------------------- |
| `call`     | `Call`   | ✓    | Call that triggered the event |
| `name`     | `string` | ✓    | The name of the event         |
| `id`       | `string` | ✓    | The call's ID                 |
| `oldState` | `string` | ✓    |                               |
| `newState` | `string` | ✓    |                               |

<a id="-statistics" />

Triggered when call statistics change.

Event constant: `CallEvents.Statistics`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-tonedetected" />

Triggered when a call dial tone is detected (either dial tone or busy tone).
There is the deprecated method for enabling the tone detection - 'Call.detectProgressTone'. Note that:

1. triggers only if the `CallEvents.Connected` event is triggered;
2. the event is only triggered once in a call session.

Event constant: `CallEvents.ToneDetected`

**Payload**

| Field                             | Type      | Req. | Description                                    |
| --------------------------------- | --------- | ---- | ---------------------------------------------- |
| `call`                            | `Call`    | ✓    | Call that triggered the event                  |
| `name`                            | `string`  | ✓    | The name of the event                          |
| `id`                              | `string`  | ✓    | The call's ID                                  |
| `ProgressTone`                    | `boolean` | ✓    | Whether the detected tone is a dial tone.      |
| <code>Voicemail<wbr />Tone</code> | `boolean` | ✓    | Whether the detected tone is a voicemail tone. |

<a id="-tonereceived" />

Triggered when a DTMF signal is received. Note that by default DTMF signals do not trigger this event, this behavior needs to be set explicitly via the `Call.handleTones` method.

Event constant: `CallEvents.ToneReceived`

**Payload**

| Field  | Type     | Req. | Description                                                                               |
| ------ | -------- | ---- | ----------------------------------------------------------------------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event                                                             |
| `name` | `string` | ✓    | The name of the event                                                                     |
| `id`   | `string` | ✓    | The call's ID                                                                             |
| `tone` | `string` | ✓    | Tone received in this event. The possible values are: 0-9,\*,#                            |
| `type` | `string` | ✓    | Type of the received tone. The possible values are: 1 (rfc 2833), 2 (Inband), 3 (SipInfo) |

<a id="-transfercomplete" />

Triggered when a call transfer is complete.

Event constant: `CallEvents.TransferComplete`

**Payload**

| Field     | Type                                                  | Req. | Description                                                         |
| --------- | ----------------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`    | `Call`                                                | ✓    | Call that triggered the event                                       |
| `name`    | `string`                                              | ✓    | The name of the event                                               |
| `id`      | `string`                                              | ✓    | The call's ID                                                       |
| `headers` | <code>\{ \[header: string]: string }</code>           | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `role`    | <code>'transferor' \| 'target' \| 'transferee'</code> | ✗    | The transfer roles.                                                 |

<a id="-transferfailed" />

Triggered when a call transfer is failed.

Event constant: `CallEvents.TransferFailed`

**Payload**

| Field     | Type                                                  | Req. | Description                                                         |
| --------- | ----------------------------------------------------- | ---- | ------------------------------------------------------------------- |
| `call`    | `Call`                                                | ✓    | Call that triggered the event                                       |
| `name`    | `string`                                              | ✓    | The name of the event                                               |
| `id`      | `string`                                              | ✓    | The call's ID                                                       |
| `headers` | <code>\{ \[header: string]: string }</code>           | ✗    | SIP headers received with the message (the ones starting with "X-") |
| `role`    | <code>'transferor' \| 'target' \| 'transferee'</code> | ✗    | The transfer roles.                                                 |
| `code`    | `number`                                              | ✓    | Failed transfer's status (e.g., 486)                                |
| `reason`  | `string`                                              | ✓    | Failed transfer's status message                                    |

<a id="-videotrackcreated" />

Triggers after the video track is created. This could happen only if the `Call.record` method with **\{video: true}** parameters is called.

Event constant: `CallEvents.VideoTrackCreated`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |
| `url`  | `string` | ✓    | Record URL                    |

<a id="-firstaudiopacketreceived" />

Triggers after the first audio packet is received.

Event constant: `CallEvents.FirstAudioPacketReceived`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-firstvideopacketreceived" />

Triggers after the first video packet is received.

Event constant: `CallEvents.FirstVideoPacketReceived`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-rtpstopped" />

Triggers within **7 seconds** after the RTP/RTCP has stopped. Applies to all types of calls (users, SIP, and PSTN).

Event constant: `CallEvents.RtpStopped`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-rtpresumed" />

Triggers after the RTP resumed.

Event constant: `CallEvents.RtpResumed`

**Payload**

| Field  | Type     | Req. | Description                   |
| ------ | -------- | ---- | ----------------------------- |
| `call` | `Call`   | ✓    | Call that triggered the event |
| `name` | `string` | ✓    | The name of the event         |
| `id`   | `string` | ✓    | The call's ID                 |

<a id="-beepdetectioncomplete" />

Triggers after the beep detection is complete. The beep detection may be started by the `Call.enableBeepDetection` method.

Event constant: `CallEvents.BeepDetectionComplete`

**Payload**

| Field         | Type       | Req. | Description                                                    |
| ------------- | ---------- | ---- | -------------------------------------------------------------- |
| `call`        | `Call`     | ✓    | Call that triggered the event                                  |
| `name`        | `string`   | ✓    | The name of the event                                          |
| `id`          | `string`   | ✓    | The call's ID                                                  |
| `frequencies` | `number[]` | ✗    | Array of frequencies detected during the beep detection in Hz. |
| `timeout`     | `boolean`  | ✗    | Whether the timeout occurred during beep detection.            |

<a id="-beepdetectionerror" />

Error during beep detection.

Event constant: `CallEvents.BeepDetectionError`

**Payload**

| Field    | Type     | Req. | Description                    |
| -------- | -------- | ---- | ------------------------------ |
| `call`   | `Call`   | ✓    | Call that triggered the event  |
| `name`   | `string` | ✓    | The name of the event          |
| `id`     | `string` | ✓    | The call's ID                  |
| `reason` | `string` | ✓    | Beep detection failure reason. |

<a id="-audioqualitydetected" />

Triggers after the audio quality detected.

<a id="callaudioquality" />

Event constant: `CallEvents.AudioQualityDetected`

**Payload**

| Field     | Type                                 | Req. | Description                                                                                                |
| --------- | ------------------------------------ | ---- | ---------------------------------------------------------------------------------------------------------- |
| `call`    | `Call`                               | ✓    | Call that triggered the event                                                                              |
| `name`    | `string`                             | ✓    | The name of the event                                                                                      |
| `id`      | `string`                             | ✓    | The call's ID                                                                                              |
| `quality` | <code>CallAudio<wbr />Quality</code> | ✓    | The audio quality. Allowed values are listed in [`CallAudioQuality`](#callaudioquality): `HD`, `STANDARD`. |

<a id="-mediastatisticsreceived" />

Triggers after media statistics has been recieved. To enable, call the `Call.monitorMediaStatistics` method.

Event constant: `CallEvents.MediaStatisticsReceived`

**Payload**

| Field   | Type                                    | Req. | Description                                                                                                |
| ------- | --------------------------------------- | ---- | ---------------------------------------------------------------------------------------------------------- |
| `call`  | `Call`                                  | ✓    | Call that triggered the event                                                                              |
| `name`  | `string`                                | ✓    | The name of the event                                                                                      |
| `id`    | `string`                                | ✓    | The call's ID                                                                                              |
| `audio` | <code>CallMedia<wbr />Statistics</code> | ✓    | Statistical information about the audio channels. Contains metrics for both incoming and outgoing streams. |

## Parameter types

### &#x20;CallAnswerParameters

The parameters can be passed as arguments to the `Call.answer` method.

| Property                                              | Type                                                         | Req. | Description                                                                                                                                                                                                                                                          |
| ----------------------------------------------------- | ------------------------------------------------------------ | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code>conference<wbr />Call</code>                    | `boolean`                                                    | ✗    | *inherited from BaseCallParameters* Whether the call is coming from a conference. The default value is **false**.                                                                                                                                                    |
| <code>disableDtx<wbr />ForAudio</code>                | `boolean`                                                    | ✗    | *inherited from BaseCallParameters* Disables DTX for audio. The default value is **false**.                                                                                                                                                                          |
| <code>disableExt<wbr />PlayoutDelay</code>            | `boolean`                                                    | ✗    | *inherited from BaseCallParameters* Whether to disable the RTP header extension to control playout delay if provided.                                                                                                                                                |
| <code>disableExt<wbr />VideoOffset</code>             | `boolean`                                                    | ✗    | *inherited from BaseCallParameters* Whether to disable the RTP header extension for transmission offset if provided.                                                                                                                                                 |
| <code>disableExt<wbr />Video<wbr />Orientation</code> | `boolean`                                                    | ✗    | *inherited from BaseCallParameters* Whether to disable the RTP header extension for video orientation, **3gpp:video-orientation**, if provided. Browsers that do not support that extension display the video correctly, however, the battery consumption is higher. |
| <code>disableExt<wbr />VideoTiming</code>             | `boolean`                                                    | ✗    | *inherited from BaseCallParameters* Whether to disable the RTP header extension for video timing if provided.                                                                                                                                                        |
| `displayName`                                         | `string`                                                     | ✗    | *inherited from BaseCallParameters* Name of the caller that is displayed to the user. Normally it is a human-readable version of CallerID, e.g. a person's name.                                                                                                     |
| <code>maxVideo<wbr />Bitrate</code>                   | `number`                                                     | ✗    | *inherited from BaseCallParameters* Sets the maximum possible video bitrate for the customer device in kbps.                                                                                                                                                         |
| `scheme`                                              | <code>\{ \[id: string]: \{ audio: any, video: any } }</code> | ✗    | *inherited from BaseCallParameters* Internal information about codecs.                                                                                                                                                                                               |

### &#x20;CallEnableBeepDetectionParameters

Parameters for the `Call.enableBeepDetection` method.

| Property      | Type       | Req. | Description                                             |
| ------------- | ---------- | ---- | ------------------------------------------------------- |
| `frequencies` | `number[]` | ✗    | Array of frequencies to detect in Hz.                   |
| `timeout`     | `number`   | ✗    | Timeout in milliseconds to wait for the beep detection. |

### &#x20;CallRecordParameters

The parameters can be passed as arguments to the `Call.record` method.

| Property                             | Type                                               | Req. | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------ | -------------------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `dict`                               | <code>ASR<wbr />Dictionary \| string\[]</code>     | ✗    | Transcription dictionary. Array of words that are possible values. Note that dict does not limit the transcription to the specific list. Instead, words in the specified list have a higher chance to be selected. Note that the parameter does not affect the [Recorder module](/docs/references/voxengine/modules#recorder) because the transcription is not available for it.                                                                                                                                                                                   |
| `expire`                             | <code>RecordExpire<wbr />Time</code>               | ✗    | *inherited from BaseRecorderParameters* Storage time for recorded files. The default value is `RecordExpireTime.THREEMONTHS`(/docs/references/voxengine/recordexpiretime#threemonths).                                                                                                                                                                                                                                                                                                                                                                             |
| `format`                             | `string`                                           | ✗    | Transcription format. Could be specified as "json". In that case the transcription result is saved in JSON format. The parameter is not available for the [Recorder module](/docs/references/voxengine/modules#recorder).                                                                                                                                                                                                                                                                                                                                          |
| `hd_audio`                           | `boolean`                                          | ✗    | *inherited from BaseRecorderParameters* Whether to use the HD audio. The default value is **false**. If set to **false**, 8 KHz / 32 kbps mp3 file is generated. If set to **true**, "wideband audio" 48 KHz / 192 kbps mp3 file is generated. Note that transcription's quality does not depend on this parameter. The parameter is not compatible with **lossless: true** parameter.                                                                                                                                                                             |
| `labels`                             | `string[]`                                         | ✗    | An array of two strings. Each string names the label in resulting transcription: the first string names a call/stream that initiated recording, the second string names the other call. If there is only one string in the array or the parameter is not specified at all, the recording's initiate call has the "Left" name and the second stream has the "Right" name. The parameter requires the **transcribe: true** parameter. The parameter is not available for the [Recorder module](/docs/references/voxengine/modules#recorder).                         |
| `language`                           | `ASRLanguage`                                      | ✗    | *inherited from BaseRecorderParameters* Transcription language. The parameter uses [ASRLanguage](/api-reference/voxengine/asr-language) from the [ASR module](/docs/references/voxengine/modules#asr) as possible values. Note that it is necessary to include the [ASR module](/docs/references/voxengine/modules#asr) in the scenario to use the language constants. The parameter is not available for the [Recorder module](/docs/references/voxengine/modules#recorder).                                                                                      |
| `lossless`                           | `boolean`                                          | ✗    | *inherited from BaseRecorderParameters* Whether to save the record in flac format. The default value is **false**. The parameter is not compatible with **hd\_audio: true** parameter.                                                                                                                                                                                                                                                                                                                                                                             |
| `provider`                           | <code>Transcription<wbr />Provider</code>          | ✗    | Transcription provider.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| <code>recordName<wbr />Prefix</code> | `string`                                           | ✗    | *inherited from BaseRecorderParameters* The prefix to add to the record names when storing to your S3 storage. Works only for custom S3-compatible storages.                                                                                                                                                                                                                                                                                                                                                                                                       |
| `secure`                             | `boolean`                                          | ✗    | *inherited from BaseRecorderParameters* Whether to restrict access to the record without management API authorization (available only in the `VoxEngine.createRecorder` method).                                                                                                                                                                                                                                                                                                                                                                                   |
| `stereo`                             | `boolean`                                          | ✗    | Whether the sound is stereo. The default value is **false**. The parameter does not change anything for the [Recorder module](/docs/references/voxengine/modules#recorder): it records stereo with mixed streams in both channels. For the `Call.record` method it works in another way: 1. if it is False, it records stereo with mixed streams in both channels 2. if it is True, the Audio stream from a call endpoint to voximplant cloud is recorded into left channel. Audio stream from voximplant cloud to a call endpoint is recorded into right channel. |
| `transcribe`                         | `boolean`                                          | ✗    | *inherited from BaseRecorderParameters* Whether to create the call record transcription. Note that transcription is not available for the [Recorder module](/docs/references/voxengine/modules#recorder). See the details [in the article](/docs/guides/speech/asr).                                                                                                                                                                                                                                                                                               |
| `video`                              | `boolean`                                          | ✗    | *inherited from BaseRecorderParameters* Whether to record video. The default value is **false**.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| <code>video<wbr />Parameters</code>  | <code>Recorder<wbr />Video<wbr />Parameters</code> | ✗    | *inherited from BaseRecorderParameters* Recorder video parameters.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

### &#x20;CallSayParameters

The parameters can be passed as arguments to the `Call.say` method.

| Property                                | Type         | Req. | Description                                                                                                                                                                                                                                                                                                       |
| --------------------------------------- | ------------ | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <code>progressive<wbr />Playback</code> | `boolean`    | ✗    | Whether to use progressive playback. If true, the generated speech is delivered in chunks which reduces delay before a method call and playback. The default value is **false**. *Available for providers: Amazon, Google, IBM, Microsoft, SaluteSpeech, T-Bank, Yandex.*                                         |
| `request`                               | `Object`     | ✗    | Provide the TTS parameters directly to the provider in this parameter. Find more information in the `documentation`(/docs/guides/speech/tts#passing-parameters-directly-to-the-provider). *Available for providers: Google, SaluteSpeech, T-Bank, YandexV3.*                                                      |
| `ttsOptions`                            | `TTSOptions` | ✗    | Parameters for TTS. Note that support of the `TTSOptions.pitch` parameter depends on the language and dictionary used. For unsupported combinations the `CallEvents.PlaybackFinished` event is triggered with error 400. *Available for providers: Amazon, Google, IBM, Microsoft, SaluteSpeech, T-Bank, Yandex.* |
| `voice`                                 | `Voice`      | ✗    | Voice for TTS. List of all supported voices: [VoiceList](/api-reference/voxengine/voice-list). The default value is **VoiceList.Amazon.en\_US\_Joanna**. *Available for providers: Amazon, Google, IBM, Microsoft, SaluteSpeech, T-Bank, Yandex, ElevenLabs.*                                                     |

### &#x20;SendMediaParameters

Custom parameters for [WebSocket](/api-reference/voxengine/web-socket) interaction. Can be passed as arguments to the `VoxMediaUnit` **sendMediaTo** method.

| Property                             | Type                                              | Req. | Description |
| ------------------------------------ | ------------------------------------------------- | ---- | ----------- |
| <code>custom<wbr />Parameters</code> | `any`                                             | ✗    |             |
| `encoding`                           | <code>WebSocket<wbr />Audio<wbr />Encoding</code> | ✗    |             |
| `tag`                                | `string`                                          | ✓    |             |

### &#x20;StartPlaybackParameters

The parameters can be passed as arguments to the `Call.startPlayback` method.

| Property                                | Type      | Req. | Description                                                                                                                                                              |
| --------------------------------------- | --------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `loop`                                  | `boolean` | ✗    | Whether to loop playback.                                                                                                                                                |
| <code>progressive<wbr />Playback</code> | `boolean` | ✗    | Whether to use progressive playback. If **true**, the file is delivered in chunks which reduces delay before a method call and playback. The default value is **false**. |

### &#x20;TransferToParameters

The parameters can be passed as arguments to the `Call.transferTo` method.

| Property  | Type                                        | Req. | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| --------- | ------------------------------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `call`    | `Call`                                      | ✓    | Call (for 'attendant transfer' only)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `headers` | <code>\{ \[header: string]: string }</code> | ✗    | Custom parameters (SIP headers) that should be passed with a call (INVITE) message. Custom header names have to begin with the 'X-' prefix except the 'VI-CallTimeout': '60' which hangs up if there is no answer after the timeout (in seconds, the default value is **60**, must not be less than **10** or greater than **400**). The "X-" headers can be handled by a SIP phone or WEB SDK (e.g. see the `incomingCall`(/docs/references/websdk/voximplant/events#incomingcall) event). Example: \{'X-header':'value'}. |
| `to`      | `string`                                    | ✓    | SIP(S) URI to make a call to. Example of an external call: **sip:[alice@example.org](mailto:alice@example.org)**. Examples with the usage of TLS: **sips:[alice@example.org](mailto:alice@example.org):5061** ; **[alice@example.org](mailto:alice@example.org):5061;transport=tls**. The format for calls to another user of the same Voximplant application: [user-of-the-application@application-name.account-name.voximplant.com](mailto:user-of-the-application@application-name.account-name.voximplant.com)          |

### &#x20;MonitorMediaStatisticsParameters

The parameters can be passed as arguments to the `Call.monitorMediaStatistics` method.

| Property   | Type      | Req. | Description                                                                                   |
| ---------- | --------- | ---- | --------------------------------------------------------------------------------------------- |
| `interval` | `number`  | ✓    | Interval between messages (in seconds). The value must not be less than 3 or greater than 10. |
| `monitor`  | `boolean` | ✓    | Enables or disables media statistics monitoring.                                              |