WebSocket 音声用API
startRecord
レスポンスでerrorが送信された場合、CT-e1からdissconnectを送信しWebSocket接続を切断する
リクエスト
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “startRecord” 固定値 |
recordId | 文字列 | 〇 | 通話処理の識別子(CT-e1生成) |
sessionId | 文字列 | 〇 | テナント単位の通話ID(転送されても不変) |
tenantId | 文字列 | 〇 | テナント識別子(CT-e1) |
groupId | 文字列 | 〇 | 局番ID |
ani | 文字列 | 〇 | 発信者番号(非通知時は "anonymous") |
dnis | 文字列 | 〇 | 着信番号 |
direction | 整数 | 〇 | 0:着信、1:発信 |
agentId | 文字列 | 〇 | エージェントID(CT-e1) |
extension | 文字列 | 〇 | 内線番号 |
forwardingSource | 文字列 | 〇 | 転送元内線番号(それ以外は""、保留時は"0") |
dtmf | 文字列 | 〇 | IVRで押された番号 |
call_answered_at | 文字列 | 任意 | 通話開始時刻(ISO8601形式・GMT) |
リクエスト(サンプル)
{
"type": "startRecord",
"recordId": "2122418_CCP230_1003",
"sessionId": "123456789",
"groupId": "5071",
"ani": "08012349999",
"dnis": "05058089999",
"direction": 0,
"agentId": "F10025500",
"extension": "1002",
"forwardingSource": "1001",
"dtmf": "1234",
"call_answered_at": "2023-06-05T14:16:22Z"
}
レスポンス
正常時
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “startRecord” 固定値 |
status | 文字列 | 〇 | “complete” 固定値 |
エラー発生時
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “startRecord” 固定値 |
status | 文字列 | 〇 | “error” 固定値 |
description | 文字列 | エラー詳細を設定する |
disconnect(CT-e1⇒サーバー)
リクエスト
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “disconnect” 固定値 |
reason | 文字列 | 〇 | “hangup” 固定値 |
レスポンス
正常時
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “disconnect” 固定値 |
reason | 文字列 | 〇 | “complete” 固定値 |
エラー発生時
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “disconnect” 固定値 |
reason | 文字列 | 〇 | “error” 固定値 |
description | 文字列 | エラー詳細を設定する |
disconnect(サーバー⇒CT-e1)
リクエスト
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “disconnect” 固定値 |
reason | 文字列 | 〇 | “hangup” 固定値 |
レスポンス
正常時
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “disconnect” 固定値 |
reason | 文字列 | 〇 | “complete” 固定値 |
エラー発生時
項目名 | データ型 | 必須 | 説明 |
---|---|---|---|
type | 文字列 | 〇 | “disconnect” 固定値 |
reason | 文字列 | 〇 | “error” 固定値 |
description | 文字列 | エラー詳細を設定する |
更新日時 2025-07-03 02:43:45