telnyx-voice-gather-java
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- 由Telnyx OpenAPI规范自动生成,请勿编辑。 -->
Telnyx Voice Gather - Java
Telnyx 语音收集 - Java
Installation
安装
text
// See https://github.com/team-telnyx/telnyx-java for Maven/Gradle setuptext
// 查看 https://github.com/team-telnyx/telnyx-java 获取Maven/Gradle配置方法Setup
初始化
java
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
TelnyxClient client = TelnyxOkHttpClient.fromEnv();All examples below assume is already initialized as shown above.
clientjava
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
TelnyxClient client = TelnyxOkHttpClient.fromEnv();以下所有示例均假设已按上述方式完成初始化。
clientAdd messages to AI Assistant
向AI助手添加消息
Add messages to the conversation started by an AI assistant on the call.
POST /calls/{call_control_id}/actions/ai_assistant_add_messagesOptional: (string), (string), (array[object])
client_statecommand_idmessagesjava
import com.telnyx.sdk.models.calls.actions.ActionAddAiAssistantMessagesParams;
import com.telnyx.sdk.models.calls.actions.ActionAddAiAssistantMessagesResponse;
ActionAddAiAssistantMessagesResponse response = client.calls().actions().addAiAssistantMessages("call_control_id");在通话中向AI助手发起的对话添加消息。
POST /calls/{call_control_id}/actions/ai_assistant_add_messages可选参数:(字符串), (字符串), (对象数组)
client_statecommand_idmessagesjava
import com.telnyx.sdk.models.calls.actions.ActionAddAiAssistantMessagesParams;
import com.telnyx.sdk.models.calls.actions.ActionAddAiAssistantMessagesResponse;
ActionAddAiAssistantMessagesResponse response = client.calls().actions().addAiAssistantMessages("call_control_id");Start AI Assistant
启动AI助手
Start an AI assistant on the call.
POST /calls/{call_control_id}/actions/ai_assistant_startOptional: (object), (string), (string), (string), (object), (object), (string), (object)
assistantclient_statecommand_idgreetinginterruption_settingstranscriptionvoicevoice_settingsjava
import com.telnyx.sdk.models.calls.actions.ActionStartAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionStartAiAssistantResponse;
ActionStartAiAssistantResponse response = client.calls().actions().startAiAssistant("call_control_id");在通话中启动AI助手。
POST /calls/{call_control_id}/actions/ai_assistant_start可选参数:(对象), (字符串), (字符串), (字符串), (对象), (对象), (字符串), (对象)
assistantclient_statecommand_idgreetinginterruption_settingstranscriptionvoicevoice_settingsjava
import com.telnyx.sdk.models.calls.actions.ActionStartAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionStartAiAssistantResponse;
ActionStartAiAssistantResponse response = client.calls().actions().startAiAssistant("call_control_id");Stop AI Assistant
停止AI助手
Stop an AI assistant on the call.
POST /calls/{call_control_id}/actions/ai_assistant_stopOptional: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionStopAiAssistantResponse;
ActionStopAiAssistantResponse response = client.calls().actions().stopAiAssistant("call_control_id");在通话中停止AI助手。
POST /calls/{call_control_id}/actions/ai_assistant_stop可选参数:(字符串), (字符串)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionStopAiAssistantResponse;
ActionStopAiAssistantResponse response = client.calls().actions().stopAiAssistant("call_control_id");Gather stop
停止收集
Stop current gather.
POST /calls/{call_control_id}/actions/gather_stopOptional: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopGatherParams;
import com.telnyx.sdk.models.calls.actions.ActionStopGatherResponse;
ActionStopGatherResponse response = client.calls().actions().stopGather("call_control_id");停止当前的收集操作。
POST /calls/{call_control_id}/actions/gather_stop可选参数:(字符串), (字符串)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopGatherParams;
import com.telnyx.sdk.models.calls.actions.ActionStopGatherResponse;
ActionStopGatherResponse response = client.calls().actions().stopGather("call_control_id");Gather using AI
使用AI进行收集
Gather parameters defined in the request payload using a voice assistant.
POST /calls/{call_control_id}/actions/gather_using_aiparametersOptional: (object), (string), (string), (string), (string), (object), (object), (array[object]), (boolean), (boolean), (object), (integer), (string), (object)
assistantclient_statecommand_idgather_ended_speechgreetinginterruption_settingslanguagemessage_historysend_message_history_updatessend_partial_resultstranscriptionuser_response_timeout_msvoicevoice_settingsjava
import com.telnyx.sdk.core.JsonValue;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAiParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAiResponse;
ActionGatherUsingAiParams params = ActionGatherUsingAiParams.builder()
.callControlId("call_control_id")
.parameters(ActionGatherUsingAiParams.Parameters.builder()
.putAdditionalProperty("properties", JsonValue.from("bar"))
.putAdditionalProperty("required", JsonValue.from("bar"))
.putAdditionalProperty("type", JsonValue.from("bar"))
.build())
.build();
ActionGatherUsingAiResponse response = client.calls().actions().gatherUsingAi(params);通过语音助手收集请求负载中定义的参数。
POST /calls/{call_control_id}/actions/gather_using_aiparameters可选参数:(对象), (字符串), (字符串), (字符串), (字符串), (对象), (对象), (对象数组), (布尔值), (布尔值), (对象), (整数), (字符串), (对象)
assistantclient_statecommand_idgather_ended_speechgreetinginterruption_settingslanguagemessage_historysend_message_history_updatessend_partial_resultstranscriptionuser_response_timeout_msvoicevoice_settingsjava
import com.telnyx.sdk.core.JsonValue;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAiParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAiResponse;
ActionGatherUsingAiParams params = ActionGatherUsingAiParams.builder()
.callControlId("call_control_id")
.parameters(ActionGatherUsingAiParams.Parameters.builder()
.putAdditionalProperty("properties", JsonValue.from("bar"))
.putAdditionalProperty("required", JsonValue.from("bar"))
.putAdditionalProperty("type", JsonValue.from("bar"))
.build())
.build();
ActionGatherUsingAiResponse response = client.calls().actions().gatherUsingAi(params);Gather using audio
使用音频进行收集
Play an audio file on the call until the required DTMF signals are gathered to build interactive menus.
POST /calls/{call_control_id}/actions/gather_using_audioOptional: (string), (string), (string), (int32), (string), (string), (int32), (int32), (string), (int32), (string), (int32), (string)
audio_urlclient_statecommand_idinter_digit_timeout_millisinvalid_audio_urlinvalid_media_namemaximum_digitsmaximum_triesmedia_nameminimum_digitsterminating_digittimeout_millisvalid_digitsjava
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAudioParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAudioResponse;
ActionGatherUsingAudioResponse response = client.calls().actions().gatherUsingAudio("call_control_id");在通话中播放音频文件,直到收集到所需的DTMF信号,以此构建交互式菜单。
POST /calls/{call_control_id}/actions/gather_using_audio可选参数:(字符串), (字符串), (字符串), (32位整数), (字符串), (字符串), (32位整数), (32位整数), (字符串), (32位整数), (字符串), (32位整数), (字符串)
audio_urlclient_statecommand_idinter_digit_timeout_millisinvalid_audio_urlinvalid_media_namemaximum_digitsmaximum_triesmedia_nameminimum_digitsterminating_digittimeout_millisvalid_digitsjava
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAudioParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingAudioResponse;
ActionGatherUsingAudioResponse response = client.calls().actions().gatherUsingAudio("call_control_id");Gather using speak
使用语音播报进行收集
Convert text to speech and play it on the call until the required DTMF signals are gathered to build interactive menus.
POST /calls/{call_control_id}/actions/gather_using_speakvoicepayloadOptional: (string), (string), (int32), (string), (enum), (int32), (int32), (int32), (enum), (enum), (string), (int32), (string), (object)
client_statecommand_idinter_digit_timeout_millisinvalid_payloadlanguagemaximum_digitsmaximum_triesminimum_digitspayload_typeservice_levelterminating_digittimeout_millisvalid_digitsvoice_settingsjava
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingSpeakParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingSpeakResponse;
ActionGatherUsingSpeakParams params = ActionGatherUsingSpeakParams.builder()
.callControlId("call_control_id")
.payload("say this on call")
.voice("male")
.build();
ActionGatherUsingSpeakResponse response = client.calls().actions().gatherUsingSpeak(params);将文本转换为语音并在通话中播放,直到收集到所需的DTMF信号,以此构建交互式菜单。
POST /calls/{call_control_id}/actions/gather_using_speakvoicepayload可选参数:(字符串), (字符串), (32位整数), (字符串), (枚举), (32位整数), (32位整数), (32位整数), (枚举), (枚举), (字符串), (32位整数), (字符串), (对象)
client_statecommand_idinter_digit_timeout_millisinvalid_payloadlanguagemaximum_digitsmaximum_triesminimum_digitspayload_typeservice_levelterminating_digittimeout_millisvalid_digitsvoice_settingsjava
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingSpeakParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherUsingSpeakResponse;
ActionGatherUsingSpeakParams params = ActionGatherUsingSpeakParams.builder()
.callControlId("call_control_id")
.payload("say this on call")
.voice("male")
.build();
ActionGatherUsingSpeakResponse response = client.calls().actions().gatherUsingSpeak(params);Gather
收集
Gather DTMF signals to build interactive menus.
POST /calls/{call_control_id}/actions/gatherOptional: (string), (string), (string), (int32), (int32), (int32), (int32), (string), (int32), (string)
client_statecommand_idgather_idinitial_timeout_millisinter_digit_timeout_millismaximum_digitsminimum_digitsterminating_digittimeout_millisvalid_digitsjava
import com.telnyx.sdk.models.calls.actions.ActionGatherParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherResponse;
ActionGatherResponse response = client.calls().actions().gather("call_control_id");收集DTMF信号以构建交互式菜单。
POST /calls/{call_control_id}/actions/gather可选参数:(字符串), (字符串), (字符串), (32位整数), (32位整数), (32位整数), (32位整数), (字符串), (32位整数), (字符串)
client_statecommand_idgather_idinitial_timeout_millisinter_digit_timeout_millismaximum_digitsminimum_digitsterminating_digittimeout_millisvalid_digitsjava
import com.telnyx.sdk.models.calls.actions.ActionGatherParams;
import com.telnyx.sdk.models.calls.actions.ActionGatherResponse;
ActionGatherResponse response = client.calls().actions().gather("call_control_id");Webhooks
Webhooks
The following webhook events are sent to your configured webhook URL.
All webhooks include and headers for verification (Standard Webhooks compatible).
telnyx-timestamptelnyx-signature-ed25519| Event | Description |
|---|---|
| Call Gather Ended |
| Call AI Gather Ended |
| Call AI Gather Message History Updated |
| Call AI Gather Partial Results |
| Call Conversation Ended |
| Call Playback Started |
| Call Playback Ended |
| Call Dtmf Received |
以下Webhook事件将发送到您配置的Webhook URL。
所有Webhook均包含和头信息用于验证(兼容标准Webhooks)。
telnyx-timestamptelnyx-signature-ed25519| 事件 | 描述 |
|---|---|
| 通话收集结束 |
| AI通话收集结束 |
| AI通话收集消息历史更新 |
| AI通话收集部分结果 |
| 通话对话结束 |
| 通话播放开始 |
| 通话播放结束 |
| 收到通话DTMF信号 |
Webhook payload fields
Webhook负载字段
callGatherEnded| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| string | The received DTMF digit or symbol. |
| enum | Reflects how command ended. |
CallAIGatherEnded| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Telnyx connection ID used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| array[object] | The history of the messages exchanged during the AI gather |
| object | The result of the AI gather, its type depends of the |
| enum | Reflects how command ended. |
CallAIGatherMessageHistoryUpdated| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Telnyx connection ID used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| array[object] | The history of the messages exchanged during the AI gather |
CallAIGatherPartialResults| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Telnyx connection ID used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| array[object] | The history of the messages exchanged during the AI gather |
| object | The partial result of the AI gather, its type depends of the |
CallConversationEnded| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Unique identifier for the event. |
| date-time | ISO 8601 datetime of when the event occurred. |
| date-time | Timestamp when the event was created in the system. |
| string | Unique identifier of the assistant involved in the call. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call leg. |
| string | ID that is unique to the call session (group of related call legs). |
| string | Base64-encoded state received from a command. |
| enum | The type of calling party connection. |
| string | ID unique to the conversation or insight group generated for the call. |
| integer | Duration of the conversation in seconds. |
| string | The caller's number or identifier. |
| string | The callee's number or SIP address. |
| string | The large language model used during the conversation. |
| string | The speech-to-text model used in the conversation. |
| string | The text-to-speech provider used in the call. |
| string | The model ID used for text-to-speech synthesis. |
| string | Voice ID used for TTS. |
callPlaybackStarted| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | The audio URL being played back, if audio_url has been used to start. |
| string | The name of the audio media file being played back, if media_name has been used to start. |
| boolean | Whether the audio is going to be played in overlay mode or not. |
callPlaybackEnded| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | The audio URL being played back, if audio_url has been used to start. |
| string | The name of the audio media file being played back, if media_name has been used to start. |
| boolean | Whether the stopped audio was in overlay mode or not. |
| enum | Reflects how command ended. |
| string | Provides details in case of failure. |
callDtmfReceived| Field | Type | Description |
|---|---|---|
| enum | Identifies the type of the resource. |
| enum | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Call ID used to issue commands via Call Control API. |
| string | Identifies the type of resource. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| string | The received DTMF digit or symbol. |
callGatherEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 标识资源类型 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 通话中使用的Call Control App ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从命令中接收的状态 |
| 字符串 | 发起通话的号码或SIP URI |
| 字符串 | 通话的目标号码或SIP URI |
| 字符串 | 收到的DTMF数字或符号 |
| 枚举 | 反映命令的结束方式 |
CallAIGatherEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 标识资源类型 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 通话中使用的Telnyx连接ID |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从命令中接收的状态 |
| 字符串 | 发起通话的号码或SIP URI |
| 字符串 | 通话的目标号码或SIP URI |
| 对象数组 | AI收集过程中交换的消息历史 |
| 对象 | AI收集的结果,其类型取决于命令中提供的 |
| 枚举 | 反映命令的结束方式 |
CallAIGatherMessageHistoryUpdated| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 标识资源类型 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 通话中使用的Telnyx连接ID |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从命令中接收的状态 |
| 字符串 | 发起通话的号码或SIP URI |
| 字符串 | 通话的目标号码或SIP URI |
| 对象数组 | AI收集过程中交换的消息历史 |
CallAIGatherPartialResults| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 标识资源类型 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 通话中使用的Telnyx连接ID |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从命令中接收的状态 |
| 字符串 | 发起通话的号码或SIP URI |
| 字符串 | 通话的目标号码或SIP URI |
| 对象数组 | AI收集过程中交换的消息历史 |
| 对象 | AI收集的部分结果,其类型取决于命令中提供的 |
CallConversationEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 事件的唯一标识符 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 日期时间 | 事件在系统中创建的时间戳 |
| 字符串 | 通话中涉及的助手唯一标识符 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 通话中使用的Call Control App ID(原Telnyx连接ID) |
| 字符串 | 通话支路的唯一ID |
| 字符串 | 通话会话的唯一ID(相关通话支路的组) |
| 字符串 | 从命令中接收的Base64编码状态 |
| 枚举 | 主叫方连接类型 |
| 字符串 | 通话生成的对话或洞察组的唯一ID |
| 整数 | 对话持续时间(秒) |
| 字符串 | 主叫号码或标识符 |
| 字符串 | 被叫号码或SIP地址 |
| 字符串 | 对话中使用的大语言模型 |
| 字符串 | 对话中使用的语音转文本模型 |
| 字符串 | 通话中使用的文本转语音提供商 |
| 字符串 | 用于文本转语音合成的模型ID |
| 字符串 | 用于TTS的语音ID |
callPlaybackStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 标识资源类型 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 通话中使用的Call Control App ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从命令中接收的状态 |
| 字符串 | 正在播放的音频URL(如果使用audio_url启动播放) |
| 字符串 | 正在播放的音频媒体文件名称(如果使用media_name启动播放) |
| 布尔值 | 音频是否将以叠加模式播放 |
callPlaybackEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 标识资源类型 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 通话中使用的Call Control App ID(原Telnyx连接ID) |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从命令中接收的状态 |
| 字符串 | 正在播放的音频URL(如果使用audio_url启动播放) |
| 字符串 | 正在播放的音频媒体文件名称(如果使用media_name启动播放) |
| 布尔值 | 已停止的音频是否处于叠加模式 |
| 枚举 | 反映命令的结束方式 |
| 字符串 | 失败时提供详细信息 |
callDtmfReceived| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举 | 标识资源类型 |
| 枚举 | 标识所传递的事件类型 |
| UUID | 标识资源类型 |
| 日期时间 | 事件发生的ISO 8601格式时间 |
| 字符串 | 用于通过Call Control API下发命令的通话ID |
| 字符串 | 标识资源类型 |
| 字符串 | 通话唯一ID,可用于关联Webhook事件 |
| 字符串 | 通话会话唯一ID,可用于关联Webhook事件 |
| 字符串 | 从命令中接收的状态 |
| 字符串 | 发起通话的号码或SIP URI |
| 字符串 | 通话的目标号码或SIP URI |
| 字符串 | 收到的DTMF数字或符号 |