Skip to main content

@dialstack/sdk-dev / server/src / CallLog

Interface: CallLog

Defined in: sdk/server/src/index.ts:651

Record of a completed or attempted call. The id is an opaque call log identifier — one call log may span several underlying legs, so it does not correspond to any single leg.

The record is lifecycle-spanning: it can be retrieved while the call is still live, in which case it is a sparse projection. status, to_label, ended_at, duration_seconds, answered_at, connected_at, hangup_cause, summary, and recording_url are null until the call completes, and quality_metrics is empty. to_number is present live for outbound and internal calls but null for inbound ones, whose routed destination is resolved later.

Properties

answered_at

TypeScript
answered_at: string | null;

Defined in: sdk/server/src/index.ts:679

When the call was answered at the signalling level. A greeting, menu, or voice app answering the media path counts, so for inbound calls this is often the platform answer rather than when a person picked up — use connected_at for that.


connected_at

TypeScript
connected_at: string | null;

Defined in: sdk/server/src/index.ts:685

When the winning leg answered, i.e. when live conversation began. Null when the call never reached a person (abandoned during the greeting or while ringing, or answered by voicemail).


did

TypeScript
did: string | DIDSummary | null;

Defined in: sdk/server/src/index.ts:660

The phone number associated with this call — its id by default, or a compact DIDSummary when expand: ['did'] is requested. Null for calls without a DID.


direction

TypeScript
direction: CallDirection;

Defined in: sdk/server/src/index.ts:661


duration_seconds

TypeScript
duration_seconds: number | null;

Defined in: sdk/server/src/index.ts:687


ended_at

TypeScript
ended_at: string | null;

Defined in: sdk/server/src/index.ts:686


endpoint

TypeScript
endpoint: string | null;

Defined in: sdk/server/src/index.ts:654


from_label

TypeScript
from_label: string | null;

Defined in: sdk/server/src/index.ts:669

The caller's display name, or null when none is available. For external callers this is the raw CNAM, which may be a locality ("LA MESA CA"), a placeholder ("WIRELESS CALLER"), or a restatement of from_number — check for the latter before rendering it beside the number.


from_number

TypeScript
from_number: string;

Defined in: sdk/server/src/index.ts:662


hangup_cause

TypeScript
hangup_cause: number | null;

Defined in: sdk/server/src/index.ts:691

Q.850 hangup cause of the destination leg when the call couldn't connect.


id

TypeScript
id: string;

Defined in: sdk/server/src/index.ts:652


quality_metrics

TypeScript
quality_metrics: QualityMetricLeg[];

Defined in: sdk/server/src/index.ts:696


recording_url

TypeScript
recording_url: string | null;

Defined in: sdk/server/src/index.ts:695

Signed recording download URL, valid for 10 minutes.


sentiment?

TypeScript
optional sentiment?: Sentiment | null;

Defined in: sdk/server/src/index.ts:693


started_at

TypeScript
started_at: string;

Defined in: sdk/server/src/index.ts:672


status

TypeScript
status: CallStatus | null;

Defined in: sdk/server/src/index.ts:689

Final status, derived once the call ends. Null while the call is live.


summary

TypeScript
summary: string | null;

Defined in: sdk/server/src/index.ts:692


to_label

TypeScript
to_label: string | null;

Defined in: sdk/server/src/index.ts:671


to_number

TypeScript
to_number: string | null;

Defined in: sdk/server/src/index.ts:670


user

TypeScript
user: string | null;

Defined in: sdk/server/src/index.ts:653