@dialstack/sdk-dev / server/src / CallLog
Interface: CallLog
Defined in: sdk/server/src/index.ts:910
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
answered_at: string | null;
Defined in: sdk/server/src/index.ts:954
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
connected_at: string | null;
Defined in: sdk/server/src/index.ts:960
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
did: string | DIDSummary | null;
Defined in: sdk/server/src/index.ts:919
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
direction: CallDirection;
Defined in: sdk/server/src/index.ts:936
duration_seconds
duration_seconds: number | null;
Defined in: sdk/server/src/index.ts:962
ended_at
ended_at: string | null;
Defined in: sdk/server/src/index.ts:961
endpoint
endpoint: string | null;
Defined in: sdk/server/src/index.ts:913
from_label
from_label: string | null;
Defined in: sdk/server/src/index.ts:944
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
from_number: string;
Defined in: sdk/server/src/index.ts:937
hangup_cause
hangup_cause: number | null;
Defined in: sdk/server/src/index.ts:966
Q.850 hangup cause of the destination leg when the call couldn't connect.
id
id: string;
Defined in: sdk/server/src/index.ts:911
quality_metrics
quality_metrics: QualityMetricLeg[];
Defined in: sdk/server/src/index.ts:971
recording_url
recording_url: string | null;
Defined in: sdk/server/src/index.ts:970
Signed recording download URL, valid for 10 minutes.
related_call
related_call: string | null;
Defined in: sdk/server/src/index.ts:935
Another call belonging to the same conversation, as a call id; null when this call stands alone.
One conversation does not always fit in one call log. Today that happens when a parked caller is picked back up — the retrieval is a new call from the retriever's endpoint and gets its own entry — but treat the field as "there is more of this conversation over there" rather than as a park-specific marker.
It carries no direction. started_at orders a linked group, and its
earliest member is the one the conversation started on; follow the links to
walk a longer chain. The relation can be many-to-one, so the link does not
always round-trip to the entry you came from.
sentiment?
optional sentiment?: Sentiment | null;
Defined in: sdk/server/src/index.ts:968
started_at
started_at: string;
Defined in: sdk/server/src/index.ts:947
status
status: CallStatus | null;
Defined in: sdk/server/src/index.ts:964
Final status, derived once the call ends. Null while the call is live.
summary
summary: string | null;
Defined in: sdk/server/src/index.ts:967
to_label
to_label: string | null;
Defined in: sdk/server/src/index.ts:946
to_number
to_number: string | null;
Defined in: sdk/server/src/index.ts:945
user
user: string | null;
Defined in: sdk/server/src/index.ts:912