Class: Telnyx::Resources::Texml
- Inherits:
-
Object
- Object
- Telnyx::Resources::Texml
- Defined in:
- lib/telnyx/resources/texml.rb,
lib/telnyx/resources/texml/accounts.rb,
lib/telnyx/resources/texml/accounts/calls.rb,
lib/telnyx/resources/texml/accounts/queues.rb,
lib/telnyx/resources/texml/accounts/recordings.rb,
lib/telnyx/resources/texml/accounts/conferences.rb,
lib/telnyx/resources/texml/accounts/calls/siprec.rb,
lib/telnyx/resources/texml/accounts/calls/streams.rb,
lib/telnyx/resources/texml/accounts/transcriptions.rb,
lib/telnyx/resources/texml/accounts/recordings/json.rb,
lib/telnyx/resources/texml/accounts/calls/recordings.rb,
lib/telnyx/resources/texml/accounts/transcriptions/json.rb,
lib/telnyx/resources/texml/accounts/calls/recordings_json.rb,
lib/telnyx/resources/texml/accounts/conferences/participants.rb
Overview
TeXML REST Commands
Defined Under Namespace
Classes: Accounts
Instance Attribute Summary collapse
-
#accounts ⇒ Telnyx::Resources::Texml::Accounts
readonly
TeXML REST Commands.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Texml
constructor
private
A new instance of Texml.
-
#initiate_ai_call(connection_id, ai_assistant_id:, from:, to:, ai_assistant_dynamic_variables: nil, ai_assistant_version: nil, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, conversation_callback: nil, conversation_callback_method: nil, conversation_callbacks: nil, custom_headers: nil, detection_mode: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, passports: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_timeout: nil, recording_track: nil, send_recording_url: nil, sip_auth_password: nil, sip_auth_username: nil, sip_region: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, status_callbacks: nil, time_limit: nil, timeout_seconds: nil, trim: nil, request_options: {}) ⇒ Telnyx::Models::TexmlInitiateAICallResponse
Some parameter documentations has been truncated, see Models::TexmlInitiateAICallParams for more details.
-
#secrets(name:, value:, request_options: {}) ⇒ Telnyx::Models::TexmlSecretsResponse
Some parameter documentations has been truncated, see Models::TexmlSecretsParams for more details.
Constructor Details
#initialize(client:) ⇒ Texml
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Texml.
162 163 164 165 |
# File 'lib/telnyx/resources/texml.rb', line 162 def initialize(client:) @client = client @accounts = Telnyx::Resources::Texml::Accounts.new(client: client) end |
Instance Attribute Details
#accounts ⇒ Telnyx::Resources::Texml::Accounts (readonly)
TeXML REST Commands
9 10 11 |
# File 'lib/telnyx/resources/texml.rb', line 9 def accounts @accounts end |
Instance Method Details
#initiate_ai_call(connection_id, ai_assistant_id:, from:, to:, ai_assistant_dynamic_variables: nil, ai_assistant_version: nil, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, conversation_callback: nil, conversation_callback_method: nil, conversation_callbacks: nil, custom_headers: nil, detection_mode: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: nil, passports: nil, preferred_codecs: nil, record: nil, recording_channels: nil, recording_status_callback: nil, recording_status_callback_event: nil, recording_status_callback_method: nil, recording_timeout: nil, recording_track: nil, send_recording_url: nil, sip_auth_password: nil, sip_auth_username: nil, sip_region: nil, status_callback: nil, status_callback_event: nil, status_callback_method: nil, status_callbacks: nil, time_limit: nil, timeout_seconds: nil, trim: nil, request_options: {}) ⇒ Telnyx::Models::TexmlInitiateAICallResponse
Some parameter documentations has been truncated, see Models::TexmlInitiateAICallParams for more details.
Initiate an outbound AI call with warm-up support. Validates parameters, builds an internal TeXML with an AI Assistant configuration, encodes instructions into client state, and calls the dial API. The Twiml, Texml, and Url parameters are not allowed and will result in a 422 error.
**Expected callback events:**
Status callbacks: ‘initiated`, `ringing`, `answered`, one terminal status (`completed`, `no-answer`, `busy`, `canceled`, or `failed`), then `analyzed` after post-call processing completes.
Conversation callbacks: ‘conversation_created` and `conversation_ended`.
Recording, AMD, transcription, and deepfake detection callbacks are only sent when those features are enabled.
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/telnyx/resources/texml.rb', line 117 def initiate_ai_call(connection_id, params) parsed, = Telnyx::TexmlInitiateAICallParams.dump_request(params) @client.request( method: :post, path: ["texml/ai_calls/%1$s", connection_id], body: parsed, model: Telnyx::Models::TexmlInitiateAICallResponse, options: ) end |
#secrets(name:, value:, request_options: {}) ⇒ Telnyx::Models::TexmlSecretsResponse
Some parameter documentations has been truncated, see Models::TexmlSecretsParams for more details.
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.
148 149 150 151 152 153 154 155 156 157 |
# File 'lib/telnyx/resources/texml.rb', line 148 def secrets(params) parsed, = Telnyx::TexmlSecretsParams.dump_request(params) @client.request( method: :post, path: "texml/secrets", body: parsed, model: Telnyx::Models::TexmlSecretsResponse, options: ) end |