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

レスポンス例

{}