telnyx-voice-advanced-java
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Voice Advanced - Java
Telnyx 高级语音服务 - Java
Installation
安装
text
<!-- Maven -->
<dependency>
<groupId>com.telnyx.sdk</groupId>
<artifactId>telnyx</artifactId>
<version>6.36.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.36.0")text
<!-- Maven -->
<dependency>
<groupId>com.telnyx.sdk</groupId>
<artifactId>telnyx</artifactId>
<version>6.36.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.36.0")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();下方所有示例均假设已按照上述方式完成初始化。
clientError Handling
错误处理
All API calls can fail with network errors, rate limits (429), validation errors (422),
or authentication errors (401). Always handle errors in production code:
java
import com.telnyx.sdk.errors.TelnyxServiceException;
try {
var result = client.messages().send(params);
} catch (TelnyxServiceException e) {
System.err.println("API error " + e.statusCode() + ": " + e.getMessage());
if (e.statusCode() == 422) {
System.err.println("Validation error — check required fields and formats");
} else if (e.statusCode() == 429) {
// Rate limited — wait and retry with exponential backoff
Thread.sleep(1000);
}
}Common error codes: invalid API key, insufficient permissions,
resource not found, validation error (check field formats),
rate limited (retry with exponential backoff).
401403404422429所有API调用都可能因网络错误、速率限制(429)、校验错误(422)或认证错误(401)失败。生产环境代码请务必做好错误处理:
java
import com.telnyx.sdk.errors.TelnyxServiceException;
try {
var result = client.messages().send(params);
} catch (TelnyxServiceException e) {
System.err.println("API error " + e.statusCode() + ": " + e.getMessage());
if (e.statusCode() == 422) {
System.err.println("Validation error — check required fields and formats");
} else if (e.statusCode() == 429) {
// Rate limited — wait and retry with exponential backoff
Thread.sleep(1000);
}
}常见错误码: API密钥无效, 权限不足, 资源不存在, 校验错误(请检查字段格式), 触发速率限制(请使用指数退避策略重试)。
401403404422429Join AI Assistant Conversation
加入AI助手对话
Add a participant to an existing AI assistant conversation. Use this command to bring an additional call leg into a running AI conversation.
POST /calls/{call_control_id}/actions/ai_assistant_joinconversation_idparticipantOptional: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionJoinAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionJoinAiAssistantResponse;
ActionJoinAiAssistantParams params = ActionJoinAiAssistantParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.conversationId("v3:abc123")
.participant(ActionJoinAiAssistantParams.Participant.builder()
.id("v3:abc123def456")
.role(ActionJoinAiAssistantParams.Participant.Role.USER)
.build())
.build();
ActionJoinAiAssistantResponse response = client.calls().actions().joinAiAssistant(params);Returns: (uuid), (string)
conversation_idresult向已有的AI助手对话中添加参与者。使用该命令可将额外的呼叫链路接入正在运行的AI对话中。
POST /calls/{call_control_id}/actions/ai_assistant_joinconversation_idparticipant可选参数:(字符串)、(字符串)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionJoinAiAssistantParams;
import com.telnyx.sdk.models.calls.actions.ActionJoinAiAssistantResponse;
ActionJoinAiAssistantParams params = ActionJoinAiAssistantParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.conversationId("v3:abc123")
.participant(ActionJoinAiAssistantParams.Participant.builder()
.id("v3:abc123def456")
.role(ActionJoinAiAssistantParams.Participant.Role.USER)
.build())
.build();
ActionJoinAiAssistantResponse response = client.calls().actions().joinAiAssistant(params);返回值:(uuid)、(字符串)
conversation_idresultUpdate client state
更新客户端状态
Updates client state
PUT /calls/{call_control_id}/actions/client_state_updateclient_statejava
import com.telnyx.sdk.models.calls.actions.ActionUpdateClientStateParams;
import com.telnyx.sdk.models.calls.actions.ActionUpdateClientStateResponse;
ActionUpdateClientStateParams params = ActionUpdateClientStateParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.clientState("aGF2ZSBhIG5pY2UgZGF5ID1d")
.build();
ActionUpdateClientStateResponse response = client.calls().actions().updateClientState(params);Returns: (string)
result更新客户端状态
PUT /calls/{call_control_id}/actions/client_state_updateclient_statejava
import com.telnyx.sdk.models.calls.actions.ActionUpdateClientStateParams;
import com.telnyx.sdk.models.calls.actions.ActionUpdateClientStateResponse;
ActionUpdateClientStateParams params = ActionUpdateClientStateParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.clientState("aGF2ZSBhIG5pY2UgZGF5ID1d")
.build();
ActionUpdateClientStateResponse response = client.calls().actions().updateClientState(params);返回值:(字符串)
resultSend DTMF
发送DTMF
Sends DTMF tones from this leg. DTMF tones will be heard by the other end of the call. Expected Webhooks:
There are no webhooks associated with this command.
POST /calls/{call_control_id}/actions/send_dtmfdigitsOptional: (string), (string), (int32)
client_statecommand_idduration_millisjava
import com.telnyx.sdk.models.calls.actions.ActionSendDtmfParams;
import com.telnyx.sdk.models.calls.actions.ActionSendDtmfResponse;
ActionSendDtmfParams params = ActionSendDtmfParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.digits("1www2WABCDw9")
.build();
ActionSendDtmfResponse response = client.calls().actions().sendDtmf(params);Returns: (string)
result从当前呼叫链路发送DTMF音,通话对端将听到该DTMF信号。预期触发的Webhook:
该命令没有关联的Webhook。
POST /calls/{call_control_id}/actions/send_dtmfdigits可选参数:(字符串)、(字符串)、(int32)
client_statecommand_idduration_millisjava
import com.telnyx.sdk.models.calls.actions.ActionSendDtmfParams;
import com.telnyx.sdk.models.calls.actions.ActionSendDtmfResponse;
ActionSendDtmfParams params = ActionSendDtmfParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.digits("1www2WABCDw9")
.build();
ActionSendDtmfResponse response = client.calls().actions().sendDtmf(params);返回值:(字符串)
resultSIPREC start
启动SIPREC
Start siprec session to configured in SIPREC connector SRS.
Expected Webhooks:
siprec.startedsiprec.stoppedsiprec.failed
POST /calls/{call_control_id}/actions/siprec_startOptional: (string), (string), (boolean), (boolean), (integer), (enum: udp, tcp, tls), (enum: inbound_track, outbound_track, both_tracks)
client_stateconnector_nameinclude_metadata_custom_headerssecuresession_timeout_secssip_transportsiprec_trackjava
import com.telnyx.sdk.models.calls.actions.ActionStartSiprecParams;
import com.telnyx.sdk.models.calls.actions.ActionStartSiprecResponse;
ActionStartSiprecResponse response = client.calls().actions().startSiprec("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");Returns: (string)
result向SIPREC连接器配置的SRS启动siprec会话。
预期触发的Webhook:
siprec.startedsiprec.stoppedsiprec.failed
POST /calls/{call_control_id}/actions/siprec_start可选参数:(字符串)、(字符串)、(布尔值)、(布尔值)、(整数)、(枚举值:udp、tcp、tls)、(枚举值:inbound_track、outbound_track、both_tracks)
client_stateconnector_nameinclude_metadata_custom_headerssecuresession_timeout_secssip_transportsiprec_trackjava
import com.telnyx.sdk.models.calls.actions.ActionStartSiprecParams;
import com.telnyx.sdk.models.calls.actions.ActionStartSiprecResponse;
ActionStartSiprecResponse response = client.calls().actions().startSiprec("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");返回值:(字符串)
resultSIPREC stop
停止SIPREC
Stop SIPREC session. Expected Webhooks:
siprec.stopped
POST /calls/{call_control_id}/actions/siprec_stopOptional: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopSiprecParams;
import com.telnyx.sdk.models.calls.actions.ActionStopSiprecResponse;
ActionStopSiprecResponse response = client.calls().actions().stopSiprec("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");Returns: (string)
result停止SIPREC会话。预期触发的Webhook:
siprec.stopped
POST /calls/{call_control_id}/actions/siprec_stop可选参数:(字符串)、(字符串)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopSiprecParams;
import com.telnyx.sdk.models.calls.actions.ActionStopSiprecResponse;
ActionStopSiprecResponse response = client.calls().actions().stopSiprec("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");返回值:(字符串)
resultNoise Suppression Start (BETA)
启动噪声抑制(测试版)
POST /calls/{call_control_id}/actions/suppression_startOptional: (string), (string), (enum: inbound, outbound, both), (enum: Denoiser, DeepFilterNet, Krisp, AiCoustics), (object)
client_statecommand_iddirectionnoise_suppression_enginenoise_suppression_engine_configjava
import com.telnyx.sdk.models.calls.actions.ActionStartNoiseSuppressionParams;
import com.telnyx.sdk.models.calls.actions.ActionStartNoiseSuppressionResponse;
ActionStartNoiseSuppressionResponse response = client.calls().actions().startNoiseSuppression("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");Returns: (string)
resultPOST /calls/{call_control_id}/actions/suppression_start可选参数:(字符串)、(字符串)、(枚举值:inbound、outbound、both)、(枚举值:Denoiser、DeepFilterNet、Krisp、AiCoustics)、(对象)
client_statecommand_iddirectionnoise_suppression_enginenoise_suppression_engine_configjava
import com.telnyx.sdk.models.calls.actions.ActionStartNoiseSuppressionParams;
import com.telnyx.sdk.models.calls.actions.ActionStartNoiseSuppressionResponse;
ActionStartNoiseSuppressionResponse response = client.calls().actions().startNoiseSuppression("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");返回值:(字符串)
resultNoise Suppression Stop (BETA)
停止噪声抑制(测试版)
POST /calls/{call_control_id}/actions/suppression_stopOptional: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopNoiseSuppressionParams;
import com.telnyx.sdk.models.calls.actions.ActionStopNoiseSuppressionResponse;
ActionStopNoiseSuppressionResponse response = client.calls().actions().stopNoiseSuppression("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");Returns: (string)
resultPOST /calls/{call_control_id}/actions/suppression_stop可选参数:(字符串)、(字符串)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionStopNoiseSuppressionParams;
import com.telnyx.sdk.models.calls.actions.ActionStopNoiseSuppressionResponse;
ActionStopNoiseSuppressionResponse response = client.calls().actions().stopNoiseSuppression("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ");返回值:(字符串)
resultSwitch supervisor role
切换监管角色
Switch the supervisor role for a bridged call. This allows switching between different supervisor modes during an active call
POST /calls/{call_control_id}/actions/switch_supervisor_rolerolejava
import com.telnyx.sdk.models.calls.actions.ActionSwitchSupervisorRoleParams;
import com.telnyx.sdk.models.calls.actions.ActionSwitchSupervisorRoleResponse;
ActionSwitchSupervisorRoleParams params = ActionSwitchSupervisorRoleParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.role(ActionSwitchSupervisorRoleParams.Role.BARGE)
.build();
ActionSwitchSupervisorRoleResponse response = client.calls().actions().switchSupervisorRole(params);Returns: (string)
result为桥接呼叫切换监管角色,支持在活动通话过程中切换不同的监管模式。
POST /calls/{call_control_id}/actions/switch_supervisor_rolerolejava
import com.telnyx.sdk.models.calls.actions.ActionSwitchSupervisorRoleParams;
import com.telnyx.sdk.models.calls.actions.ActionSwitchSupervisorRoleResponse;
ActionSwitchSupervisorRoleParams params = ActionSwitchSupervisorRoleParams.builder()
.callControlId("v3:550e8400-e29b-41d4-a716-446655440000_gRU1OGRkYQ")
.role(ActionSwitchSupervisorRoleParams.Role.BARGE)
.build();
ActionSwitchSupervisorRoleResponse response = client.calls().actions().switchSupervisorRole(params);返回值:(字符串)
resultWebhooks
Webhooks
Webhook Verification
Webhook验证
Telnyx signs webhooks with Ed25519. Each request includes
and headers. Always verify signatures in production:
telnyx-signature-ed25519telnyx-timestampjava
import com.telnyx.sdk.core.UnwrapWebhookParams;
import com.telnyx.sdk.core.http.Headers;
// In your webhook handler (e.g., Spring — use raw body):
@PostMapping("/webhooks")
public ResponseEntity<String> handleWebhook(
@RequestBody String payload,
HttpServletRequest request) {
try {
Headers headers = Headers.builder()
.put("telnyx-signature-ed25519", request.getHeader("telnyx-signature-ed25519"))
.put("telnyx-timestamp", request.getHeader("telnyx-timestamp"))
.build();
var event = client.webhooks().unwrap(
UnwrapWebhookParams.builder()
.body(payload)
.headers(headers)
.build());
// Signature valid — process the event
System.out.println("Received webhook event");
return ResponseEntity.ok("OK");
} catch (Exception e) {
System.err.println("Webhook verification failed: " + e.getMessage());
return ResponseEntity.badRequest().body("Invalid signature");
}
}The following webhook events are sent to your configured webhook URL.
All webhooks include and headers for Ed25519 signature verification. Use to verify.
telnyx-timestamptelnyx-signature-ed25519client.webhooks.unwrap()| Event | Description |
|---|---|
| Call Conversation Ended |
| Call Conversation Insights Generated |
| Call Dtmf Received |
| Call Machine Detection Ended |
| Call Machine Greeting Ended |
| Call Machine Premium Detection Ended |
| Call Machine Premium Greeting Ended |
| Call Refer Completed |
| Call Refer Failed |
| Call Refer Started |
| Call Siprec Failed |
| Call Siprec Started |
| Call Siprec Stopped |
Telnyx使用Ed25519对Webhook进行签名,每个请求都会携带和请求头。生产环境请务必验证签名:
telnyx-signature-ed25519telnyx-timestampjava
import com.telnyx.sdk.core.UnwrapWebhookParams;
import com.telnyx.sdk.core.http.Headers;
// In your webhook handler (e.g., Spring — use raw body):
@PostMapping("/webhooks")
public ResponseEntity<String> handleWebhook(
@RequestBody String payload,
HttpServletRequest request) {
try {
Headers headers = Headers.builder()
.put("telnyx-signature-ed25519", request.getHeader("telnyx-signature-ed25519"))
.put("telnyx-timestamp", request.getHeader("telnyx-timestamp"))
.build();
var event = client.webhooks().unwrap(
UnwrapWebhookParams.builder()
.body(payload)
.headers(headers)
.build());
// Signature valid — process the event
System.out.println("Received webhook event");
return ResponseEntity.ok("OK");
} catch (Exception e) {
System.err.println("Webhook verification failed: " + e.getMessage());
return ResponseEntity.badRequest().body("Invalid signature");
}
}以下Webhook事件会发送到你配置的Webhook地址。所有Webhook都携带和请求头用于Ed25519签名验证,可使用完成验证。
telnyx-timestamptelnyx-signature-ed25519client.webhooks.unwrap()| 事件 | 描述 |
|---|---|
| 呼叫会话已结束 |
| 已生成呼叫会话洞察 |
| 收到呼叫DTMF信号 |
| 呼叫应答机检测结束 |
| 应答机问候语播放结束 |
| 呼叫高级应答机检测结束 |
| 高级应答机问候语播放结束 |
| 呼叫转接完成 |
| 呼叫转接失败 |
| 呼叫转接已启动 |
| 呼叫SIPREC启动失败 |
| 呼叫SIPREC已启动 |
| 呼叫SIPREC已停止 |
Webhook payload fields
Webhook负载字段
callConversationEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.conversation.ended | 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: pstn, sip | 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. |
callConversationInsightsGenerated| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.conversation_insights.generated | 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. |
| enum: pstn, sip | The type of calling party connection. |
| string | ID that is unique to the insight group being generated for the call. |
| array[object] | Array of insight results being generated for the call. |
callDtmfReceived| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.dtmf.received | 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. |
callMachineDetectionEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.machine.detection.ended | 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. |
| enum: human, machine, not_sure | Answering machine detection result. |
callMachineGreetingEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.machine.greeting.ended | 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. |
| enum: beep_detected, ended, not_sure | Answering machine greeting ended result. |
callMachinePremiumDetectionEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.machine.premium.detection.ended | 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. |
| enum: human_residence, human_business, machine, silence, fax_detected, not_sure | Premium Answering Machine Detection result. |
callMachinePremiumGreetingEnded| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.machine.premium.greeting.ended | 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. |
| enum: beep_detected, no_beep_detected | Premium Answering Machine Greeting Ended result. |
callReferCompleted| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.refer.completed | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Unique ID for controlling 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 | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| integer | SIP NOTIFY event status for tracking the REFER attempt. |
| string | Destination number or SIP URI of the call. |
callReferFailed| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.refer.failed | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Unique ID for controlling 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 | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| integer | SIP NOTIFY event status for tracking the REFER attempt. |
| string | Destination number or SIP URI of the call. |
callReferStarted| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: call.refer.started | The type of event being delivered. |
| uuid | Identifies the type of resource. |
| date-time | ISO 8601 datetime of when the event occurred. |
| string | Unique ID for controlling 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 | Call Control App ID (formerly Telnyx connection ID) used in the call. |
| string | State received from a command. |
| string | Number or SIP URI placing the call. |
| integer | SIP NOTIFY event status for tracking the REFER attempt. |
| string | Destination number or SIP URI of the call. |
callSiprecFailed| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the resource. |
| enum: siprec.failed | 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 | Q850 reason why siprec session failed. |
callSiprecStarted| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: siprec.started | 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. |
callSiprecStopped| Field | Type | Description |
|---|---|---|
| enum: event | Identifies the type of the resource. |
| enum: siprec.stopped | 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 | Q850 reason why the SIPREC session was stopped. |
callConversationEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.conversation.ended | 所投递的事件类型。 |
| uuid | 事件的唯一标识符。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 时间戳 | 事件在系统中创建的时间戳。 |
| 字符串 | 参与呼叫的助手的唯一标识符。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫链路的唯一ID。 |
| 字符串 | 呼叫会话的唯一ID(一组相关呼叫链路的标识)。 |
| 字符串 | 从命令中接收的Base64编码状态。 |
| 枚举值: pstn, sip | 主叫方连接类型。 |
| 字符串 | 为呼叫生成的会话或洞察组的唯一ID。 |
| 整数 | 会话持续时长,单位为秒。 |
| 字符串 | 主叫号码或标识符。 |
| 字符串 | 被叫号码或SIP地址。 |
| 字符串 | 会话过程中使用的大语言模型。 |
| 字符串 | 会话中使用的语音转文本模型。 |
| 字符串 | 呼叫中使用的文本转语音服务商。 |
| 字符串 | 用于文本转语音合成的模型ID。 |
| 字符串 | 用于TTS的音色ID。 |
callConversationInsightsGenerated| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.conversation_insights.generated | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 枚举值: pstn, sip | 主叫方连接类型。 |
| 字符串 | 为呼叫生成的洞察组的唯一ID。 |
| 对象数组 | 为呼叫生成的洞察结果数组。 |
callDtmfReceived| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.dtmf.received | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 标识资源的类型。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
| 字符串 | 收到的DTMF数字或符号。 |
callMachineDetectionEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.machine.detection.ended | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
| 枚举值: human, machine, not_sure | 应答机检测结果。 |
callMachineGreetingEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.machine.greeting.ended | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
| 枚举值: beep_detected, ended, not_sure | 应答机问候语结束检测结果。 |
callMachinePremiumDetectionEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.machine.premium.detection.ended | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
| 枚举值: human_residence, human_business, machine, silence, fax_detected, not_sure | 高级应答机检测结果。 |
callMachinePremiumGreetingEnded| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.machine.premium.greeting.ended | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
| 枚举值: beep_detected, no_beep_detected | 高级应答机问候语结束检测结果。 |
callReferCompleted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.refer.completed | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于控制呼叫的唯一ID。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 整数 | 用于跟踪REFER尝试的SIP NOTIFY事件状态。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
callReferFailed| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.refer.failed | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于控制呼叫的唯一ID。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 整数 | 用于跟踪REFER尝试的SIP NOTIFY事件状态。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
callReferStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: call.refer.started | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于控制呼叫的唯一ID。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | 发起呼叫的号码或SIP URI。 |
| 整数 | 用于跟踪REFER尝试的SIP NOTIFY事件状态。 |
| 字符串 | 呼叫的目标号码或SIP URI。 |
callSiprecFailed| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: siprec.failed | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | siprec会话失败的Q850原因。 |
callSiprecStarted| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: siprec.started | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
callSiprecStopped| 字段 | 类型 | 描述 |
|---|---|---|
| 枚举值: event | 标识资源的类型。 |
| 枚举值: siprec.stopped | 所投递的事件类型。 |
| uuid | 标识资源的类型。 |
| 日期时间 | 事件发生的ISO 8601格式时间。 |
| 字符串 | 用于通过呼叫控制API下发指令的呼叫ID。 |
| 字符串 | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| 字符串 | 呼叫的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 呼叫会话的唯一ID,可用于关联Webhook事件。 |
| 字符串 | 从命令中接收的状态。 |
| 字符串 | SIPREC会话被停止的Q850原因。 |