telnyx-voice-gather-go
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 - Go
Telnyx Voice Gather - Go
Installation
安装
bash
go get github.com/team-telnyx/telnyx-gobash
go get github.com/team-telnyx/telnyx-goSetup
初始化设置
go
import (
"context"
"fmt"
"os"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
client := telnyx.NewClient(
option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)All examples below assume is already initialized as shown above.
clientgo
import (
"context"
"fmt"
"os"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
client := telnyx.NewClient(
option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)以下所有示例均假设已按上述方式完成初始化。
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_idmessagesgo
response, err := client.Calls.Actions.AddAIAssistantMessages(
context.TODO(),
"call_control_id",
telnyx.CallActionAddAIAssistantMessagesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)在通话中,为AI助手发起的对话添加消息。
POST /calls/{call_control_id}/actions/ai_assistant_add_messages可选参数:(字符串)、(字符串)、(对象数组)
client_statecommand_idmessagesgo
response, err := client.Calls.Actions.AddAIAssistantMessages(
context.TODO(),
"call_control_id",
telnyx.CallActionAddAIAssistantMessagesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)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_settingsgo
response, err := client.Calls.Actions.StartAIAssistant(
context.TODO(),
"call_control_id",
telnyx.CallActionStartAIAssistantParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)在通话中启动AI助手。
POST /calls/{call_control_id}/actions/ai_assistant_start可选参数:(对象)、(字符串)、(字符串)、(字符串)、(对象)、(对象)、(字符串)、(对象)
assistantclient_statecommand_idgreetinginterruption_settingstranscriptionvoicevoice_settingsgo
response, err := client.Calls.Actions.StartAIAssistant(
context.TODO(),
"call_control_id",
telnyx.CallActionStartAIAssistantParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)Stop AI Assistant
停止AI助手
Stop an AI assistant on the call.
POST /calls/{call_control_id}/actions/ai_assistant_stopOptional: (string), (string)
client_statecommand_idgo
response, err := client.Calls.Actions.StopAIAssistant(
context.TODO(),
"call_control_id",
telnyx.CallActionStopAIAssistantParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)在通话中停止AI助手。
POST /calls/{call_control_id}/actions/ai_assistant_stop可选参数:(字符串)、(字符串)
client_statecommand_idgo
response, err := client.Calls.Actions.StopAIAssistant(
context.TODO(),
"call_control_id",
telnyx.CallActionStopAIAssistantParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)Gather stop
停止收集
Stop current gather.
POST /calls/{call_control_id}/actions/gather_stopOptional: (string), (string)
client_statecommand_idgo
response, err := client.Calls.Actions.StopGather(
context.TODO(),
"call_control_id",
telnyx.CallActionStopGatherParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)停止当前的收集操作。
POST /calls/{call_control_id}/actions/gather_stop可选参数:(字符串)、(字符串)
client_statecommand_idgo
response, err := client.Calls.Actions.StopGather(
context.TODO(),
"call_control_id",
telnyx.CallActionStopGatherParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)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_settingsgo
response, err := client.Calls.Actions.GatherUsingAI(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherUsingAIParams{
Parameters: map[string]any{
"properties": "bar",
"required": "bar",
"type": "bar",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)通过语音助手收集请求负载中定义的参数信息。
POST /calls/{call_control_id}/actions/gather_using_aiparameters可选参数:(对象)、(字符串)、(字符串)、(字符串)、(字符串)、(对象)、(对象)、(对象数组)、(布尔值)、(布尔值)、(对象)、(整数)、(字符串)、(对象)
assistantclient_statecommand_idgather_ended_speechgreetinginterruption_settingslanguagemessage_historysend_message_history_updatessend_partial_resultstranscriptionuser_response_timeout_msvoicevoice_settingsgo
response, err := client.Calls.Actions.GatherUsingAI(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherUsingAIParams{
Parameters: map[string]any{
"properties": "bar",
"required": "bar",
"type": "bar",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)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_digitsgo
response, err := client.Calls.Actions.GatherUsingAudio(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherUsingAudioParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)在通话中播放音频文件,直到收集到所需的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_digitsgo
response, err := client.Calls.Actions.GatherUsingAudio(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherUsingAudioParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)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_settingsgo
response, err := client.Calls.Actions.GatherUsingSpeak(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherUsingSpeakParams{
Payload: "say this on call",
Voice: "male",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)将文本转换为语音并在通话中播放,直到收集到所需的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_settingsgo
response, err := client.Calls.Actions.GatherUsingSpeak(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherUsingSpeakParams{
Payload: "say this on call",
Voice: "male",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)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_digitsgo
response, err := client.Calls.Actions.Gather(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)收集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_digitsgo
response, err := client.Calls.Actions.Gather(
context.TODO(),
"call_control_id",
telnyx.CallActionGatherParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)Webhooks
Webhook
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均包含和头信息用于验证(兼容标准Webhook)。
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格式时间戳。 |
| 日期时间 | 事件在系统中创建的时间戳。 |
| 字符串 | 通话中涉及的AI助手的唯一标识符。 |
| 字符串 | 用于通过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数字或符号。 |