telnyx-texml-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 Texml - Java

Telnyx Texml - 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
client
is already initialized as shown above.
java
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

TelnyxClient client = TelnyxOkHttpClient.fromEnv();
以下所有示例均假设
client
已按照上述方式完成初始化。

Error 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:
401
invalid API key,
403
insufficient permissions,
404
resource not found,
422
validation error (check field formats),
429
rate limited (retry with exponential backoff).
所有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);
    }
}
常见错误码:
401
API密钥无效,
403
权限不足,
404
资源不存在,
422
校验错误(请检查字段格式),
429
触发速率限制(请使用指数退避策略重试)。

Important Notes

注意事项

  • Pagination: List methods return a page. Use
    .autoPager()
    for automatic iteration:
    for (var item : page.autoPager()) { ... }
    . For manual control, use
    .hasNextPage()
    and
    .nextPage()
    .
  • 分页: 列表类方法返回单页数据。使用
    .autoPager()
    可实现自动迭代:
    for (var item : page.autoPager()) { ... }
    。如需手动控制分页,可使用
    .hasNextPage()
    .nextPage()
    方法。

Fetch multiple call resources

获取多个通话资源

Returns multiple call resources for an account. This endpoint is eventually consistent.
GET /texml/Accounts/{account_sid}/Calls
java
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveCallsParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveCallsResponse;

CallRetrieveCallsResponse response = client.texml().accounts().calls().retrieveCalls("550e8400-e29b-41d4-a716-446655440000");
Returns:
calls
(array[object]),
end
(integer),
first_page_uri
(string),
next_page_uri
(string),
page
(integer),
page_size
(integer),
start
(integer),
uri
(string)
返回当前账号下的多个通话资源,该接口为最终一致性接口。
GET /texml/Accounts/{account_sid}/Calls
java
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveCallsParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveCallsResponse;

CallRetrieveCallsResponse response = client.texml().accounts().calls().retrieveCalls("550e8400-e29b-41d4-a716-446655440000");
返回参数:
calls
(array[object])、
end
(integer)、
first_page_uri
(string)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
start
(integer)、
uri
(string)

Initiate an outbound call

发起外呼

Initiate an outbound TeXML call. Telnyx will request TeXML from the XML Request URL configured for the connection in the Mission Control Portal.
POST /texml/Accounts/{account_sid}/Calls
— Required:
To
,
From
,
ApplicationSid
Optional:
AsyncAmd
(boolean),
AsyncAmdStatusCallback
(string),
AsyncAmdStatusCallbackMethod
(enum: GET, POST),
CallerId
(string),
CancelPlaybackOnDetectMessageEnd
(boolean),
CancelPlaybackOnMachineDetection
(boolean),
CustomHeaders
(array[object]),
DetectionMode
(enum: Premium, Regular),
FallbackUrl
(string),
MachineDetection
(enum: Enable, Disable, DetectMessageEnd),
MachineDetectionSilenceTimeout
(integer),
MachineDetectionSpeechEndThreshold
(integer),
MachineDetectionSpeechThreshold
(integer),
MachineDetectionTimeout
(integer),
PreferredCodecs
(string),
Record
(boolean),
RecordingChannels
(enum: mono, dual),
RecordingStatusCallback
(string),
RecordingStatusCallbackEvent
(string),
RecordingStatusCallbackMethod
(enum: GET, POST),
RecordingTimeout
(integer),
RecordingTrack
(enum: inbound, outbound, both),
SendRecordingUrl
(boolean),
SipAuthPassword
(string),
SipAuthUsername
(string),
SipRegion
(enum: US, Europe, Canada, Australia, Middle East),
StatusCallback
(string),
StatusCallbackEvent
(enum: initiated, ringing, answered, completed),
StatusCallbackMethod
(enum: GET, POST),
SuperviseCallSid
(string),
SupervisingRole
(enum: barge, whisper, monitor),
Texml
(string),
TimeLimit
(integer),
Timeout
(integer),
Trim
(enum: trim-silence, do-not-trim),
Url
(string),
UrlMethod
(enum: GET, POST)
java
import com.telnyx.sdk.models.texml.accounts.calls.CallCallsParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallCallsResponse;

CallCallsParams params = CallCallsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .applicationSid("example-app-sid")
    .from("+13120001234")
    .to("+13121230000")
    .build();
CallCallsResponse response = client.texml().accounts().calls().calls(params);
Returns:
from
(string),
status
(string),
to
(string)
发起一个TeXML外呼,Telnyx会向Mission Control Portal中为该连接配置的XML请求地址拉取TeXML内容。
POST /texml/Accounts/{account_sid}/Calls
— 必填参数:
To
From
ApplicationSid
可选参数:
AsyncAmd
(boolean)、
AsyncAmdStatusCallback
(string)、
AsyncAmdStatusCallbackMethod
(enum: GET, POST)、
CallerId
(string)、
CancelPlaybackOnDetectMessageEnd
(boolean)、
CancelPlaybackOnMachineDetection
(boolean)、
CustomHeaders
(array[object])、
DetectionMode
(enum: Premium, Regular)、
FallbackUrl
(string)、
MachineDetection
(enum: Enable, Disable, DetectMessageEnd)、
MachineDetectionSilenceTimeout
(integer)、
MachineDetectionSpeechEndThreshold
(integer)、
MachineDetectionSpeechThreshold
(integer)、
MachineDetectionTimeout
(integer)、
PreferredCodecs
(string)、
Record
(boolean)、
RecordingChannels
(enum: mono, dual)、
RecordingStatusCallback
(string)、
RecordingStatusCallbackEvent
(string)、
RecordingStatusCallbackMethod
(enum: GET, POST)、
RecordingTimeout
(integer)、
RecordingTrack
(enum: inbound, outbound, both)、
SendRecordingUrl
(boolean)、
SipAuthPassword
(string)、
SipAuthUsername
(string)、
SipRegion
(enum: US, Europe, Canada, Australia, Middle East)、
StatusCallback
(string)、
StatusCallbackEvent
(enum: initiated, ringing, answered, completed)、
StatusCallbackMethod
(enum: GET, POST)、
SuperviseCallSid
(string)、
SupervisingRole
(enum: barge, whisper, monitor)、
Texml
(string)、
TimeLimit
(integer)、
Timeout
(integer)、
Trim
(enum: trim-silence, do-not-trim)、
Url
(string)、
UrlMethod
(enum: GET, POST)
java
import com.telnyx.sdk.models.texml.accounts.calls.CallCallsParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallCallsResponse;

CallCallsParams params = CallCallsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .applicationSid("example-app-sid")
    .from("+13120001234")
    .to("+13121230000")
    .build();
CallCallsResponse response = client.texml().accounts().calls().calls(params);
返回参数:
from
(string)、
status
(string)、
to
(string)

Fetch a call

获取单个通话信息

Returns an individual call identified by its CallSid. This endpoint is eventually consistent.
GET /texml/Accounts/{account_sid}/Calls/{call_sid}
java
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveResponse;

CallRetrieveParams params = CallRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
CallRetrieveResponse call = client.texml().accounts().calls().retrieve(params);
Returns:
account_sid
(string),
answered_by
(enum: human, machine, not_sure),
caller_name
(string),
date_created
(string),
date_updated
(string),
direction
(enum: inbound, outbound),
duration
(string),
end_time
(string),
from
(string),
from_formatted
(string),
price
(string),
price_unit
(string),
sid
(string),
start_time
(string),
status
(enum: ringing, in-progress, canceled, completed, failed, busy, no-answer),
to
(string),
to_formatted
(string),
uri
(string)
返回CallSid对应的单个通话信息,该接口为最终一致性接口。
GET /texml/Accounts/{account_sid}/Calls/{call_sid}
java
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallRetrieveResponse;

CallRetrieveParams params = CallRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
CallRetrieveResponse call = client.texml().accounts().calls().retrieve(params);
返回参数:
account_sid
(string)、
answered_by
(enum: human, machine, not_sure)、
caller_name
(string)、
date_created
(string)、
date_updated
(string)、
direction
(enum: inbound, outbound)、
duration
(string)、
end_time
(string)、
from
(string)、
from_formatted
(string)、
price
(string)、
price_unit
(string)、
sid
(string)、
start_time
(string)、
status
(enum: ringing, in-progress, canceled, completed, failed, busy, no-answer)、
to
(string)、
to_formatted
(string)、
uri
(string)

Update call

更新通话信息

Update TeXML call. Please note that the keys present in the payload MUST BE formatted in CamelCase as specified in the example.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}
java
import com.telnyx.sdk.models.texml.accounts.calls.CallUpdateParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallUpdateResponse;
import com.telnyx.sdk.models.texml.accounts.calls.UpdateCall;

CallUpdateParams params = CallUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .updateCall(UpdateCall.builder().build())
    .build();
CallUpdateResponse call = client.texml().accounts().calls().update(params);
Returns:
account_sid
(string),
answered_by
(enum: human, machine, not_sure),
caller_name
(string),
date_created
(string),
date_updated
(string),
direction
(enum: inbound, outbound),
duration
(string),
end_time
(string),
from
(string),
from_formatted
(string),
price
(string),
price_unit
(string),
sid
(string),
start_time
(string),
status
(enum: ringing, in-progress, canceled, completed, failed, busy, no-answer),
to
(string),
to_formatted
(string),
uri
(string)
更新TeXML通话信息,请注意请求体中的键必须按照示例所示采用驼峰命名格式。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}
java
import com.telnyx.sdk.models.texml.accounts.calls.CallUpdateParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallUpdateResponse;
import com.telnyx.sdk.models.texml.accounts.calls.UpdateCall;

CallUpdateParams params = CallUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .updateCall(UpdateCall.builder().build())
    .build();
CallUpdateResponse call = client.texml().accounts().calls().update(params);
返回参数:
account_sid
(string)、
answered_by
(enum: human, machine, not_sure)、
caller_name
(string)、
date_created
(string)、
date_updated
(string)、
direction
(enum: inbound, outbound)、
duration
(string)、
end_time
(string)、
from
(string)、
from_formatted
(string)、
price
(string)、
price_unit
(string)、
sid
(string)、
start_time
(string)、
status
(enum: ringing, in-progress, canceled, completed, failed, busy, no-answer)、
to
(string)、
to_formatted
(string)、
uri
(string)

Fetch recordings for a call

获取通话录音列表

Returns recordings for a call identified by call_sid.
GET /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRetrieveRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRetrieveRecordingsJsonResponse;

RecordingsJsonRetrieveRecordingsJsonParams params = RecordingsJsonRetrieveRecordingsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
RecordingsJsonRetrieveRecordingsJsonResponse response = client.texml().accounts().calls().recordingsJson().retrieveRecordingsJson(params);
Returns:
end
(integer),
first_page_uri
(uri),
next_page_uri
(string),
page
(integer),
page_size
(integer),
previous_page_uri
(uri),
recordings
(array[object]),
start
(integer),
uri
(string)
返回call_sid对应通话的录音列表。
GET /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRetrieveRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRetrieveRecordingsJsonResponse;

RecordingsJsonRetrieveRecordingsJsonParams params = RecordingsJsonRetrieveRecordingsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
RecordingsJsonRetrieveRecordingsJsonResponse response = client.texml().accounts().calls().recordingsJson().retrieveRecordingsJson(params);
返回参数:
end
(integer)、
first_page_uri
(uri)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
previous_page_uri
(uri)、
recordings
(array[object])、
start
(integer)、
uri
(string)

Request recording for a call

发起通话录音

Starts recording with specified parameters for call identified by call_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRecordingsJsonResponse;

RecordingsJsonRecordingsJsonParams params = RecordingsJsonRecordingsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
RecordingsJsonRecordingsJsonResponse response = client.texml().accounts().calls().recordingsJson().recordingsJson(params);
Returns:
account_sid
(string),
call_sid
(string),
channels
(enum: 1, 2),
conference_sid
(uuid),
date_created
(date-time),
date_updated
(date-time),
duration
(string | null),
error_code
(string | null),
price
(string | null),
price_unit
(string | null),
sid
(string),
source
(enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking),
start_time
(date-time),
track
(enum: inbound, outbound, both),
uri
(string)
为call_sid对应的通话按指定参数启动录音。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordingsjson.RecordingsJsonRecordingsJsonResponse;

RecordingsJsonRecordingsJsonParams params = RecordingsJsonRecordingsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
RecordingsJsonRecordingsJsonResponse response = client.texml().accounts().calls().recordingsJson().recordingsJson(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
channels
(enum: 1, 2)、
conference_sid
(uuid)、
date_created
(date-time)、
date_updated
(date-time)、
duration
(string | null)、
error_code
(string | null)、
price
(string | null)、
price_unit
(string | null)、
sid
(string)、
source
(enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking)、
start_time
(date-time)、
track
(enum: inbound, outbound, both)、
uri
(string)

Update recording on a call

更新通话录音

Updates recording resource for particular call.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonResponse;

RecordingRecordingSidJsonParams params = RecordingRecordingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
RecordingRecordingSidJsonResponse response = client.texml().accounts().calls().recordings().recordingSidJson(params);
Returns:
account_sid
(string),
call_sid
(string),
channels
(enum: 1, 2),
conference_sid
(uuid),
date_created
(date-time),
date_updated
(date-time),
duration
(string | null),
error_code
(string | null),
price
(string | null),
price_unit
(string | null),
sid
(string),
source
(enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking),
start_time
(date-time),
track
(enum: inbound, outbound, both),
uri
(string)
更新指定通话的录音资源。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.recordings.RecordingRecordingSidJsonResponse;

RecordingRecordingSidJsonParams params = RecordingRecordingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
RecordingRecordingSidJsonResponse response = client.texml().accounts().calls().recordings().recordingSidJson(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
channels
(enum: 1, 2)、
conference_sid
(uuid)、
date_created
(date-time)、
date_updated
(date-time)、
duration
(string | null)、
error_code
(string | null)、
price
(string | null)、
price_unit
(string | null)、
sid
(string)、
source
(enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking)、
start_time
(date-time)、
track
(enum: inbound, outbound, both)、
uri
(string)

Request siprec session for a call

发起通话siprec会话

Starts siprec session with specified parameters for call identified by call_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec.json
java
import com.telnyx.sdk.models.texml.accounts.calls.CallSiprecJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallSiprecJsonResponse;

CallSiprecJsonParams params = CallSiprecJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
CallSiprecJsonResponse response = client.texml().accounts().calls().siprecJson(params);
Returns:
account_sid
(string),
call_sid
(string),
date_created
(string),
date_updated
(string),
error_code
(string),
sid
(string),
start_time
(string),
status
(enum: in-progress, stopped),
track
(enum: both_tracks, inbound_track, outbound_track),
uri
(string)
为call_sid对应的通话按指定参数启动siprec会话。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec.json
java
import com.telnyx.sdk.models.texml.accounts.calls.CallSiprecJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallSiprecJsonResponse;

CallSiprecJsonParams params = CallSiprecJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
CallSiprecJsonResponse response = client.texml().accounts().calls().siprecJson(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
date_created
(string)、
date_updated
(string)、
error_code
(string)、
sid
(string)、
start_time
(string)、
status
(enum: in-progress, stopped)、
track
(enum: both_tracks, inbound_track, outbound_track)、
uri
(string)

Updates siprec session for a call

更新通话siprec会话

Updates siprec session identified by siprec_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec/{siprec_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.calls.siprec.SiprecSiprecSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.siprec.SiprecSiprecSidJsonResponse;

SiprecSiprecSidJsonParams params = SiprecSiprecSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .siprecSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
SiprecSiprecSidJsonResponse response = client.texml().accounts().calls().siprec().siprecSidJson(params);
Returns:
account_sid
(string),
call_sid
(string),
date_updated
(string),
error_code
(string),
sid
(string),
status
(enum: in-progress, stopped),
uri
(string)
更新siprec_sid对应的siprec会话。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec/{siprec_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.calls.siprec.SiprecSiprecSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.siprec.SiprecSiprecSidJsonResponse;

SiprecSiprecSidJsonParams params = SiprecSiprecSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .siprecSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
SiprecSiprecSidJsonResponse response = client.texml().accounts().calls().siprec().siprecSidJson(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
date_updated
(string)、
error_code
(string)、
sid
(string)、
status
(enum: in-progress, stopped)、
uri
(string)

Start streaming media from a call.

启动通话媒体流

Starts streaming media from a call to a specific WebSocket address.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams.json
java
import com.telnyx.sdk.models.texml.accounts.calls.CallStreamsJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallStreamsJsonResponse;

CallStreamsJsonParams params = CallStreamsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
CallStreamsJsonResponse response = client.texml().accounts().calls().streamsJson(params);
Returns:
account_sid
(string),
call_sid
(string),
date_updated
(date-time),
name
(string),
sid
(string),
status
(enum: in-progress),
uri
(string)
将通话的媒体流推送到指定的WebSocket地址。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams.json
java
import com.telnyx.sdk.models.texml.accounts.calls.CallStreamsJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.CallStreamsJsonResponse;

CallStreamsJsonParams params = CallStreamsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
CallStreamsJsonResponse response = client.texml().accounts().calls().streamsJson(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
date_updated
(date-time)、
name
(string)、
sid
(string)、
status
(enum: in-progress)、
uri
(string)

Update streaming on a call

更新通话媒体流

Updates streaming resource for particular call.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams/{streaming_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.calls.streams.StreamStreamingSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.streams.StreamStreamingSidJsonResponse;

StreamStreamingSidJsonParams params = StreamStreamingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .streamingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
StreamStreamingSidJsonResponse response = client.texml().accounts().calls().streams().streamingSidJson(params);
Returns:
account_sid
(string),
call_sid
(string),
date_updated
(date-time),
sid
(string),
status
(enum: stopped),
uri
(string)
更新指定通话的媒体流资源。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams/{streaming_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.calls.streams.StreamStreamingSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.calls.streams.StreamStreamingSidJsonResponse;

StreamStreamingSidJsonParams params = StreamStreamingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .callSid("550e8400-e29b-41d4-a716-446655440000")
    .streamingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
StreamStreamingSidJsonResponse response = client.texml().accounts().calls().streams().streamingSidJson(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
date_updated
(date-time)、
sid
(string)、
status
(enum: stopped)、
uri
(string)

List conference resources

获取会议资源列表

Lists conference resources.
GET /texml/Accounts/{account_sid}/Conferences
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveConferencesParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveConferencesResponse;

ConferenceRetrieveConferencesResponse response = client.texml().accounts().conferences().retrieveConferences("550e8400-e29b-41d4-a716-446655440000");
Returns:
conferences
(array[object]),
end
(integer),
first_page_uri
(string),
next_page_uri
(string),
page
(integer),
page_size
(integer),
start
(integer),
uri
(string)
返回会议资源列表。
GET /texml/Accounts/{account_sid}/Conferences
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveConferencesParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveConferencesResponse;

ConferenceRetrieveConferencesResponse response = client.texml().accounts().conferences().retrieveConferences("550e8400-e29b-41d4-a716-446655440000");
返回参数:
conferences
(array[object])、
end
(integer)、
first_page_uri
(string)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
start
(integer)、
uri
(string)

Fetch a conference resource

获取单个会议资源

Returns a conference resource.
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveResponse;

ConferenceRetrieveParams params = ConferenceRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceRetrieveResponse conference = client.texml().accounts().conferences().retrieve(params);
Returns:
account_sid
(string),
api_version
(string),
call_sid_ending_conference
(string),
date_created
(string),
date_updated
(string),
friendly_name
(string),
reason_conference_ended
(enum: participant-with-end-conference-on-exit-left, last-participant-left, conference-ended-via-api, time-exceeded),
region
(string),
sid
(string),
status
(enum: init, in-progress, completed),
subresource_uris
(object),
uri
(string)
返回指定的会议资源。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveResponse;

ConferenceRetrieveParams params = ConferenceRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceRetrieveResponse conference = client.texml().accounts().conferences().retrieve(params);
返回参数:
account_sid
(string)、
api_version
(string)、
call_sid_ending_conference
(string)、
date_created
(string)、
date_updated
(string)、
friendly_name
(string)、
reason_conference_ended
(enum: participant-with-end-conference-on-exit-left, last-participant-left, conference-ended-via-api, time-exceeded)、
region
(string)、
sid
(string)、
status
(enum: init, in-progress, completed)、
subresource_uris
(object)、
uri
(string)

Update a conference resource

更新会议资源

Updates a conference resource.
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceUpdateParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceUpdateResponse;

ConferenceUpdateParams params = ConferenceUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceUpdateResponse conference = client.texml().accounts().conferences().update(params);
Returns:
account_sid
(string),
api_version
(string),
call_sid_ending_conference
(string),
date_created
(string),
date_updated
(string),
friendly_name
(string),
reason_conference_ended
(enum: participant-with-end-conference-on-exit-left, last-participant-left, conference-ended-via-api, time-exceeded),
region
(string),
sid
(string),
status
(enum: init, in-progress, completed),
subresource_uris
(object),
uri
(string)
更新指定的会议资源。
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceUpdateParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceUpdateResponse;

ConferenceUpdateParams params = ConferenceUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceUpdateResponse conference = client.texml().accounts().conferences().update(params);
返回参数:
account_sid
(string)、
api_version
(string)、
call_sid_ending_conference
(string)、
date_created
(string)、
date_updated
(string)、
friendly_name
(string)、
reason_conference_ended
(enum: participant-with-end-conference-on-exit-left, last-participant-left, conference-ended-via-api, time-exceeded)、
region
(string)、
sid
(string)、
status
(enum: init, in-progress, completed)、
subresource_uris
(object)、
uri
(string)

List conference participants

获取会议参与者列表

Lists conference participants
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveParticipantsParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveParticipantsResponse;

ParticipantRetrieveParticipantsParams params = ParticipantRetrieveParticipantsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ParticipantRetrieveParticipantsResponse response = client.texml().accounts().conferences().participants().retrieveParticipants(params);
Returns:
end
(integer),
first_page_uri
(string),
next_page_uri
(string),
page
(integer),
page_size
(integer),
participants
(array[object]),
start
(integer),
uri
(string)
返回会议参与者列表。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveParticipantsParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveParticipantsResponse;

ParticipantRetrieveParticipantsParams params = ParticipantRetrieveParticipantsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ParticipantRetrieveParticipantsResponse response = client.texml().accounts().conferences().participants().retrieveParticipants(params);
返回参数:
end
(integer)、
first_page_uri
(string)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
participants
(array[object])、
start
(integer)、
uri
(string)

Dial a new conference participant

邀请新的会议参与者

Dials a new conference participant
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantParticipantsParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantParticipantsResponse;

ParticipantParticipantsParams params = ParticipantParticipantsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ParticipantParticipantsResponse response = client.texml().accounts().conferences().participants().participants(params);
Returns:
account_sid
(string),
call_sid
(string),
coaching
(boolean),
coaching_call_sid
(string),
conference_sid
(uuid),
end_conference_on_exit
(boolean),
hold
(boolean),
muted
(boolean),
status
(enum: connecting, connected, completed),
uri
(string)
拨号邀请新的参与者加入会议。
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantParticipantsParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantParticipantsResponse;

ParticipantParticipantsParams params = ParticipantParticipantsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ParticipantParticipantsResponse response = client.texml().accounts().conferences().participants().participants(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
coaching
(boolean)、
coaching_call_sid
(string)、
conference_sid
(uuid)、
end_conference_on_exit
(boolean)、
hold
(boolean)、
muted
(boolean)、
status
(enum: connecting, connected, completed)、
uri
(string)

Get conference participant resource

获取单个会议参与者信息

Gets conference participant resource
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveResponse;

ParticipantRetrieveParams params = ParticipantRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .callSidOrParticipantLabel("participant-1")
    .build();
ParticipantRetrieveResponse participant = client.texml().accounts().conferences().participants().retrieve(params);
Returns:
account_sid
(string),
api_version
(string),
call_sid
(string),
call_sid_legacy
(string),
coaching
(boolean),
coaching_call_sid
(string),
coaching_call_sid_legacy
(string),
conference_sid
(uuid),
date_created
(string),
date_updated
(string),
end_conference_on_exit
(boolean),
hold
(boolean),
muted
(boolean),
status
(enum: connecting, connected, completed),
uri
(string)
返回指定的会议参与者资源。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantRetrieveResponse;

ParticipantRetrieveParams params = ParticipantRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .callSidOrParticipantLabel("participant-1")
    .build();
ParticipantRetrieveResponse participant = client.texml().accounts().conferences().participants().retrieve(params);
返回参数:
account_sid
(string)、
api_version
(string)、
call_sid
(string)、
call_sid_legacy
(string)、
coaching
(boolean)、
coaching_call_sid
(string)、
coaching_call_sid_legacy
(string)、
conference_sid
(uuid)、
date_created
(string)、
date_updated
(string)、
end_conference_on_exit
(boolean)、
hold
(boolean)、
muted
(boolean)、
status
(enum: connecting, connected, completed)、
uri
(string)

Update a conference participant

更新会议参与者信息

Updates a conference participant
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantUpdateParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantUpdateResponse;

ParticipantUpdateParams params = ParticipantUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .callSidOrParticipantLabel("participant-1")
    .build();
ParticipantUpdateResponse participant = client.texml().accounts().conferences().participants().update(params);
Returns:
account_sid
(string),
api_version
(string),
call_sid
(string),
call_sid_legacy
(string),
coaching
(boolean),
coaching_call_sid
(string),
coaching_call_sid_legacy
(string),
conference_sid
(uuid),
date_created
(string),
date_updated
(string),
end_conference_on_exit
(boolean),
hold
(boolean),
muted
(boolean),
status
(enum: connecting, connected, completed),
uri
(string)
更新指定的会议参与者信息。
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantUpdateParams;
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantUpdateResponse;

ParticipantUpdateParams params = ParticipantUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .callSidOrParticipantLabel("participant-1")
    .build();
ParticipantUpdateResponse participant = client.texml().accounts().conferences().participants().update(params);
返回参数:
account_sid
(string)、
api_version
(string)、
call_sid
(string)、
call_sid_legacy
(string)、
coaching
(boolean)、
coaching_call_sid
(string)、
coaching_call_sid_legacy
(string)、
conference_sid
(uuid)、
date_created
(string)、
date_updated
(string)、
end_conference_on_exit
(boolean)、
hold
(boolean)、
muted
(boolean)、
status
(enum: connecting, connected, completed)、
uri
(string)

Delete a conference participant

移除会议参与者

Deletes a conference participant
DELETE /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantDeleteParams;

ParticipantDeleteParams params = ParticipantDeleteParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .callSidOrParticipantLabel("participant-1")
    .build();
client.texml().accounts().conferences().participants().delete(params);
将指定参与者移出会议。
DELETE /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}
java
import com.telnyx.sdk.models.texml.accounts.conferences.participants.ParticipantDeleteParams;

ParticipantDeleteParams params = ParticipantDeleteParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .callSidOrParticipantLabel("participant-1")
    .build();
client.texml().accounts().conferences().participants().delete(params);

List conference recordings

获取会议录音列表

Lists conference recordings
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsResponse;

ConferenceRetrieveRecordingsParams params = ConferenceRetrieveRecordingsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceRetrieveRecordingsResponse response = client.texml().accounts().conferences().retrieveRecordings(params);
Returns:
end
(integer),
first_page_uri
(string),
next_page_uri
(string),
page
(integer),
page_size
(integer),
participants
(array[object]),
recordings
(array[object]),
start
(integer),
uri
(string)
返回会议录音列表。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsResponse;

ConferenceRetrieveRecordingsParams params = ConferenceRetrieveRecordingsParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceRetrieveRecordingsResponse response = client.texml().accounts().conferences().retrieveRecordings(params);
返回参数:
end
(integer)、
first_page_uri
(string)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
participants
(array[object])、
recordings
(array[object])、
start
(integer)、
uri
(string)

Fetch recordings for a conference

获取会议录音资源

Returns recordings for a conference identified by conference_sid.
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsJsonResponse;

ConferenceRetrieveRecordingsJsonParams params = ConferenceRetrieveRecordingsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceRetrieveRecordingsJsonResponse response = client.texml().accounts().conferences().retrieveRecordingsJson(params);
Returns:
end
(integer),
first_page_uri
(uri),
next_page_uri
(string),
page
(integer),
page_size
(integer),
previous_page_uri
(uri),
recordings
(array[object]),
start
(integer),
uri
(string)
返回conference_sid对应会议的录音资源。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.conferences.ConferenceRetrieveRecordingsJsonResponse;

ConferenceRetrieveRecordingsJsonParams params = ConferenceRetrieveRecordingsJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .conferenceSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
ConferenceRetrieveRecordingsJsonResponse response = client.texml().accounts().conferences().retrieveRecordingsJson(params);
返回参数:
end
(integer)、
first_page_uri
(uri)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
previous_page_uri
(uri)、
recordings
(array[object])、
start
(integer)、
uri
(string)

List queue resources

获取队列资源列表

Lists queue resources.
GET /texml/Accounts/{account_sid}/Queues
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueListPage;
import com.telnyx.sdk.models.texml.accounts.queues.QueueListParams;

QueueListPage page = client.texml().accounts().queues().list("550e8400-e29b-41d4-a716-446655440000");
Returns:
end
(integer),
first_page_uri
(string),
next_page_uri
(string),
page
(integer),
page_size
(integer),
queues
(array[object]),
start
(integer),
uri
(string)
返回队列资源列表。
GET /texml/Accounts/{account_sid}/Queues
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueListPage;
import com.telnyx.sdk.models.texml.accounts.queues.QueueListParams;

QueueListPage page = client.texml().accounts().queues().list("550e8400-e29b-41d4-a716-446655440000");
返回参数:
end
(integer)、
first_page_uri
(string)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
queues
(array[object])、
start
(integer)、
uri
(string)

Create a new queue

创建队列

Creates a new queue resource.
POST /texml/Accounts/{account_sid}/Queues
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueCreateParams;
import com.telnyx.sdk.models.texml.accounts.queues.QueueCreateResponse;

QueueCreateResponse queue = client.texml().accounts().queues().create("550e8400-e29b-41d4-a716-446655440000");
Returns:
account_sid
(string),
average_wait_time
(integer),
current_size
(integer),
date_created
(string),
date_updated
(string),
max_size
(integer),
sid
(string),
subresource_uris
(object),
uri
(string)
创建新的队列资源。
POST /texml/Accounts/{account_sid}/Queues
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueCreateParams;
import com.telnyx.sdk.models.texml.accounts.queues.QueueCreateResponse;

QueueCreateResponse queue = client.texml().accounts().queues().create("550e8400-e29b-41d4-a716-446655440000");
返回参数:
account_sid
(string)、
average_wait_time
(integer)、
current_size
(integer)、
date_created
(string)、
date_updated
(string)、
max_size
(integer)、
sid
(string)、
subresource_uris
(object)、
uri
(string)

Fetch a queue resource

获取单个队列资源

Returns a queue resource.
GET /texml/Accounts/{account_sid}/Queues/{queue_sid}
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.queues.QueueRetrieveResponse;

QueueRetrieveParams params = QueueRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .queueSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
QueueRetrieveResponse queue = client.texml().accounts().queues().retrieve(params);
Returns:
account_sid
(string),
average_wait_time
(integer),
current_size
(integer),
date_created
(string),
date_updated
(string),
max_size
(integer),
sid
(string),
subresource_uris
(object),
uri
(string)
返回指定的队列资源。
GET /texml/Accounts/{account_sid}/Queues/{queue_sid}
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueRetrieveParams;
import com.telnyx.sdk.models.texml.accounts.queues.QueueRetrieveResponse;

QueueRetrieveParams params = QueueRetrieveParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .queueSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
QueueRetrieveResponse queue = client.texml().accounts().queues().retrieve(params);
返回参数:
account_sid
(string)、
average_wait_time
(integer)、
current_size
(integer)、
date_created
(string)、
date_updated
(string)、
max_size
(integer)、
sid
(string)、
subresource_uris
(object)、
uri
(string)

Update a queue resource

更新队列资源

Updates a queue resource.
POST /texml/Accounts/{account_sid}/Queues/{queue_sid}
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueUpdateParams;
import com.telnyx.sdk.models.texml.accounts.queues.QueueUpdateResponse;

QueueUpdateParams params = QueueUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .queueSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
QueueUpdateResponse queue = client.texml().accounts().queues().update(params);
Returns:
account_sid
(string),
average_wait_time
(integer),
current_size
(integer),
date_created
(string),
date_updated
(string),
max_size
(integer),
sid
(string),
subresource_uris
(object),
uri
(string)
更新指定的队列资源。
POST /texml/Accounts/{account_sid}/Queues/{queue_sid}
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueUpdateParams;
import com.telnyx.sdk.models.texml.accounts.queues.QueueUpdateResponse;

QueueUpdateParams params = QueueUpdateParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .queueSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
QueueUpdateResponse queue = client.texml().accounts().queues().update(params);
返回参数:
account_sid
(string)、
average_wait_time
(integer)、
current_size
(integer)、
date_created
(string)、
date_updated
(string)、
max_size
(integer)、
sid
(string)、
subresource_uris
(object)、
uri
(string)

Delete a queue resource

删除队列资源

Delete a queue resource.
DELETE /texml/Accounts/{account_sid}/Queues/{queue_sid}
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueDeleteParams;

QueueDeleteParams params = QueueDeleteParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .queueSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
client.texml().accounts().queues().delete(params);
删除指定的队列资源。
DELETE /texml/Accounts/{account_sid}/Queues/{queue_sid}
java
import com.telnyx.sdk.models.texml.accounts.queues.QueueDeleteParams;

QueueDeleteParams params = QueueDeleteParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .queueSid("550e8400-e29b-41d4-a716-446655440000")
    .build();
client.texml().accounts().queues().delete(params);

Fetch multiple recording resources

获取账号下所有录音资源

Returns multiple recording resources for an account.
GET /texml/Accounts/{account_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveRecordingsJsonResponse;

AccountRetrieveRecordingsJsonResponse response = client.texml().accounts().retrieveRecordingsJson("550e8400-e29b-41d4-a716-446655440000");
Returns:
end
(integer),
first_page_uri
(uri),
next_page_uri
(string),
page
(integer),
page_size
(integer),
previous_page_uri
(uri),
recordings
(array[object]),
start
(integer),
uri
(string)
返回当前账号下的多个录音资源。
GET /texml/Accounts/{account_sid}/Recordings.json
java
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveRecordingsJsonParams;
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveRecordingsJsonResponse;

AccountRetrieveRecordingsJsonResponse response = client.texml().accounts().retrieveRecordingsJson("550e8400-e29b-41d4-a716-446655440000");
返回参数:
end
(integer)、
first_page_uri
(uri)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
previous_page_uri
(uri)、
recordings
(array[object])、
start
(integer)、
uri
(string)

Fetch recording resource

获取单个录音资源

Returns recording resource identified by recording id.
GET /texml/Accounts/{account_sid}/Recordings/{recording_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.TexmlGetCallRecordingResponseBody;
import com.telnyx.sdk.models.texml.accounts.recordings.json.JsonRetrieveRecordingSidJsonParams;

JsonRetrieveRecordingSidJsonParams params = JsonRetrieveRecordingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
TexmlGetCallRecordingResponseBody texmlGetCallRecordingResponseBody = client.texml().accounts().recordings().json().retrieveRecordingSidJson(params);
Returns:
account_sid
(string),
call_sid
(string),
channels
(enum: 1, 2),
conference_sid
(uuid),
date_created
(date-time),
date_updated
(date-time),
duration
(string | null),
error_code
(string | null),
media_url
(uri),
sid
(string),
source
(enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking),
start_time
(date-time),
status
(enum: in-progress, completed, paused, stopped),
subresources_uris
(object),
uri
(string)
返回指定ID对应的录音资源。
GET /texml/Accounts/{account_sid}/Recordings/{recording_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.TexmlGetCallRecordingResponseBody;
import com.telnyx.sdk.models.texml.accounts.recordings.json.JsonRetrieveRecordingSidJsonParams;

JsonRetrieveRecordingSidJsonParams params = JsonRetrieveRecordingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
TexmlGetCallRecordingResponseBody texmlGetCallRecordingResponseBody = client.texml().accounts().recordings().json().retrieveRecordingSidJson(params);
返回参数:
account_sid
(string)、
call_sid
(string)、
channels
(enum: 1, 2)、
conference_sid
(uuid)、
date_created
(date-time)、
date_updated
(date-time)、
duration
(string | null)、
error_code
(string | null)、
media_url
(uri)、
sid
(string)、
source
(enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking)、
start_time
(date-time)、
status
(enum: in-progress, completed, paused, stopped)、
subresources_uris
(object)、
uri
(string)

Delete recording resource

删除录音资源

Deletes recording resource identified by recording id.
DELETE /texml/Accounts/{account_sid}/Recordings/{recording_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.recordings.json.JsonDeleteRecordingSidJsonParams;

JsonDeleteRecordingSidJsonParams params = JsonDeleteRecordingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
client.texml().accounts().recordings().json().deleteRecordingSidJson(params);
删除指定ID对应的录音资源。
DELETE /texml/Accounts/{account_sid}/Recordings/{recording_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.recordings.json.JsonDeleteRecordingSidJsonParams;

JsonDeleteRecordingSidJsonParams params = JsonDeleteRecordingSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
client.texml().accounts().recordings().json().deleteRecordingSidJson(params);

List recording transcriptions

获取录音转写列表

Returns multiple recording transcription resources for an account.
GET /texml/Accounts/{account_sid}/Transcriptions.json
java
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveTranscriptionsJsonParams;
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveTranscriptionsJsonResponse;

AccountRetrieveTranscriptionsJsonResponse response = client.texml().accounts().retrieveTranscriptionsJson("550e8400-e29b-41d4-a716-446655440000");
Returns:
end
(integer),
first_page_uri
(uri),
next_page_uri
(string),
page
(integer),
page_size
(integer),
previous_page_uri
(uri),
start
(integer),
transcriptions
(array[object]),
uri
(string)
返回当前账号下的多个录音转写资源。
GET /texml/Accounts/{account_sid}/Transcriptions.json
java
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveTranscriptionsJsonParams;
import com.telnyx.sdk.models.texml.accounts.AccountRetrieveTranscriptionsJsonResponse;

AccountRetrieveTranscriptionsJsonResponse response = client.texml().accounts().retrieveTranscriptionsJson("550e8400-e29b-41d4-a716-446655440000");
返回参数:
end
(integer)、
first_page_uri
(uri)、
next_page_uri
(string)、
page
(integer)、
page_size
(integer)、
previous_page_uri
(uri)、
start
(integer)、
transcriptions
(array[object])、
uri
(string)

Fetch a recording transcription resource

获取单个录音转写资源

Returns the recording transcription resource identified by its ID.
GET /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.transcriptions.json.JsonRetrieveRecordingTranscriptionSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.transcriptions.json.JsonRetrieveRecordingTranscriptionSidJsonResponse;

JsonRetrieveRecordingTranscriptionSidJsonParams params = JsonRetrieveRecordingTranscriptionSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingTranscriptionSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
JsonRetrieveRecordingTranscriptionSidJsonResponse response = client.texml().accounts().transcriptions().json().retrieveRecordingTranscriptionSidJson(params);
Returns:
account_sid
(string),
api_version
(string),
call_sid
(string),
date_created
(date-time),
date_updated
(date-time),
duration
(string | null),
recording_sid
(string),
sid
(string),
status
(enum: in-progress, completed),
transcription_text
(string),
uri
(string)
返回指定ID对应的录音转写资源。
GET /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.transcriptions.json.JsonRetrieveRecordingTranscriptionSidJsonParams;
import com.telnyx.sdk.models.texml.accounts.transcriptions.json.JsonRetrieveRecordingTranscriptionSidJsonResponse;

JsonRetrieveRecordingTranscriptionSidJsonParams params = JsonRetrieveRecordingTranscriptionSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingTranscriptionSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
JsonRetrieveRecordingTranscriptionSidJsonResponse response = client.texml().accounts().transcriptions().json().retrieveRecordingTranscriptionSidJson(params);
返回参数:
account_sid
(string)、
api_version
(string)、
call_sid
(string)、
date_created
(date-time)、
date_updated
(date-time)、
duration
(string | null)、
recording_sid
(string)、
sid
(string)、
status
(enum: in-progress, completed)、
transcription_text
(string)、
uri
(string)

Delete a recording transcription

删除录音转写

Permanently deletes a recording transcription.
DELETE /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.transcriptions.json.JsonDeleteRecordingTranscriptionSidJsonParams;

JsonDeleteRecordingTranscriptionSidJsonParams params = JsonDeleteRecordingTranscriptionSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingTranscriptionSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
client.texml().accounts().transcriptions().json().deleteRecordingTranscriptionSidJson(params);
永久删除指定的录音转写资源。
DELETE /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.json
java
import com.telnyx.sdk.models.texml.accounts.transcriptions.json.JsonDeleteRecordingTranscriptionSidJsonParams;

JsonDeleteRecordingTranscriptionSidJsonParams params = JsonDeleteRecordingTranscriptionSidJsonParams.builder()
    .accountSid("550e8400-e29b-41d4-a716-446655440000")
    .recordingTranscriptionSid("6a09cdc3-8948-47f0-aa62-74ac943d6c58")
    .build();
client.texml().accounts().transcriptions().json().deleteRecordingTranscriptionSidJson(params);

Create a TeXML secret

创建TeXML密钥

Create a TeXML secret which can be later used as a Dynamic Parameter for TeXML when using Mustache Templates in your TeXML. In your TeXML you will be able to use your secret name, and this name will be replaced by the actual secret value when processing the TeXML on Telnyx side. The secrets are not visible in any logs.
POST /texml/secrets
— Required:
name
,
value
java
import com.telnyx.sdk.models.texml.TexmlSecretsParams;
import com.telnyx.sdk.models.texml.TexmlSecretsResponse;

TexmlSecretsParams params = TexmlSecretsParams.builder()
    .name("My Secret Name")
    .value("My Secret Value")
    .build();
TexmlSecretsResponse response = client.texml().secrets(params);
Returns:
name
(string),
value
(enum: REDACTED)
创建TeXML密钥,后续在TeXML中使用Mustache模板时可将其作为动态参数使用。在TeXML中使用密钥名称即可,Telnyx处理TeXML时会自动将名称替换为实际的密钥值,密钥不会出现在任何日志中。
POST /texml/secrets
— 必填参数:
name
value
java
import com.telnyx.sdk.models.texml.TexmlSecretsParams;
import com.telnyx.sdk.models.texml.TexmlSecretsResponse;

TexmlSecretsParams params = TexmlSecretsParams.builder()
    .name("My Secret Name")
    .value("My Secret Value")
    .build();
TexmlSecretsResponse response = client.texml().secrets(params);
返回参数:
name
(string)、
value
(enum: REDACTED)

List all TeXML Applications

获取所有TeXML应用列表

Returns a list of your TeXML Applications.
GET /texml_applications
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationListPage;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationListParams;

TexmlApplicationListPage page = client.texmlApplications().list();
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
call_cost_in_webhooks
(boolean),
created_at
(string),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
first_command_timeout
(boolean),
first_command_timeout_secs
(integer),
friendly_name
(string),
id
(string),
inbound
(object),
outbound
(object),
record_type
(string),
status_callback
(uri),
status_callback_method
(enum: get, post),
tags
(array[string]),
updated_at
(string),
voice_fallback_url
(uri),
voice_method
(enum: get, post),
voice_url
(uri)
返回你的TeXML应用列表。
GET /texml_applications
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationListPage;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationListParams;

TexmlApplicationListPage page = client.texmlApplications().list();
返回参数:
active
(boolean)、
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany)、
call_cost_in_webhooks
(boolean)、
created_at
(string)、
dtmf_type
(enum: RFC 2833, Inband, SIP INFO)、
first_command_timeout
(boolean)、
first_command_timeout_secs
(integer)、
friendly_name
(string)、
id
(string)、
inbound
(object)、
outbound
(object)、
record_type
(string)、
status_callback
(uri)、
status_callback_method
(enum: get, post)、
tags
(array[string])、
updated_at
(string)、
voice_fallback_url
(uri)、
voice_method
(enum: get, post)、
voice_url
(uri)

Creates a TeXML Application

创建TeXML应用

Creates a TeXML Application.
POST /texml_applications
— Required:
friendly_name
,
voice_url
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
call_cost_in_webhooks
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
first_command_timeout
(boolean),
first_command_timeout_secs
(integer),
inbound
(object),
outbound
(object),
status_callback
(uri),
status_callback_method
(enum: get, post),
tags
(array[string]),
voice_fallback_url
(uri),
voice_method
(enum: get, post)
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationCreateParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationCreateResponse;

TexmlApplicationCreateParams params = TexmlApplicationCreateParams.builder()
    .friendlyName("call-router")
    .voiceUrl("https://example.com")
    .build();
TexmlApplicationCreateResponse texmlApplication = client.texmlApplications().create(params);
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
call_cost_in_webhooks
(boolean),
created_at
(string),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
first_command_timeout
(boolean),
first_command_timeout_secs
(integer),
friendly_name
(string),
id
(string),
inbound
(object),
outbound
(object),
record_type
(string),
status_callback
(uri),
status_callback_method
(enum: get, post),
tags
(array[string]),
updated_at
(string),
voice_fallback_url
(uri),
voice_method
(enum: get, post),
voice_url
(uri)
创建一个新的TeXML应用。
POST /texml_applications
— 必填参数:
friendly_name
voice_url
可选参数:
active
(boolean)、
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany)、
call_cost_in_webhooks
(boolean)、
dtmf_type
(enum: RFC 2833, Inband, SIP INFO)、
first_command_timeout
(boolean)、
first_command_timeout_secs
(integer)、
inbound
(object)、
outbound
(object)、
status_callback
(uri)、
status_callback_method
(enum: get, post)、
tags
(array[string])、
voice_fallback_url
(uri)、
voice_method
(enum: get, post)
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationCreateParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationCreateResponse;

TexmlApplicationCreateParams params = TexmlApplicationCreateParams.builder()
    .friendlyName("call-router")
    .voiceUrl("https://example.com")
    .build();
TexmlApplicationCreateResponse texmlApplication = client.texmlApplications().create(params);
返回参数:
active
(boolean)、
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany)、
call_cost_in_webhooks
(boolean)、
created_at
(string)、
dtmf_type
(enum: RFC 2833, Inband, SIP INFO)、
first_command_timeout
(boolean)、
first_command_timeout_secs
(integer)、
friendly_name
(string)、
id
(string)、
inbound
(object)、
outbound
(object)、
record_type
(string)、
status_callback
(uri)、
status_callback_method
(enum: get, post)、
tags
(array[string])、
updated_at
(string)、
voice_fallback_url
(uri)、
voice_method
(enum: get, post)、
voice_url
(uri)

Retrieve a TeXML Application

获取单个TeXML应用信息

Retrieves the details of an existing TeXML Application.
GET /texml_applications/{id}
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationRetrieveParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationRetrieveResponse;

TexmlApplicationRetrieveResponse texmlApplication = client.texmlApplications().retrieve("1293384261075731499");
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
call_cost_in_webhooks
(boolean),
created_at
(string),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
first_command_timeout
(boolean),
first_command_timeout_secs
(integer),
friendly_name
(string),
id
(string),
inbound
(object),
outbound
(object),
record_type
(string),
status_callback
(uri),
status_callback_method
(enum: get, post),
tags
(array[string]),
updated_at
(string),
voice_fallback_url
(uri),
voice_method
(enum: get, post),
voice_url
(uri)
返回现有TeXML应用的详细信息。
GET /texml_applications/{id}
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationRetrieveParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationRetrieveResponse;

TexmlApplicationRetrieveResponse texmlApplication = client.texmlApplications().retrieve("1293384261075731499");
返回参数:
active
(boolean)、
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany)、
call_cost_in_webhooks
(boolean)、
created_at
(string)、
dtmf_type
(enum: RFC 2833, Inband, SIP INFO)、
first_command_timeout
(boolean)、
first_command_timeout_secs
(integer)、
friendly_name
(string)、
id
(string)、
inbound
(object)、
outbound
(object)、
record_type
(string)、
status_callback
(uri)、
status_callback_method
(enum: get, post)、
tags
(array[string])、
updated_at
(string)、
voice_fallback_url
(uri)、
voice_method
(enum: get, post)、
voice_url
(uri)

Update a TeXML Application

更新TeXML应用

Updates settings of an existing TeXML Application.
PATCH /texml_applications/{id}
— Required:
friendly_name
,
voice_url
Optional:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
call_cost_in_webhooks
(boolean),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
first_command_timeout
(boolean),
first_command_timeout_secs
(integer),
inbound
(object),
outbound
(object),
status_callback
(uri),
status_callback_method
(enum: get, post),
tags
(array[string]),
voice_fallback_url
(uri),
voice_method
(enum: get, post)
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationUpdateParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationUpdateResponse;

TexmlApplicationUpdateParams params = TexmlApplicationUpdateParams.builder()
    .id("1293384261075731499")
    .friendlyName("call-router")
    .voiceUrl("https://example.com")
    .build();
TexmlApplicationUpdateResponse texmlApplication = client.texmlApplications().update(params);
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
call_cost_in_webhooks
(boolean),
created_at
(string),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
first_command_timeout
(boolean),
first_command_timeout_secs
(integer),
friendly_name
(string),
id
(string),
inbound
(object),
outbound
(object),
record_type
(string),
status_callback
(uri),
status_callback_method
(enum: get, post),
tags
(array[string]),
updated_at
(string),
voice_fallback_url
(uri),
voice_method
(enum: get, post),
voice_url
(uri)
更新现有TeXML应用的配置。
PATCH /texml_applications/{id}
— 必填参数:
friendly_name
voice_url
可选参数:
active
(boolean)、
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany)、
call_cost_in_webhooks
(boolean)、
dtmf_type
(enum: RFC 2833, Inband, SIP INFO)、
first_command_timeout
(boolean)、
first_command_timeout_secs
(integer)、
inbound
(object)、
outbound
(object)、
status_callback
(uri)、
status_callback_method
(enum: get, post)、
tags
(array[string])、
voice_fallback_url
(uri)、
voice_method
(enum: get, post)
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationUpdateParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationUpdateResponse;

TexmlApplicationUpdateParams params = TexmlApplicationUpdateParams.builder()
    .id("1293384261075731499")
    .friendlyName("call-router")
    .voiceUrl("https://example.com")
    .build();
TexmlApplicationUpdateResponse texmlApplication = client.texmlApplications().update(params);
返回参数:
active
(boolean)、
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany)、
call_cost_in_webhooks
(boolean)、
created_at
(string)、
dtmf_type
(enum: RFC 2833, Inband, SIP INFO)、
first_command_timeout
(boolean)、
first_command_timeout_secs
(integer)、
friendly_name
(string)、
id
(string)、
inbound
(object)、
outbound
(object)、
record_type
(string)、
status_callback
(uri)、
status_callback_method
(enum: get, post)、
tags
(array[string])、
updated_at
(string)、
voice_fallback_url
(uri)、
voice_method
(enum: get, post)、
voice_url
(uri)

Deletes a TeXML Application

删除TeXML应用

Deletes a TeXML Application.
DELETE /texml_applications/{id}
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationDeleteParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationDeleteResponse;

TexmlApplicationDeleteResponse texmlApplication = client.texmlApplications().delete("1293384261075731499");
Returns:
active
(boolean),
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany),
call_cost_in_webhooks
(boolean),
created_at
(string),
dtmf_type
(enum: RFC 2833, Inband, SIP INFO),
first_command_timeout
(boolean),
first_command_timeout_secs
(integer),
friendly_name
(string),
id
(string),
inbound
(object),
outbound
(object),
record_type
(string),
status_callback
(uri),
status_callback_method
(enum: get, post),
tags
(array[string]),
updated_at
(string),
voice_fallback_url
(uri),
voice_method
(enum: get, post),
voice_url
(uri)
删除指定的TeXML应用。
DELETE /texml_applications/{id}
java
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationDeleteParams;
import com.telnyx.sdk.models.texmlapplications.TexmlApplicationDeleteResponse;

TexmlApplicationDeleteResponse texmlApplication = client.texmlApplications().delete("1293384261075731499");
返回参数:
active
(boolean)、
anchorsite_override
(enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany)、
call_cost_in_webhooks
(boolean)、
created_at
(string)、
dtmf_type
(enum: RFC 2833, Inband, SIP INFO)、
first_command_timeout
(boolean)、
first_command_timeout_secs
(integer)、
friendly_name
(string)、
id
(string)、
inbound
(object)、
outbound
(object)、
record_type
(string)、
status_callback
(uri)、
status_callback_method
(enum: get, post)、
tags
(array[string])、
updated_at
(string)、
voice_fallback_url
(uri)、
voice_method
(enum: get, post)、
voice_url
(uri)