CallDetails | sinch-rtc
Description: Documentation for sinch-rtc

# Interface CallDetails

interface CallDetails {
answeredTime?: Date;
connectingDuration: number;
duration: number;
endedTime?: Date;
establishedTime?: Date;
hadAudioStream: boolean;
hadVideoStream: boolean;
notifyingDuration: number;
progressTime?: Date;
requestedAudio: boolean;
requestedVideo: boolean;
ringingDuration: number;
setupDuration: number;
startedTime: Date;
get endCause(): CallEndCause;
get error(): undefined | SinchError;
}

##### Index

### Properties

answeredTime?
connectingDuration
duration
endedTime?
establishedTime?
hadAudioStream
hadVideoStream
notifyingDuration
progressTime?
requestedAudio
requestedVideo
ringingDuration
setupDuration
startedTime

### Accessors

endCause
error

## Properties

### `Optional`answeredTime

answeredTime?: Date

The time the call was answered.

`undefined` if call was not answered yet.

### connectingDuration

connectingDuration: number

The duration (in milliseconds) it took after the call was answered to be established (ICE connected). This is the time interval between `onCallAnswered` and `onCallEstablished` events.

`0` if the call is not yet established or if ICE connectivity was established before the call was answered.

### duration

duration: number

Total duration of the call in milliseconds or `0` if the call has not yet ended.

### `Optional`endedTime

endedTime?: Date

The time the call has ended.

`undefined` if call has not ended yet.

### `Optional`establishedTime

establishedTime?: Date

The time the call was established.

`undefined` if call was not established yet.

### hadAudioStream

hadAudioStream: boolean

Flag indicating if audio stream was succesfully created for the call.

### hadVideoStream

hadVideoStream: boolean

Flag indicating if video stream was succesfully created for the call.

### notifyingDuration

notifyingDuration: number

The duration (in milliseconds) it took for the callee to receive the push notification after it was sent This is the time interval between `onCallProgressing` and `onCallRinging` events. `0` if the call is inbound or the notification was not yet received by the callee.

### `Optional`progressTime

progressTime?: Date

The time the call entered `Progressing` state.

`undefined` if call has not yet entered `Progressing` state or if the call is an inbound call.

### requestedAudio

requestedAudio: boolean

Flag indicating if caller requested the call to contain audio stream.

### requestedVideo

requestedVideo: boolean

Flag indicating if caller requested the call to contain video stream.

### ringingDuration

ringingDuration: number

The duration (in milliseconds) the call spent in the `ringing` state.

- For the caller, it's the duration between:

  - The time the callee receives the push notification and:
  - The callee answers or denies the call.
  - The caller cancels the call. This is the time interval between `onCallRinging` and `onCallAnswered` or `onCallEnded` events.

- For the callee, it's the duration between:

  - The time the push notification is received and:
  - The callee answers or denies the call.
  - The caller cancels the call. This is the time interval between the call start and `onCallAnswered` or `onCallEnded` event.

`0` if the call was not answered or has not ended yet.

### setupDuration

setupDuration: number

The duration (in milliseconds) it took to send the push notification to the callee. This is the time interval between call start and `onCallProgressing` event. `0` if the call is inbound or the notification was not yet sent.

### startedTime

startedTime: Date

The start time of the call.

## Accessors

### endCause

- get endCause(): CallEndCause

  The cause of why the call has ended or `CallEndCause.None` if the call has not ended yet.

  #### Returns CallEndCause

### error

- get error(): undefined | SinchError

  Error object containing detailed information about the error if it occured.

  #### Returns undefined | SinchError