Webhook

Call ended

POST/calllog

Request

Parameters

Authorizationstringrequired

Header · Value configured on the webhook page

Request body

event_namestringrequired

事件名称

event_dataobjectrequired
session_idstringrequired

Unique ID of the call log

calleestringrequired

被叫号码

callerstringrequired

主叫号码

start_atstringrequired

通话开始时间

answer_atstringrequired

通话应答时间

end_atstringrequired

通话结束时间

durationintegerrequired

总时长

billsecintegerrequired

接听时长

directionstringrequired

outbound for outgoing calls, inbound for incoming calls

ring_timeintegerrequired

响铃时长

hangup_sidestringrequired

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

hangup_reasonstringrequired

挂断原因

record_urlstringrequired

The URL expires; download it promptly

task_idintegerrequired

0 for inbound calls

task_item_idintegerrequired

0 for inbound calls

assistant_infosobject[]required

小助手信息

[].assistant_idintegerrequired

小助手ID

[].assistant_vidintegerrequired

通话小助手历史ID

extraobjectrequired

Variables associated with this phone number in the outbound task

Response

200 OK

No fields

Sample code

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": {}
  }
}'

Response example

{}