telnyx-voice-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 - Java
Telnyx Voice - 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();以下所有示例均假设已按上述方式完成初始化。
clientAnswer call
接听呼叫
Answer an incoming call.
POST /calls/{call_control_id}/actions/answerOptional: (uuid), (string), (string), (array[object]), (enum), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (boolean), (array[object]), (object), (enum), (enum), (enum), (enum), (enum), (string), (boolean), (object), (string), (enum)
billing_group_idclient_statecommand_idcustom_headerspreferred_codecsrecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimsend_silence_when_idlesip_headerssound_modificationsstream_bidirectional_codecstream_bidirectional_modestream_bidirectional_target_legsstream_codecstream_trackstream_urltranscriptiontranscription_configwebhook_urlwebhook_url_methodjava
import com.telnyx.sdk.models.calls.actions.ActionAnswerParams;
import com.telnyx.sdk.models.calls.actions.ActionAnswerResponse;
ActionAnswerResponse response = client.calls().actions().answer("call_control_id");接听呼入的呼叫。
POST /calls/{call_control_id}/actions/answer可选参数: (uuid), (string), (string), (array[object]), (enum), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (boolean), (array[object]), (object), (enum), (enum), (enum), (enum), (enum), (string), (boolean), (object), (string), (enum)
billing_group_idclient_statecommand_idcustom_headerspreferred_codecsrecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimsend_silence_when_idlesip_headerssound_modificationsstream_bidirectional_codecstream_bidirectional_modestream_bidirectional_target_legsstream_codecstream_trackstream_urltranscriptiontranscription_configwebhook_urlwebhook_url_methodjava
import com.telnyx.sdk.models.calls.actions.ActionAnswerParams;
import com.telnyx.sdk.models.calls.actions.ActionAnswerResponse;
ActionAnswerResponse response = client.calls().actions().answer("call_control_id");Bridge calls
桥接呼叫
Bridge two call control calls.
POST /calls/{call_control_id}/actions/bridgecall_control_idOptional: (string), (string), (enum), (string), (boolean), (string), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (enum), (string), (uuid)
client_statecommand_idmute_dtmfpark_after_unbridgeplay_ringtonequeuerecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimringtonevideo_room_contextvideo_room_idjava
import com.telnyx.sdk.models.calls.actions.ActionBridgeParams;
import com.telnyx.sdk.models.calls.actions.ActionBridgeResponse;
ActionBridgeParams params = ActionBridgeParams.builder()
.callControlIdToBridge("call_control_id")
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionBridgeResponse response = client.calls().actions().bridge(params);桥接两个呼叫控制会话。
POST /calls/{call_control_id}/actions/bridgecall_control_id可选参数: (string), (string), (enum), (string), (boolean), (string), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (enum), (string), (uuid)
client_statecommand_idmute_dtmfpark_after_unbridgeplay_ringtonequeuerecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimringtonevideo_room_contextvideo_room_idjava
import com.telnyx.sdk.models.calls.actions.ActionBridgeParams;
import com.telnyx.sdk.models.calls.actions.ActionBridgeResponse;
ActionBridgeParams params = ActionBridgeParams.builder()
.callControlIdToBridge("call_control_id")
.callControlId("v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg")
.build();
ActionBridgeResponse response = client.calls().actions().bridge(params);Dial
发起呼叫
Dial a number or SIP URI from a given connection.
POST /callsconnection_idtofromOptional: (enum), (object), (string), (uuid), (boolean), (boolean), (string), (string), (object), (array[object]), (object), (boolean), (string), (string), (enum), (string), (string), (string), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (boolean), (string), (string), (array[object]), (enum), (enum), (object), (string), (enum), (enum), (enum), (enum), (enum), (boolean), (enum), (string), (string), (enum), (int32), (int32), (boolean), (object), (string), (enum)
answering_machine_detectionanswering_machine_detection_configaudio_urlbilling_group_idbridge_intentbridge_on_answerclient_statecommand_idconference_configcustom_headersdialogflow_configenable_dialogflowfrom_display_namelink_tomedia_encryptionmedia_namepark_after_unbridgepreferred_codecsrecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimsend_silence_when_idlesip_auth_passwordsip_auth_usernamesip_headerssip_regionsip_transport_protocolsound_modificationsstream_auth_tokenstream_bidirectional_codecstream_bidirectional_modestream_bidirectional_sampling_ratestream_bidirectional_target_legsstream_codecstream_establish_before_call_originatestream_trackstream_urlsupervise_call_control_idsupervisor_roletime_limit_secstimeout_secstranscriptiontranscription_configwebhook_urlwebhook_url_methodjava
import com.telnyx.sdk.models.calls.CallDialParams;
import com.telnyx.sdk.models.calls.CallDialResponse;
CallDialParams params = CallDialParams.builder()
.connectionId("7267xxxxxxxxxxxxxx")
.from("+18005550101")
.to("+18005550100")
.build();
CallDialResponse response = client.calls().dial(params);从指定连接拨打号码或SIP URI。
POST /callsconnection_idtofrom可选参数: (enum), (object), (string), (uuid), (boolean), (boolean), (string), (string), (object), (array[object]), (object), (boolean), (string), (string), (enum), (string), (string), (string), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (boolean), (string), (string), (array[object]), (enum), (enum), (object), (string), (enum), (enum), (enum), (enum), (enum), (boolean), (enum), (string), (string), (enum), (int32), (int32), (boolean), (object), (string), (enum)
answering_machine_detectionanswering_machine_detection_configaudio_urlbilling_group_idbridge_intentbridge_on_answerclient_statecommand_idconference_configcustom_headersdialogflow_configenable_dialogflowfrom_display_namelink_tomedia_encryptionmedia_namepark_after_unbridgepreferred_codecsrecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimsend_silence_when_idlesip_auth_passwordsip_auth_usernamesip_headerssip_regionsip_transport_protocolsound_modificationsstream_auth_tokenstream_bidirectional_codecstream_bidirectional_modestream_bidirectional_sampling_ratestream_bidirectional_target_legsstream_codecstream_establish_before_call_originatestream_trackstream_urlsupervise_call_control_idsupervisor_roletime_limit_secstimeout_secstranscriptiontranscription_configwebhook_urlwebhook_url_methodjava
import com.telnyx.sdk.models.calls.CallDialParams;
import com.telnyx.sdk.models.calls.CallDialResponse;
CallDialParams params = CallDialParams.builder()
.connectionId("7267xxxxxxxxxxxxxx")
.from("+18005550101")
.to("+18005550100")
.build();
CallDialResponse response = client.calls().dial(params);Hangup call
挂断呼叫
Hang up the call.
POST /calls/{call_control_id}/actions/hangupOptional: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionHangupParams;
import com.telnyx.sdk.models.calls.actions.ActionHangupResponse;
ActionHangupResponse response = client.calls().actions().hangup("call_control_id");挂断当前呼叫。
POST /calls/{call_control_id}/actions/hangup可选参数: (string), (string)
client_statecommand_idjava
import com.telnyx.sdk.models.calls.actions.ActionHangupParams;
import com.telnyx.sdk.models.calls.actions.ActionHangupResponse;
ActionHangupResponse response = client.calls().actions().hangup("call_control_id");Transfer call
转接呼叫
Transfer a call to a new destination.
POST /calls/{call_control_id}/actions/transfertoOptional: (enum), (object), (string), (string), (string), (array[object]), (boolean), (string), (string), (enum), (string), (enum), (string), (string), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (string), (string), (array[object]), (enum), (enum), (object), (string), (int32), (int32), (object), (string), (enum), (object), (enum)
answering_machine_detectionanswering_machine_detection_configaudio_urlclient_statecommand_idcustom_headersearly_mediafromfrom_display_namemedia_encryptionmedia_namemute_dtmfpark_after_unbridgepreferred_codecsrecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimsip_auth_passwordsip_auth_usernamesip_headerssip_regionsip_transport_protocolsound_modificationstarget_leg_client_statetime_limit_secstimeout_secswebhook_retries_policieswebhook_urlwebhook_url_methodwebhook_urlswebhook_urls_methodjava
import com.telnyx.sdk.models.calls.actions.ActionTransferParams;
import com.telnyx.sdk.models.calls.actions.ActionTransferResponse;
ActionTransferParams params = ActionTransferParams.builder()
.callControlId("call_control_id")
.to("+18005550100")
.build();
ActionTransferResponse response = client.calls().actions().transfer(params);将呼叫转接至新的目的地。
POST /calls/{call_control_id}/actions/transferto可选参数: (enum), (object), (string), (string), (string), (array[object]), (boolean), (string), (string), (enum), (string), (enum), (string), (string), (enum), (enum), (string), (enum), (int32), (int32), (enum), (enum), (string), (string), (array[object]), (enum), (enum), (object), (string), (int32), (int32), (object), (string), (enum), (object), (enum)
answering_machine_detectionanswering_machine_detection_configaudio_urlclient_statecommand_idcustom_headersearly_mediafromfrom_display_namemedia_encryptionmedia_namemute_dtmfpark_after_unbridgepreferred_codecsrecordrecord_channelsrecord_custom_file_namerecord_formatrecord_max_lengthrecord_timeout_secsrecord_trackrecord_trimsip_auth_passwordsip_auth_usernamesip_headerssip_regionsip_transport_protocolsound_modificationstarget_leg_client_statetime_limit_secstimeout_secswebhook_retries_policieswebhook_urlwebhook_url_methodwebhook_urlswebhook_urls_methodjava
import com.telnyx.sdk.models.calls.actions.ActionTransferParams;
import com.telnyx.sdk.models.calls.actions.ActionTransferResponse;
ActionTransferParams params = ActionTransferParams.builder()
.callControlId("call_control_id")
.to("+18005550100")
.build();
ActionTransferResponse response = client.calls().actions().transfer(params);List all active calls for given connection
列出指定连接的所有活跃呼叫
Lists all active calls for given connection.
GET /connections/{connection_id}/active_callsjava
import com.telnyx.sdk.models.connections.ConnectionListActiveCallsPage;
import com.telnyx.sdk.models.connections.ConnectionListActiveCallsParams;
ConnectionListActiveCallsPage page = client.connections().listActiveCalls("1293384261075731461");列出指定连接下的所有活跃呼叫。
GET /connections/{connection_id}/active_callsjava
import com.telnyx.sdk.models.connections.ConnectionListActiveCallsPage;
import com.telnyx.sdk.models.connections.ConnectionListActiveCallsParams;
ConnectionListActiveCallsPage page = client.connections().listActiveCalls("1293384261075731461");List call control applications
列出呼叫控制应用
Return a list of call control applications.
GET /call_control_applicationsjava
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationListPage;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationListParams;
CallControlApplicationListPage page = client.callControlApplications().list();返回呼叫控制应用列表。
GET /call_control_applicationsjava
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationListPage;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationListParams;
CallControlApplicationListPage page = client.callControlApplications().list();Create a call control application
创建呼叫控制应用
Create a call control application.
POST /call_control_applicationsapplication_namewebhook_event_urlOptional: (boolean), (enum), (boolean), (enum), (boolean), (integer), (object), (object), (boolean), (enum), (url), (['integer', 'null'])
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundredact_dtmf_debug_loggingwebhook_api_versionwebhook_event_failover_urlwebhook_timeout_secsjava
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationCreateParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationCreateResponse;
CallControlApplicationCreateParams params = CallControlApplicationCreateParams.builder()
.applicationName("call-router")
.webhookEventUrl("https://example.com")
.build();
CallControlApplicationCreateResponse callControlApplication = client.callControlApplications().create(params);创建一个呼叫控制应用。
POST /call_control_applicationsapplication_namewebhook_event_url可选参数: (boolean), (enum), (boolean), (enum), (boolean), (integer), (object), (object), (boolean), (enum), (url), (['integer', 'null'])
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundredact_dtmf_debug_loggingwebhook_api_versionwebhook_event_failover_urlwebhook_timeout_secsjava
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationCreateParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationCreateResponse;
CallControlApplicationCreateParams params = CallControlApplicationCreateParams.builder()
.applicationName("call-router")
.webhookEventUrl("https://example.com")
.build();
CallControlApplicationCreateResponse callControlApplication = client.callControlApplications().create(params);Retrieve a call control application
获取呼叫控制应用详情
Retrieves the details of an existing call control application.
GET /call_control_applications/{id}java
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationRetrieveParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationRetrieveResponse;
CallControlApplicationRetrieveResponse callControlApplication = client.callControlApplications().retrieve("1293384261075731499");获取已存在的呼叫控制应用的详细信息。
GET /call_control_applications/{id}java
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationRetrieveParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationRetrieveResponse;
CallControlApplicationRetrieveResponse callControlApplication = client.callControlApplications().retrieve("1293384261075731499");Update a call control application
更新呼叫控制应用
Updates settings of an existing call control application.
PATCH /call_control_applications/{id}application_namewebhook_event_urlOptional: (boolean), (enum), (boolean), (enum), (boolean), (integer), (object), (object), (boolean), (array[string]), (enum), (url), (['integer', 'null'])
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundredact_dtmf_debug_loggingtagswebhook_api_versionwebhook_event_failover_urlwebhook_timeout_secsjava
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationUpdateParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationUpdateResponse;
CallControlApplicationUpdateParams params = CallControlApplicationUpdateParams.builder()
.id("1293384261075731499")
.applicationName("call-router")
.webhookEventUrl("https://example.com")
.build();
CallControlApplicationUpdateResponse callControlApplication = client.callControlApplications().update(params);更新已存在的呼叫控制应用设置。
PATCH /call_control_applications/{id}application_namewebhook_event_url可选参数: (boolean), (enum), (boolean), (enum), (boolean), (integer), (object), (object), (boolean), (array[string]), (enum), (url), (['integer', 'null'])
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundredact_dtmf_debug_loggingtagswebhook_api_versionwebhook_event_failover_urlwebhook_timeout_secsjava
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationUpdateParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationUpdateResponse;
CallControlApplicationUpdateParams params = CallControlApplicationUpdateParams.builder()
.id("1293384261075731499")
.applicationName("call-router")
.webhookEventUrl("https://example.com")
.build();
CallControlApplicationUpdateResponse callControlApplication = client.callControlApplications().update(params);Delete a call control application
删除呼叫控制应用
Deletes a call control application.
DELETE /call_control_applications/{id}java
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationDeleteParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationDeleteResponse;
CallControlApplicationDeleteResponse callControlApplication = client.callControlApplications().delete("1293384261075731499");删除指定的呼叫控制应用。
DELETE /call_control_applications/{id}java
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationDeleteParams;
import com.telnyx.sdk.models.callcontrolapplications.CallControlApplicationDeleteResponse;
CallControlApplicationDeleteResponse callControlApplication = client.callControlApplications().delete("1293384261075731499");List call events
列出呼叫事件
Filters call events by given filter parameters.
GET /call_eventsjava
import com.telnyx.sdk.models.callevents.CallEventListPage;
import com.telnyx.sdk.models.callevents.CallEventListParams;
CallEventListPage page = client.callEvents().list();根据指定过滤参数筛选呼叫事件。
GET /call_eventsjava
import com.telnyx.sdk.models.callevents.CallEventListPage;
import com.telnyx.sdk.models.callevents.CallEventListParams;
CallEventListPage page = client.callEvents().list();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 Answered |
| Call Streaming Started |
| Call Streaming Stopped |
| Call Streaming Failed |
| Call Bridged |
| Call Initiated |
| Call Hangup |
| Call Recording Saved |
| Call Machine Detection Ended |
| Call Machine Greeting Ended |
| Call Machine Premium Detection Ended |
| Call Machine Premium Greeting Ended |
以下Webhook事件将发送至您配置的Webhook URL。所有Webhook均包含和头信息用于验证(兼容标准Webhooks)。
telnyx-timestamptelnyx-signature-ed25519| 事件 | 描述 |
|---|---|
| 呼叫已接听 |
| 呼叫流已启动 |
| 呼叫流已停止 |
| 呼叫流启动失败 |
| 呼叫已桥接 |
| 呼叫已发起 |
| 呼叫已挂断 |
| 呼叫录音已保存 |
| 自动应答机检测已结束 |
| 自动应答机问候语已结束 |
| 高级自动应答机检测已结束 |
| 高级自动应答机问候语已结束 |
Webhook payload fields
Webhook负载字段
callAnswered| 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. |
| array[object] | Custom headers set on answer command |
| array[object] | User-to-User and Diversion headers from sip invite. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| date-time | ISO 8601 datetime of when the call started. |
| enum | State received from a command. |
| array[string] | Array of tags associated to number. |
callStreamingStarted| 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 | Destination WebSocket address where the stream is going to be delivered. |
callStreamingStopped| 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 | Destination WebSocket address where the stream is going to be delivered. |
callStreamingFailed| Field | Type | Description |
|---|---|---|
| enum | Identifies 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 | A short description explaning why the media streaming failed. |
| uuid | Identifies the streaming. |
| enum | The type of stream connection the stream is performing. |
callBridged| 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. |
callInitiated| 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 | The list of comma-separated codecs enabled for the connection. |
| string | The list of comma-separated codecs offered by caller. |
| string | ID that is unique to the call and can be used to correlate webhook events. |
| array[object] | Custom headers from sip invite |
| array[object] | User-to-User and Diversion headers from sip invite. |
| string | SHAKEN/STIR attestation level. |
| boolean | Whether attestation was successfully validated or not. |
| string | ID that is unique to the call session and can be used to correlate webhook events. |
| string | State received from a command. |
| string | Caller id. |
| string | Call screening result. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| enum | Whether the call is |
| enum | State received from a command. |
| date-time | ISO 8601 datetime of when the call started. |
| array[string] | Array of tags associated to number. |
callHangup| 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. |
| array[object] | Custom headers set on answer command |
| array[object] | User-to-User and Diversion headers from sip invite. |
| string | Number or SIP URI placing the call. |
| string | Destination number or SIP URI of the call. |
| date-time | ISO 8601 datetime of when the call started. |
| enum | State received from a command. |
| array[string] | Array of tags associated to number. |
| enum | The reason the call was ended ( |
| enum | The party who ended the call ( |
| string | The reason the call was ended (SIP response code). |
| ['object', 'null'] | Call quality statistics aggregated from the CHANNEL_HANGUP_COMPLETE event. |
callRecordingSaved| 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 | 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. |
| date-time | ISO 8601 datetime of when recording started. |
| date-time | ISO 8601 datetime of when recording ended. |
| enum | Whether recording was recorded in |
callMachineDetectionEnded| 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. |
| enum | Answering machine detection result. |
callMachineGreetingEnded| 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. |
| enum | Answering machine greeting ended result. |
callMachinePremiumDetectionEnded| 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. |
| enum | Premium Answering Machine Detection result. |
callMachinePremiumGreetingEnded| 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. |
| enum | Premium Answering Machine Greeting Ended result. |
callAnswered| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| array[object] | 接听命令中设置的自定义头信息 |
| array[object] | SIP邀请中的用户到用户及转移头信息。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
| date-time | 呼叫启动的ISO 8601格式时间。 |
| enum | 从命令中接收的状态信息。 |
| array[string] | 与号码关联的标签数组。 |
callStreamingStarted| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 推送呼叫流的目标WebSocket地址。 |
callStreamingStopped| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 推送呼叫流的目标WebSocket地址。 |
callStreamingFailed| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 媒体流启动失败的简短说明。 |
| uuid | 标识流会话。 |
| enum | 流连接的类型。 |
callBridged| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
callInitiated| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 连接启用的编解码器列表,以逗号分隔。 |
| string | 呼叫方提供的编解码器列表,以逗号分隔。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| array[object] | SIP邀请中的自定义头信息 |
| array[object] | SIP邀请中的用户到用户及转移头信息。 |
| string | SHAKEN/STIR认证级别。 |
| boolean | 认证是否成功验证。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 来电显示名称。 |
| string | 呼叫筛选结果。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
| enum | 呼叫方向, |
| enum | 从命令中接收的状态信息。 |
| date-time | 呼叫启动的ISO 8601格式时间。 |
| array[string] | 与号码关联的标签数组。 |
callHangup| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| array[object] | 接听命令中设置的自定义头信息 |
| array[object] | SIP邀请中的用户到用户及转移头信息。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
| date-time | 呼叫启动的ISO 8601格式时间。 |
| enum | 从命令中接收的状态信息。 |
| array[string] | 与号码关联的标签数组。 |
| enum | 呼叫结束原因( |
| enum | 结束呼叫的一方( |
| string | 呼叫结束的SIP响应代码。 |
| ['object', 'null'] | 从CHANNEL_HANGUP_COMPLETE事件聚合的呼叫质量统计信息。 |
callRecordingSaved| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 从命令中接收의状态信息。 |
| date-time | 录音启动的ISO 8601格式时间。 |
| date-time | 录音结束的ISO 8601格式时间。 |
| enum | 录音声道类型, |
callMachineDetectionEnded| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
| enum | 自动应答机检测结果。 |
callMachineGreetingEnded| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
| enum | 自动应答机问候语检测结果。 |
callMachinePremiumDetectionEnded| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
| enum | 高级自动应答机检测结果。 |
callMachinePremiumGreetingEnded| 字段 | 类型 | 描述 |
|---|---|---|
| enum | 标识资源类型。 |
| enum | 标识所推送的事件类型。 |
| uuid | 标识资源类型。 |
| date-time | 事件发生的ISO 8601格式时间。 |
| string | 用于通过Call Control API下发命令的呼叫ID。 |
| string | 呼叫中使用的呼叫控制应用ID(原Telnyx连接ID)。 |
| string | 呼叫唯一ID,可用于关联Webhook事件。 |
| string | 呼叫会话唯一ID,可用于关联Webhook事件。 |
| string | 从命令中接收的状态信息。 |
| string | 发起呼叫的号码或SIP URI。 |
| string | 呼叫的目标号码或SIP URI。 |
| enum | 高级自动应答机问候语检测结果。 |