Get the Call Background

Retrieves the call background of a call by its call ID. This interface is designed for the three-state polling used by the web client to display the reception summary, the collected information, and the transcription of an AI receptionist call.

Request URL

GET {base_url}/uc-ai/api/v1/call-backgrounds/{callId}

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

x-tenant-code Yes String The tenant name.
Note: You can obtain tenant name using the Query Tenants interface.
Path parameters
Parameter Required Type Description
callId Yes String The ID of the call, which equals the SIP request ID and the callId returned by the call detail interface. You can obtain the ID using the Query CDRs interface.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Call_Background> The call background data.
Call_Background
Parameter Type Description
callId String The call ID echoed back from the request.
avatarUrl String The URL of the AI receptionist avatar. This parameter is null when the avatar is missing or cannot be resolved, and does not block the rest of the response.
status String

The readiness status of the call background:

  • PENDING: The background is being generated.
  • COMPLETED: The background is ready.
  • FAILED: The generation failed.
ci Object<CI_Snapshot> The snapshot of the Collect Information configuration.
collectedInfo Array<Collected_Info_Item> The collection result. This parameter is returned only when status is COMPLETED and the CI skill is enabled.
summary String The reception summary. This parameter is returned only when status is COMPLETED.
transcription Object<Transcription_Page> The transcription records of the call.
CI_Snapshot
Parameter Type Description
enabled Boolean

Whether the Collect Information skill was enabled for the call.

  • true: The skill was enabled.
  • false: The skill was disabled.
fields Array<Snapshot_Field> The snapshot of the field list.
Snapshot_Field
Parameter Type Description
name String The display name of the field.
identifier String The fixed identifier of the field.
type String

The value type:

  • STRING
  • BOOLEAN
  • INTEGER
  • NUMBER
required Boolean

Whether the field was mandatory.

  • true: The field was mandatory.
  • false: The field was optional.
options Array<String> The allowed values. This parameter applies only when type is STRING. An empty array means no restriction.
format String

The format constraint:

  • EMAIL: Email format.
  • DATE: Date format.
  • PHONE: Phone number format.
  • REGEX: A custom regular expression, which requires pattern.
  • NONE: No format constraint.
pattern String The custom regular expression. This parameter applies only when format is REGEX.
Collected_Info_Item
Parameter Type Description
name String The display name of the field.
identifier String The fixed identifier of the field, which is aligned with the snapshot field.
type String

The value type:

  • STRING
  • BOOLEAN
  • INTEGER
  • NUMBER
required Boolean

Whether the field was mandatory.

  • true: The field was mandatory.
  • false: The field was optional.
value Object The collected value, restored from the raw value according to type. This parameter is null when no value was collected.
status String

The collection result:

  • COLLECTED: The value was collected and passed the validation.
  • MISSING: No value was collected.
  • VALIDATION_FAILED: The value failed the type or enum validation, and the raw value is kept in value.
Transcription_Page
Parameter Type Description
items Array<Transcription_Record> The transcription records on the current page. An empty array means no record exists, which is a normal polling state rather than an error.
total Integer The total number of transcription records. The value is 0 when no record exists.
Transcription_Record
Parameter Type Description
id String The ID of the record.
content String The transcription text.
timestamp Integer The absolute start time of the record, in Unix timestamp format (milliseconds).
duration Integer The duration of the record, in milliseconds.
type String

The speaker type:

  • caller: The caller.
  • callee: The callee.