Webhook

Call ended

POST/calllog

요청

매개변수

Authorizationstring필수

헤더 · Value configured on the webhook page

요청 본문

event_namestring필수

事件名称

event_dataobject필수
session_idstring필수

Unique ID of the call log

calleestring필수

被叫号码

callerstring필수

主叫号码

start_atstring필수

通话开始时间

answer_atstring필수

通话应答时间

end_atstring필수

通话结束时间

durationinteger필수

总时长

billsecinteger필수

接听时长

directionstring필수

outbound for outgoing calls, inbound for incoming calls

ring_timeinteger필수

响铃时长

hangup_sidestring필수

caller — hung up by the caller; callee — hung up by the callee

hangup_reasonstring필수

挂断原因

record_urlstring필수

The URL expires; download it promptly

task_idinteger필수

0 for inbound calls

task_item_idinteger필수

0 for inbound calls

assistant_infosobject[]필수

小助手信息

[].assistant_idinteger필수

小助手ID

[].assistant_vidinteger필수

通话小助手历史ID

extraobject필수

Variables associated with this phone number in the outbound task

응답

200 OK

필드 없음

샘플 코드

curl -X POST 'https://openapi.voicefox.ai/calllog' \
  -H 'Authorization: Bearer <YOUR_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
  "event_name": "事件名称",
  "event_data": {
    "session_id": "通话ID",
    "callee": "被叫号码",
    "caller": "主叫号码",
    "start_at": "通话开始时间",
    "answer_at": "通话应答时间",
    "end_at": "通话结束时间",
    "duration": 0,
    "billsec": 0,
    "direction": "呼叫类型",
    "ring_time": 0,
    "hangup_side": "挂断方",
    "hangup_reason": "挂断原因",
    "record_url": "录音地址",
    "task_id": 0,
    "task_item_id": 0,
    "assistant_infos": [
      {
        "assistant_id": 0,
        "assistant_vid": 0
      }
    ],
    "extra": {}
  }
}'

응답 예시

{}