telnyx-texml-ruby
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- 由Telnyx OpenAPI规范自动生成,请勿编辑。 -->
Telnyx Texml - Ruby
Telnyx Texml - Ruby
Installation
安装
bash
gem install telnyxbash
gem install telnyxSetup
配置
ruby
require "telnyx"
client = Telnyx::Client.new(
api_key: ENV["TELNYX_API_KEY"], # This is the default and can be omitted
)All examples below assume is already initialized as shown above.
clientruby
require "telnyx"
client = Telnyx::Client.new(
api_key: ENV["TELNYX_API_KEY"], # 这是默认配置,可以省略
)以下所有示例均假设已按照上述方式完成初始化。
clientError Handling
错误处理
All API calls can fail with network errors, rate limits (429), validation errors (422),
or authentication errors (401). Always handle errors in production code:
ruby
begin
result = client.messages.send_(to: "+13125550001", from: "+13125550002", text: "Hello")
rescue Telnyx::Errors::APIConnectionError
puts "Network error — check connectivity and retry"
rescue Telnyx::Errors::RateLimitError
# 429: rate limited — wait and retry with exponential backoff
sleep(1) # Check Retry-After header for actual delay
rescue Telnyx::Errors::APIStatusError => e
puts "API error #{e.status}: #{e.message}"
if e.status == 422
puts "Validation error — check required fields and formats"
end
endCommon error codes: invalid API key, insufficient permissions,
resource not found, validation error (check field formats),
rate limited (retry with exponential backoff).
401403404422429所有API调用都可能出现网络错误、速率限制(429)、校验错误(422)或身份验证错误(401),生产环境代码中请务必做好错误处理:
ruby
begin
result = client.messages.send_(to: "+13125550001", from: "+13125550002", text: "Hello")
rescue Telnyx::Errors::APIConnectionError
puts "网络错误——检查网络连接后重试"
rescue Telnyx::Errors::RateLimitError
# 429:触发速率限制——等待后采用指数退避策略重试
sleep(1) # 可查看Retry-After响应头获取具体的延迟时长
rescue Telnyx::Errors::APIStatusError => e
puts "API错误 #{e.status}: #{e.message}"
if e.status == 422
puts "校验错误——检查必填字段和格式是否正确"
end
end常见错误码: API密钥无效、 权限不足、 资源不存在、 校验错误(检查字段格式)、 触发速率限制(采用指数退避策略重试)。
401403404422429Important Notes
重要注意事项
- Pagination: Use for automatic iteration:
.auto_paging_each.page.auto_paging_each { |item| puts item.id }
- 分页: 使用实现自动遍历:
.auto_paging_each。page.auto_paging_each { |item| puts item.id }
Fetch multiple call resources
获取多个通话资源
Returns multiple call resources for an account. This endpoint is eventually consistent.
GET /texml/Accounts/{account_sid}/Callsruby
response = client.texml.accounts.calls.retrieve_calls("account_sid")
puts(response)Returns: (array[object]), (integer), (string), (string), (integer), (integer), (integer), (string)
callsendfirst_page_urinext_page_uripagepage_sizestarturi返回账号下的多个通话资源,该接口为最终一致性。
GET /texml/Accounts/{account_sid}/Callsruby
response = client.texml.accounts.calls.retrieve_calls("account_sid")
puts(response)返回参数:(对象数组)、(整数)、(字符串)、(字符串)、(整数)、(整数)、(整数)、(字符串)
callsendfirst_page_urinext_page_uripagepage_sizestarturiInitiate 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}/CallsToFromApplicationSidOptional: (boolean), (string), (enum: GET, POST), (string), (boolean), (boolean), (array[object]), (enum: Premium, Regular), (string), (enum: Enable, Disable, DetectMessageEnd), (integer), (integer), (integer), (integer), (string), (boolean), (enum: mono, dual), (string), (string), (enum: GET, POST), (integer), (enum: inbound, outbound, both), (boolean), (string), (string), (enum: US, Europe, Canada, Australia, Middle East), (string), (enum: initiated, ringing, answered, completed), (enum: GET, POST), (string), (enum: barge, whisper, monitor), (string), (integer), (integer), (enum: trim-silence, do-not-trim), (string), (enum: GET, POST)
AsyncAmdAsyncAmdStatusCallbackAsyncAmdStatusCallbackMethodCallerIdCancelPlaybackOnDetectMessageEndCancelPlaybackOnMachineDetectionCustomHeadersDetectionModeFallbackUrlMachineDetectionMachineDetectionSilenceTimeoutMachineDetectionSpeechEndThresholdMachineDetectionSpeechThresholdMachineDetectionTimeoutPreferredCodecsRecordRecordingChannelsRecordingStatusCallbackRecordingStatusCallbackEventRecordingStatusCallbackMethodRecordingTimeoutRecordingTrackSendRecordingUrlSipAuthPasswordSipAuthUsernameSipRegionStatusCallbackStatusCallbackEventStatusCallbackMethodSuperviseCallSidSupervisingRoleTexmlTimeLimitTimeoutTrimUrlUrlMethodruby
response = client.texml.accounts.calls.calls(
"account_sid",
application_sid: "example-app-sid",
from: "+13120001234",
to: "+13121230000"
)
puts(response)Returns: (string), (string), (string)
fromstatusto发起TeXML外呼,Telnyx会从Mission Control控制台中为连接配置的XML请求URL获取TeXML内容。
POST /texml/Accounts/{account_sid}/CallsToFromApplicationSid可选参数:(布尔值)、(字符串)、(枚举值:GET、POST)、(字符串)、(布尔值)、(布尔值)、(对象数组)、(枚举值:Premium、Regular)、(字符串)、(枚举值:Enable、Disable、DetectMessageEnd)、(整数)、(整数)、(整数)、(整数)、(字符串)、(布尔值)、(枚举值:mono、dual)、(字符串)、(字符串)、(枚举值:GET、POST)、(整数)、(枚举值:inbound、outbound、both)、(布尔值)、(字符串)、(字符串)、(枚举值:US、Europe、Canada、Australia、Middle East)、(字符串)、(枚举值:initiated、ringing、answered、completed)、(枚举值:GET、POST)、(字符串)、(枚举值:barge、whisper、monitor)、(字符串)、(整数)、(整数)、(枚举值:trim-silence、do-not-trim)、(字符串)、(枚举值:GET、POST)
AsyncAmdAsyncAmdStatusCallbackAsyncAmdStatusCallbackMethodCallerIdCancelPlaybackOnDetectMessageEndCancelPlaybackOnMachineDetectionCustomHeadersDetectionModeFallbackUrlMachineDetectionMachineDetectionSilenceTimeoutMachineDetectionSpeechEndThresholdMachineDetectionSpeechThresholdMachineDetectionTimeoutPreferredCodecsRecordRecordingChannelsRecordingStatusCallbackRecordingStatusCallbackEventRecordingStatusCallbackMethodRecordingTimeoutRecordingTrackSendRecordingUrlSipAuthPasswordSipAuthUsernameSipRegionStatusCallbackStatusCallbackEventStatusCallbackMethodSuperviseCallSidSupervisingRoleTexmlTimeLimitTimeoutTrimUrlUrlMethodruby
response = client.texml.accounts.calls.calls(
"account_sid",
application_sid: "example-app-sid",
from: "+13120001234",
to: "+13121230000"
)
puts(response)返回参数:(字符串)、(字符串)、(字符串)
fromstatustoFetch a call
获取单条通话信息
Returns an individual call identified by its CallSid. This endpoint is eventually consistent.
GET /texml/Accounts/{account_sid}/Calls/{call_sid}ruby
call = client.texml.accounts.calls.retrieve("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(call)Returns: (string), (enum: human, machine, not_sure), (string), (string), (string), (enum: inbound, outbound), (string), (string), (string), (string), (string), (string), (string), (string), (enum: ringing, in-progress, canceled, completed, failed, busy, no-answer), (string), (string), (string)
account_sidanswered_bycaller_namedate_createddate_updateddirectiondurationend_timefromfrom_formattedpriceprice_unitsidstart_timestatustoto_formatteduri返回CallSid对应的单条通话信息,该接口为最终一致性。
GET /texml/Accounts/{account_sid}/Calls/{call_sid}ruby
call = client.texml.accounts.calls.retrieve("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(call)返回参数:(字符串)、(枚举值:human、machine、not_sure)、(字符串)、(字符串)、(字符串)、(枚举值:inbound、outbound)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(枚举值:ringing、in-progress、canceled、completed、failed、busy、no-answer)、(字符串)、(字符串)、(字符串)
account_sidanswered_bycaller_namedate_createddate_updateddirectiondurationend_timefromfrom_formattedpriceprice_unitsidstart_timestatustoto_formatteduriUpdate 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}ruby
call = client.texml.accounts.calls.update("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(call)Returns: (string), (enum: human, machine, not_sure), (string), (string), (string), (enum: inbound, outbound), (string), (string), (string), (string), (string), (string), (string), (string), (enum: ringing, in-progress, canceled, completed, failed, busy, no-answer), (string), (string), (string)
account_sidanswered_bycaller_namedate_createddate_updateddirectiondurationend_timefromfrom_formattedpriceprice_unitsidstart_timestatustoto_formatteduri更新TeXML通话信息,请注意请求体中的键必须按照示例所示采用驼峰命名格式。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}ruby
call = client.texml.accounts.calls.update("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(call)返回参数:(字符串)、(枚举值:human、machine、not_sure)、(字符串)、(字符串)、(字符串)、(枚举值:inbound、outbound)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(枚举值:ringing、in-progress、canceled、completed、failed、busy、no-answer)、(字符串)、(字符串)、(字符串)
account_sidanswered_bycaller_namedate_createddate_updateddirectiondurationend_timefromfrom_formattedpriceprice_unitsidstart_timestatustoto_formatteduriFetch recordings for a call
获取通话录音列表
Returns recordings for a call identified by call_sid.
GET /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.jsonruby
response = client.texml.accounts.calls.recordings_json.retrieve_recordings_json(
"call_sid",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)Returns: (integer), (uri), (string), (integer), (integer), (uri), (array[object]), (integer), (string)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_urirecordingsstarturi返回CallSid对应通话的录音列表。
GET /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.jsonruby
response = client.texml.accounts.calls.recordings_json.retrieve_recordings_json(
"call_sid",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)返回参数:(整数)、(uri)、(字符串)、(整数)、(整数)、(uri)、(对象数组)、(整数)、(字符串)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_urirecordingsstarturiRequest recording for a call
发起通话录音
Starts recording with specified parameters for call identified by call_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.jsonruby
response = client.texml.accounts.calls.recordings_json.recordings_json("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)Returns: (string), (string), (enum: 1, 2), (uuid), (date-time), (date-time), (string | null), (string | null), (string | null), (string | null), (string), (enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking), (date-time), (enum: inbound, outbound, both), (string)
account_sidcall_sidchannelsconference_siddate_createddate_updateddurationerror_codepriceprice_unitsidsourcestart_timetrackuri为指定CallSid的通话按照配置参数启动录音。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings.jsonruby
response = client.texml.accounts.calls.recordings_json.recordings_json("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)返回参数:(字符串)、(字符串)、(枚举值:1、2)、(uuid)、(日期时间)、(日期时间)、(字符串 | 空)、(字符串 | 空)、(字符串 | 空)、(字符串 | 空)、(字符串)、(枚举值:StartCallRecordingAPI、StartConferenceRecordingAPI、OutboundAPI、DialVerb、Conference、RecordVerb、Trunking)、(日期时间)、(枚举值:inbound、outbound、both)、(字符串)
account_sidcall_sidchannelsconference_siddate_createddate_updateddurationerror_codepriceprice_unitsidsourcestart_timetrackuriUpdate recording on a call
更新通话录音
Updates recording resource for particular call.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.jsonruby
response = client.texml.accounts.calls.recordings.recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
call_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)Returns: (string), (string), (enum: 1, 2), (uuid), (date-time), (date-time), (string | null), (string | null), (string | null), (string | null), (string), (enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking), (date-time), (enum: inbound, outbound, both), (string)
account_sidcall_sidchannelsconference_siddate_createddate_updateddurationerror_codepriceprice_unitsidsourcestart_timetrackuri更新指定通话的录音资源。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Recordings/{recording_sid}.jsonruby
response = client.texml.accounts.calls.recordings.recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
call_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)返回参数:(字符串)、(字符串)、(枚举值:1、2)、(uuid)、(日期时间)、(日期时间)、(字符串 | 空)、(字符串 | 空)、(字符串 | 空)、(字符串 | 空)、(字符串)、(枚举值:StartCallRecordingAPI、StartConferenceRecordingAPI、OutboundAPI、DialVerb、Conference、RecordVerb、Trunking)、(日期时间)、(枚举值:inbound、outbound、both)、(字符串)
account_sidcall_sidchannelsconference_siddate_createddate_updateddurationerror_codepriceprice_unitsidsourcestart_timetrackuriRequest 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.jsonruby
response = client.texml.accounts.calls.siprec_json("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)Returns: (string), (string), (string), (string), (string), (string), (string), (enum: in-progress, stopped), (enum: both_tracks, inbound_track, outbound_track), (string)
account_sidcall_siddate_createddate_updatederror_codesidstart_timestatustrackuri为指定CallSid的通话按照配置参数启动siprec会话。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec.jsonruby
response = client.texml.accounts.calls.siprec_json("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)返回参数:(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(枚举值:in-progress、stopped)、(枚举值:both_tracks、inbound_track、outbound_track)、(字符串)
account_sidcall_siddate_createddate_updatederror_codesidstart_timestatustrackuriUpdates siprec session for a call
更新通话siprec会话
Updates siprec session identified by siprec_sid.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec/{siprec_sid}.jsonruby
response = client.texml.accounts.calls.siprec.siprec_sid_json(
"siprec_sid",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
call_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)Returns: (string), (string), (string), (string), (string), (enum: in-progress, stopped), (string)
account_sidcall_siddate_updatederror_codesidstatusuri更新siprec_sid对应的siprec会话。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Siprec/{siprec_sid}.jsonruby
response = client.texml.accounts.calls.siprec.siprec_sid_json(
"siprec_sid",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
call_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)返回参数:(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(枚举值:in-progress、stopped)、(字符串)
account_sidcall_siddate_updatederror_codesidstatusuriStart 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.jsonruby
response = client.texml.accounts.calls.streams_json("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)Returns: (string), (string), (date-time), (string), (string), (enum: in-progress), (string)
account_sidcall_siddate_updatednamesidstatusuri将通话的媒体流推送到指定的WebSocket地址。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams.jsonruby
response = client.texml.accounts.calls.streams_json("call_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)返回参数:(字符串)、(字符串)、(日期时间)、(字符串)、(字符串)、(枚举值:in-progress)、(字符串)
account_sidcall_siddate_updatednamesidstatusuriUpdate streaming on a call
更新通话媒体流
Updates streaming resource for particular call.
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams/{streaming_sid}.jsonruby
response = client.texml.accounts.calls.streams.streaming_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
call_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)Returns: (string), (string), (date-time), (string), (enum: stopped), (string)
account_sidcall_siddate_updatedsidstatusuri更新指定通话的媒体流资源。
POST /texml/Accounts/{account_sid}/Calls/{call_sid}/Streams/{streaming_sid}.jsonruby
response = client.texml.accounts.calls.streams.streaming_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
call_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)返回参数:(字符串)、(字符串)、(日期时间)、(字符串)、(枚举值:stopped)、(字符串)
account_sidcall_siddate_updatedsidstatusuriList conference resources
获取会议资源列表
Lists conference resources.
GET /texml/Accounts/{account_sid}/Conferencesruby
response = client.texml.accounts.conferences.retrieve_conferences("account_sid")
puts(response)Returns: (array[object]), (integer), (string), (string), (integer), (integer), (integer), (string)
conferencesendfirst_page_urinext_page_uripagepage_sizestarturi返回会议资源列表。
GET /texml/Accounts/{account_sid}/Conferencesruby
response = client.texml.accounts.conferences.retrieve_conferences("account_sid")
puts(response)返回参数:(对象数组)、(整数)、(字符串)、(字符串)、(整数)、(整数)、(整数)、(字符串)
conferencesendfirst_page_urinext_page_uripagepage_sizestarturiFetch a conference resource
获取单条会议资源
Returns a conference resource.
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}ruby
conference = client.texml.accounts.conferences.retrieve("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(conference)Returns: (string), (string), (string), (string), (string), (string), (enum: participant-with-end-conference-on-exit-left, last-participant-left, conference-ended-via-api, time-exceeded), (string), (string), (enum: init, in-progress, completed), (object), (string)
account_sidapi_versioncall_sid_ending_conferencedate_createddate_updatedfriendly_namereason_conference_endedregionsidstatussubresource_urisuri返回指定的会议资源。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}ruby
conference = client.texml.accounts.conferences.retrieve("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(conference)返回参数:(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(枚举值:participant-with-end-conference-on-exit-left、last-participant-left、conference-ended-via-api、time-exceeded)、(字符串)、(字符串)、(枚举值:init、in-progress、completed)、(对象)、(字符串)
account_sidapi_versioncall_sid_ending_conferencedate_createddate_updatedfriendly_namereason_conference_endedregionsidstatussubresource_urisuriUpdate a conference resource
更新会议资源
Updates a conference resource.
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}ruby
conference = client.texml.accounts.conferences.update("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(conference)Returns: (string), (string), (string), (string), (string), (string), (enum: participant-with-end-conference-on-exit-left, last-participant-left, conference-ended-via-api, time-exceeded), (string), (string), (enum: init, in-progress, completed), (object), (string)
account_sidapi_versioncall_sid_ending_conferencedate_createddate_updatedfriendly_namereason_conference_endedregionsidstatussubresource_urisuri更新指定的会议资源。
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}ruby
conference = client.texml.accounts.conferences.update("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(conference)返回参数:(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(枚举值:participant-with-end-conference-on-exit-left、last-participant-left、conference-ended-via-api、time-exceeded)、(字符串)、(字符串)、(枚举值:init、in-progress、completed)、(对象)、(字符串)
account_sidapi_versioncall_sid_ending_conferencedate_createddate_updatedfriendly_namereason_conference_endedregionsidstatussubresource_urisuriList conference participants
获取会议参会者列表
Lists conference participants
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participantsruby
response = client.texml.accounts.conferences.participants.retrieve_participants(
"conference_sid",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)Returns: (integer), (string), (string), (integer), (integer), (array[object]), (integer), (string)
endfirst_page_urinext_page_uripagepage_sizeparticipantsstarturi返回会议参会者列表。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participantsruby
response = client.texml.accounts.conferences.participants.retrieve_participants(
"conference_sid",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)返回参数:(整数)、(字符串)、(字符串)、(整数)、(整数)、(对象数组)、(整数)、(字符串)
endfirst_page_urinext_page_uripagepage_sizeparticipantsstarturiDial a new conference participant
邀请新的参会者加入会议
Dials a new conference participant
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participantsruby
response = client.texml.accounts.conferences.participants.participants("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)Returns: (string), (string), (boolean), (string), (uuid), (boolean), (boolean), (boolean), (enum: connecting, connected, completed), (string)
account_sidcall_sidcoachingcoaching_call_sidconference_sidend_conference_on_exitholdmutedstatusuri拨号邀请新的参会者加入会议。
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participantsruby
response = client.texml.accounts.conferences.participants.participants("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)返回参数:(字符串)、(字符串)、(布尔值)、(字符串)、(uuid)、(布尔值)、(布尔值)、(布尔值)、(枚举值:connecting、connected、completed)、(字符串)
account_sidcall_sidcoachingcoaching_call_sidconference_sidend_conference_on_exitholdmutedstatusuriGet conference participant resource
获取会议参会者信息
Gets conference participant resource
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}ruby
participant = client.texml.accounts.conferences.participants.retrieve(
"call_sid_or_participant_label",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
conference_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(participant)Returns: (string), (string), (string), (string), (boolean), (string), (string), (uuid), (string), (string), (boolean), (boolean), (boolean), (enum: connecting, connected, completed), (string)
account_sidapi_versioncall_sidcall_sid_legacycoachingcoaching_call_sidcoaching_call_sid_legacyconference_siddate_createddate_updatedend_conference_on_exitholdmutedstatusuri返回指定的会议参会者资源。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}ruby
participant = client.texml.accounts.conferences.participants.retrieve(
"call_sid_or_participant_label",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
conference_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(participant)返回参数:(字符串)、(字符串)、(字符串)、(字符串)、(布尔值)、(字符串)、(字符串)、(uuid)、(字符串)、(字符串)、(布尔值)、(布尔值)、(布尔值)、(枚举值:connecting、connected、completed)、(字符串)
account_sidapi_versioncall_sidcall_sid_legacycoachingcoaching_call_sidcoaching_call_sid_legacyconference_siddate_createddate_updatedend_conference_on_exitholdmutedstatusuriUpdate a conference participant
更新会议参会者信息
Updates a conference participant
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}ruby
participant = client.texml.accounts.conferences.participants.update(
"call_sid_or_participant_label",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
conference_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(participant)Returns: (string), (string), (string), (string), (boolean), (string), (string), (uuid), (string), (string), (boolean), (boolean), (boolean), (enum: connecting, connected, completed), (string)
account_sidapi_versioncall_sidcall_sid_legacycoachingcoaching_call_sidcoaching_call_sid_legacyconference_siddate_createddate_updatedend_conference_on_exitholdmutedstatusuri更新指定的会议参会者信息。
POST /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}ruby
participant = client.texml.accounts.conferences.participants.update(
"call_sid_or_participant_label",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
conference_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(participant)返回参数:(字符串)、(字符串)、(字符串)、(字符串)、(布尔值)、(字符串)、(字符串)、(uuid)、(字符串)、(字符串)、(布尔值)、(布尔值)、(布尔值)、(枚举值:connecting、connected、completed)、(字符串)
account_sidapi_versioncall_sidcall_sid_legacycoachingcoaching_call_sidcoaching_call_sid_legacyconference_siddate_createddate_updatedend_conference_on_exitholdmutedstatusuriDelete a conference participant
移除会议参会者
Deletes a conference participant
DELETE /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}ruby
result = client.texml.accounts.conferences.participants.delete(
"call_sid_or_participant_label",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
conference_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(result)将指定参会者移出会议。
DELETE /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Participants/{call_sid_or_participant_label}ruby
result = client.texml.accounts.conferences.participants.delete(
"call_sid_or_participant_label",
account_sid: "550e8400-e29b-41d4-a716-446655440000",
conference_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(result)List conference recordings
获取会议录音列表
Lists conference recordings
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordingsruby
response = client.texml.accounts.conferences.retrieve_recordings("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)Returns: (integer), (string), (string), (integer), (integer), (array[object]), (array[object]), (integer), (string)
endfirst_page_urinext_page_uripagepage_sizeparticipantsrecordingsstarturi返回会议录音列表。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordingsruby
response = client.texml.accounts.conferences.retrieve_recordings("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)返回参数:(整数)、(字符串)、(字符串)、(整数)、(整数)、(对象数组)、(对象数组)、(整数)、(字符串)
endfirst_page_urinext_page_uripagepage_sizeparticipantsrecordingsstarturiFetch recordings for a conference
获取会议录音资源
Returns recordings for a conference identified by conference_sid.
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.jsonruby
response = client.texml.accounts.conferences.retrieve_recordings_json("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)Returns: (integer), (uri), (string), (integer), (integer), (uri), (array[object]), (integer), (string)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_urirecordingsstarturi返回conference_sid对应会议的录音列表。
GET /texml/Accounts/{account_sid}/Conferences/{conference_sid}/Recordings.jsonruby
response = client.texml.accounts.conferences.retrieve_recordings_json("conference_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(response)返回参数:(整数)、(uri)、(字符串)、(整数)、(整数)、(uri)、(对象数组)、(整数)、(字符串)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_urirecordingsstarturiList queue resources
获取队列资源列表
Lists queue resources.
GET /texml/Accounts/{account_sid}/Queuesruby
page = client.texml.accounts.queues.list("account_sid")
puts(page)Returns: (integer), (string), (string), (integer), (integer), (array[object]), (integer), (string)
endfirst_page_urinext_page_uripagepage_sizequeuesstarturi返回队列资源列表。
GET /texml/Accounts/{account_sid}/Queuesruby
page = client.texml.accounts.queues.list("account_sid")
puts(page)返回参数:(整数)、(字符串)、(字符串)、(整数)、(整数)、(对象数组)、(整数)、(字符串)
endfirst_page_urinext_page_uripagepage_sizequeuesstarturiCreate a new queue
创建队列
Creates a new queue resource.
POST /texml/Accounts/{account_sid}/Queuesruby
queue = client.texml.accounts.queues.create("account_sid")
puts(queue)Returns: (string), (integer), (integer), (string), (string), (integer), (string), (object), (string)
account_sidaverage_wait_timecurrent_sizedate_createddate_updatedmax_sizesidsubresource_urisuri创建新的队列资源。
POST /texml/Accounts/{account_sid}/Queuesruby
queue = client.texml.accounts.queues.create("account_sid")
puts(queue)返回参数:(字符串)、(整数)、(整数)、(字符串)、(字符串)、(整数)、(字符串)、(对象)、(字符串)
account_sidaverage_wait_timecurrent_sizedate_createddate_updatedmax_sizesidsubresource_urisuriFetch a queue resource
获取单条队列资源
Returns a queue resource.
GET /texml/Accounts/{account_sid}/Queues/{queue_sid}ruby
queue = client.texml.accounts.queues.retrieve("queue_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(queue)Returns: (string), (integer), (integer), (string), (string), (integer), (string), (object), (string)
account_sidaverage_wait_timecurrent_sizedate_createddate_updatedmax_sizesidsubresource_urisuri返回指定的队列资源。
GET /texml/Accounts/{account_sid}/Queues/{queue_sid}ruby
queue = client.texml.accounts.queues.retrieve("queue_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(queue)返回参数:(字符串)、(整数)、(整数)、(字符串)、(字符串)、(整数)、(字符串)、(对象)、(字符串)
account_sidaverage_wait_timecurrent_sizedate_createddate_updatedmax_sizesidsubresource_urisuriUpdate a queue resource
更新队列资源
Updates a queue resource.
POST /texml/Accounts/{account_sid}/Queues/{queue_sid}ruby
queue = client.texml.accounts.queues.update("queue_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(queue)Returns: (string), (integer), (integer), (string), (string), (integer), (string), (object), (string)
account_sidaverage_wait_timecurrent_sizedate_createddate_updatedmax_sizesidsubresource_urisuri更新指定的队列资源。
POST /texml/Accounts/{account_sid}/Queues/{queue_sid}ruby
queue = client.texml.accounts.queues.update("queue_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(queue)返回参数:(字符串)、(整数)、(整数)、(字符串)、(字符串)、(整数)、(字符串)、(对象)、(字符串)
account_sidaverage_wait_timecurrent_sizedate_createddate_updatedmax_sizesidsubresource_urisuriDelete a queue resource
删除队列资源
Delete a queue resource.
DELETE /texml/Accounts/{account_sid}/Queues/{queue_sid}ruby
result = client.texml.accounts.queues.delete("queue_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(result)删除指定的队列资源。
DELETE /texml/Accounts/{account_sid}/Queues/{queue_sid}ruby
result = client.texml.accounts.queues.delete("queue_sid", account_sid: "550e8400-e29b-41d4-a716-446655440000")
puts(result)Fetch multiple recording resources
获取账号录音资源列表
Returns multiple recording resources for an account.
GET /texml/Accounts/{account_sid}/Recordings.jsonruby
response = client.texml.accounts.retrieve_recordings_json("account_sid")
puts(response)Returns: (integer), (uri), (string), (integer), (integer), (uri), (array[object]), (integer), (string)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_urirecordingsstarturi返回账号下的多个录音资源。
GET /texml/Accounts/{account_sid}/Recordings.jsonruby
response = client.texml.accounts.retrieve_recordings_json("account_sid")
puts(response)返回参数:(整数)、(uri)、(字符串)、(整数)、(整数)、(uri)、(对象数组)、(整数)、(字符串)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_urirecordingsstarturiFetch recording resource
获取单条录音资源
Returns recording resource identified by recording id.
GET /texml/Accounts/{account_sid}/Recordings/{recording_sid}.jsonruby
texml_get_call_recording_response_body = client.texml.accounts.recordings.json.retrieve_recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(texml_get_call_recording_response_body)Returns: (string), (string), (enum: 1, 2), (uuid), (date-time), (date-time), (string | null), (string | null), (uri), (string), (enum: StartCallRecordingAPI, StartConferenceRecordingAPI, OutboundAPI, DialVerb, Conference, RecordVerb, Trunking), (date-time), (enum: in-progress, completed, paused, stopped), (object), (string)
account_sidcall_sidchannelsconference_siddate_createddate_updateddurationerror_codemedia_urlsidsourcestart_timestatussubresources_urisuri返回指定ID对应的录音资源。
GET /texml/Accounts/{account_sid}/Recordings/{recording_sid}.jsonruby
texml_get_call_recording_response_body = client.texml.accounts.recordings.json.retrieve_recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(texml_get_call_recording_response_body)返回参数:(字符串)、(字符串)、(枚举值:1、2)、(uuid)、(日期时间)、(日期时间)、(字符串 | 空)、(字符串 | 空)、(uri)、(字符串)、(枚举值:StartCallRecordingAPI、StartConferenceRecordingAPI、OutboundAPI、DialVerb、Conference、RecordVerb、Trunking)、(日期时间)、(枚举值:in-progress、completed、paused、stopped)、(对象)、(字符串)
account_sidcall_sidchannelsconference_siddate_createddate_updateddurationerror_codemedia_urlsidsourcestart_timestatussubresources_urisuriDelete recording resource
删除录音资源
Deletes recording resource identified by recording id.
DELETE /texml/Accounts/{account_sid}/Recordings/{recording_sid}.jsonruby
result = client.texml.accounts.recordings.json.delete_recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(result)删除指定ID对应的录音资源。
DELETE /texml/Accounts/{account_sid}/Recordings/{recording_sid}.jsonruby
result = client.texml.accounts.recordings.json.delete_recording_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(result)List recording transcriptions
获取录音转写列表
Returns multiple recording transcription resources for an account.
GET /texml/Accounts/{account_sid}/Transcriptions.jsonruby
response = client.texml.accounts.retrieve_transcriptions_json("account_sid")
puts(response)Returns: (integer), (uri), (string), (integer), (integer), (uri), (integer), (array[object]), (string)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_uristarttranscriptionsuri返回账号下的多个录音转写资源。
GET /texml/Accounts/{account_sid}/Transcriptions.jsonruby
response = client.texml.accounts.retrieve_transcriptions_json("account_sid")
puts(response)返回参数:(整数)、(uri)、(字符串)、(整数)、(整数)、(uri)、(整数)、(对象数组)、(字符串)
endfirst_page_urinext_page_uripagepage_sizeprevious_page_uristarttranscriptionsuriFetch a recording transcription resource
获取单条录音转写资源
Returns the recording transcription resource identified by its ID.
GET /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.jsonruby
response = client.texml.accounts.transcriptions.json.retrieve_recording_transcription_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)Returns: (string), (string), (string), (date-time), (date-time), (string | null), (string), (string), (enum: in-progress, completed), (string), (string)
account_sidapi_versioncall_siddate_createddate_updateddurationrecording_sidsidstatustranscription_texturi返回指定ID对应的录音转写资源。
GET /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.jsonruby
response = client.texml.accounts.transcriptions.json.retrieve_recording_transcription_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(response)返回参数:(字符串)、(字符串)、(字符串)、(日期时间)、(日期时间)、(字符串 | 空)、(字符串)、(字符串)、(枚举值:in-progress、completed)、(字符串)、(字符串)
account_sidapi_versioncall_siddate_createddate_updateddurationrecording_sidsidstatustranscription_texturiDelete a recording transcription
删除录音转写资源
Permanently deletes a recording transcription.
DELETE /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.jsonruby
result = client.texml.accounts.transcriptions.json.delete_recording_transcription_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(result)永久删除指定的录音转写资源。
DELETE /texml/Accounts/{account_sid}/Transcriptions/{recording_transcription_sid}.jsonruby
result = client.texml.accounts.transcriptions.json.delete_recording_transcription_sid_json(
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
account_sid: "550e8400-e29b-41d4-a716-446655440000"
)
puts(result)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/secretsnamevalueruby
response = client.texml.secrets(name: "My Secret Name", value: "My Secret Value")
puts(response)Returns: (string), (enum: REDACTED)
namevalue创建TeXML密钥,后续在TeXML中使用Mustache模板时可将其作为动态参数使用。你可以在TeXML中使用密钥的名称,Telnyx处理TeXML时会将名称替换为实际的密钥值,密钥不会出现在任何日志中。
POST /texml/secretsnamevalueruby
response = client.texml.secrets(name: "My Secret Name", value: "My Secret Value")
puts(response)返回参数:(字符串)、(枚举值:REDACTED)
namevalueList all TeXML Applications
获取所有TeXML应用列表
Returns a list of your TeXML Applications.
GET /texml_applicationsruby
page = client.texml_applications.list
puts(page)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (boolean), (string), (enum: RFC 2833, Inband, SIP INFO), (boolean), (integer), (string), (string), (object), (object), (string), (uri), (enum: get, post), (array[string]), (string), (uri), (enum: get, post), (uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_url返回你的TeXML应用列表。
GET /texml_applicationsruby
page = client.texml_applications.list
puts(page)返回参数:(布尔值)、(枚举值:Latency、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(布尔值)、(字符串)、(枚举值:RFC 2833、Inband、SIP INFO)、(布尔值)、(整数)、(字符串)、(字符串)、(对象)、(对象)、(字符串)、(uri)、(枚举值:get、post)、(字符串数组)、(字符串)、(uri)、(枚举值:get、post)、(uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_urlCreates a TeXML Application
创建TeXML应用
Creates a TeXML Application.
POST /texml_applicationsfriendly_namevoice_urlOptional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (integer), (object), (object), (uri), (enum: get, post), (array[string]), (uri), (enum: get, post)
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundstatus_callbackstatus_callback_methodtagsvoice_fallback_urlvoice_methodruby
texml_application = client.texml_applications.create(friendly_name: "call-router", voice_url: "https://example.com")
puts(texml_application)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (boolean), (string), (enum: RFC 2833, Inband, SIP INFO), (boolean), (integer), (string), (string), (object), (object), (string), (uri), (enum: get, post), (array[string]), (string), (uri), (enum: get, post), (uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_url创建新的TeXML应用。
POST /texml_applicationsfriendly_namevoice_url可选参数:(布尔值)、(枚举值:Latency、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(布尔值)、(枚举值:RFC 2833、Inband、SIP INFO)、(布尔值)、(整数)、(对象)、(对象)、(uri)、(枚举值:get、post)、(字符串数组)、(uri)、(枚举值:get、post)
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundstatus_callbackstatus_callback_methodtagsvoice_fallback_urlvoice_methodruby
texml_application = client.texml_applications.create(friendly_name: "call-router", voice_url: "https://example.com")
puts(texml_application)返回参数:(布尔值)、(枚举值:Latency、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(布尔值)、(字符串)、(枚举值:RFC 2833、Inband、SIP INFO)、(布尔值)、(整数)、(字符串)、(字符串)、(对象)、(对象)、(字符串)、(uri)、(枚举值:get、post)、(字符串数组)、(字符串)、(uri)、(枚举值:get、post)、(uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_urlRetrieve a TeXML Application
获取TeXML应用详情
Retrieves the details of an existing TeXML Application.
GET /texml_applications/{id}ruby
texml_application = client.texml_applications.retrieve("1293384261075731499")
puts(texml_application)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (boolean), (string), (enum: RFC 2833, Inband, SIP INFO), (boolean), (integer), (string), (string), (object), (object), (string), (uri), (enum: get, post), (array[string]), (string), (uri), (enum: get, post), (uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_url返回现有TeXML应用的详细信息。
GET /texml_applications/{id}ruby
texml_application = client.texml_applications.retrieve("1293384261075731499")
puts(texml_application)返回参数:(布尔值)、(枚举值:Latency、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(布尔值)、(字符串)、(枚举值:RFC 2833、Inband、SIP INFO)、(布尔值)、(整数)、(字符串)、(字符串)、(对象)、(对象)、(字符串)、(uri)、(枚举值:get、post)、(字符串数组)、(字符串)、(uri)、(枚举值:get、post)、(uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_urlUpdate a TeXML Application
更新TeXML应用
Updates settings of an existing TeXML Application.
PATCH /texml_applications/{id}friendly_namevoice_urlOptional: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (boolean), (enum: RFC 2833, Inband, SIP INFO), (boolean), (integer), (object), (object), (uri), (enum: get, post), (array[string]), (uri), (enum: get, post)
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundstatus_callbackstatus_callback_methodtagsvoice_fallback_urlvoice_methodruby
texml_application = client.texml_applications.update(
"1293384261075731499",
friendly_name: "call-router",
voice_url: "https://example.com"
)
puts(texml_application)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (boolean), (string), (enum: RFC 2833, Inband, SIP INFO), (boolean), (integer), (string), (string), (object), (object), (string), (uri), (enum: get, post), (array[string]), (string), (uri), (enum: get, post), (uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_url更新现有TeXML应用的配置。
PATCH /texml_applications/{id}friendly_namevoice_url可选参数:(布尔值)、(枚举值:Latency、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(布尔值)、(枚举值:RFC 2833、Inband、SIP INFO)、(布尔值)、(整数)、(对象)、(对象)、(uri)、(枚举值:get、post)、(字符串数组)、(uri)、(枚举值:get、post)
activeanchorsite_overridecall_cost_in_webhooksdtmf_typefirst_command_timeoutfirst_command_timeout_secsinboundoutboundstatus_callbackstatus_callback_methodtagsvoice_fallback_urlvoice_methodruby
texml_application = client.texml_applications.update(
"1293384261075731499",
friendly_name: "call-router",
voice_url: "https://example.com"
)
puts(texml_application)返回参数:(布尔值)、(枚举值:Latency、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(布尔值)、(字符串)、(枚举值:RFC 2833、Inband、SIP INFO)、(布尔值)、(整数)、(字符串)、(字符串)、(对象)、(对象)、(字符串)、(uri)、(枚举值:get、post)、(字符串数组)、(字符串)、(uri)、(枚举值:get、post)、(uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_urlDeletes a TeXML Application
删除TeXML应用
Deletes a TeXML Application.
DELETE /texml_applications/{id}ruby
texml_application = client.texml_applications.delete("1293384261075731499")
puts(texml_application)Returns: (boolean), (enum: Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany), (boolean), (string), (enum: RFC 2833, Inband, SIP INFO), (boolean), (integer), (string), (string), (object), (object), (string), (uri), (enum: get, post), (array[string]), (string), (uri), (enum: get, post), (uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_url删除指定的TeXML应用。
DELETE /texml_applications/{id}ruby
texml_application = client.texml_applications.delete("1293384261075731499")
puts(texml_application)返回参数:(布尔值)、(枚举值:Latency、Chicago, IL、Ashburn, VA、San Jose, CA、Sydney, Australia、Amsterdam, Netherlands、London, UK、Toronto, Canada、Vancouver, Canada、Frankfurt, Germany)、(布尔值)、(字符串)、(枚举值:RFC 2833、Inband、SIP INFO)、(布尔值)、(整数)、(字符串)、(字符串)、(对象)、(对象)、(字符串)、(uri)、(枚举值:get、post)、(字符串数组)、(字符串)、(uri)、(枚举值:get、post)、(uri)
activeanchorsite_overridecall_cost_in_webhookscreated_atdtmf_typefirst_command_timeoutfirst_command_timeout_secsfriendly_nameidinboundoutboundrecord_typestatus_callbackstatus_callback_methodtagsupdated_atvoice_fallback_urlvoice_methodvoice_url