获取 AI 通话总结

获取指定通话阶段的 AI 通话总结。

注:
  • 该接口仅适用于 API 2.0 版本。
  • 不支持获取由 AI 接待员自动生成的通话总结。

请求 URL

GET {base_url}/{api_path}/cdr/getaisummary?access_token={access_token}

请求参数

参数 是否必填 类型 说明
cdr_id String 指定通话记录中具体通话阶段的 ID。
注: 可从 下载的 AI 通话转写数据 中的 leg_id 参数中获取通话阶段 ID。
src_ext_id Integer 主叫分机的 ID (分机作为主叫方时可用)。
注:
  • src_ext_iddst_ext_id 二者必填其一,以指定要获取哪一方的通话总结。
  • 可使用 搜索特定分机 接口获取分机 ID。
dst_ext_id Integer 被叫分机的 ID (分机作为被叫方时可用)。
注:
  • src_ext_iddst_ext_id 二者必填其一,以指定要获取哪一方的通话总结。
  • 可使用 搜索特定分机 接口获取分机 ID。

响应参数

参数 类型 说明
errcode Integer 返回错误码。
  • 0:请求成功。
  • 非零值:请求失败。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息
errmsg String 返回信息。
  • SUCCESS:请求成功。
  • FAILURE:请求失败。
data Object<Summary> 包含通话总结的数据对象,以 src (主叫方) 或 dst (被叫方) 标识返回的是哪一方的总结。
Summary
参数 类型 说明
id Integer 通话总结的 ID。
call_id String 所查询的通话阶段的 ID。
summary String AI 生成的通话总结内容。
created_at String 通话总结创建的时间戳 (单位:秒)。
updated_at Integer 通话总结更新的时间戳 (单位:秒)。
avatar string 用户头像图片的文件路径或 URL。
name string 用户的显示名称。
ext_num String 用户的分机号码。

示例

请求示例

GET /openapi/v2.0/cdr/getaisummary?access_token=IkXq3r8rmlUM0Gaq883yjKYHOFgPixnf&cdr_id=20260513223234-3EE9E&src_ext_id=3202 HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

响应示例

{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": {
        "dst": {
            "id": 53,
            "call_id": "20260513223234-3EE9E",
            "summary": "<p>Call Summary</p>\n<ul>\n<li>Kristin Hale was transferred to a human agent regarding a login issue.</li>\n<li>She reported that 60% of users cannot log in and keep seeing an error message.</li>\n<li>The human agent offered to check server logs and escalate to the engineering team.</li>\n</ul>\n<p>Key Points</p>\n<ul>\n<li>60% of users are affected by the login issue.</li>\n<li>The page refreshes after password entry with no error code.</li>\n<li>The human agent escalated the issue to the engineering team.</li>\n</ul>\n<p>Follow-Up Actions</p>\n<ul>\n<li>Check server logs for login failure records.</li>\n<li>Investigate the login loop issue.</li>\n<li>Provide Kristin Hale with an estimated resolution time.</li>\n</ul>\n",
            "created_at": 1778682824,
            "updated_at": 1778682824,
            "avatar": "",
            "name": "Human Agent - Leo Ball",
            "ext_num": "3202"
        }
    }
}