Class: Telnyx::Resources::Texml::Accounts::Calls
- Inherits:
-
Object
- Object
- Telnyx::Resources::Texml::Accounts::Calls
- Defined in:
- lib/telnyx/resources/texml/accounts/calls.rb,
lib/telnyx/resources/texml/accounts/calls/siprec.rb,
lib/telnyx/resources/texml/accounts/calls/streams.rb,
lib/telnyx/resources/texml/accounts/calls/recordings.rb,
lib/telnyx/resources/texml/accounts/calls/recordings_json.rb
Overview
TeXML REST Commands
Defined Under Namespace
Classes: Recordings, RecordingsJson, Siprec, Streams
Instance Attribute Summary collapse
-
#recordings ⇒ Telnyx::Resources::Texml::Accounts::Calls::Recordings
readonly
TeXML REST Commands.
-
#recordings_json ⇒ Telnyx::Resources::Texml::Accounts::Calls::RecordingsJson
readonly
TeXML REST Commands.
-
#siprec ⇒ Telnyx::Resources::Texml::Accounts::Calls::Siprec
readonly
TeXML REST Commands.
-
#streams ⇒ Telnyx::Resources::Texml::Accounts::Calls::Streams
readonly
TeXML REST Commands.
Instance Method Summary collapse
-
#calls(account_sid, application_sid:, from:, to:, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, cancel_playback_on_detect_message_end: nil, cancel_playback_on_machine_detection: nil, custom_headers: nil, detection_mode: nil, fallback_url: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: 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, supervise_call_sid: nil, supervising_role: nil, texml: nil, time_limit: nil, timeout_seconds: nil, trim: nil, url: nil, url_method: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallCallsResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallCallsParams for more details.
-
#initialize(client:) ⇒ Calls
constructor
private
A new instance of Calls.
-
#retrieve(call_sid, account_sid:, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallRetrieveResponse
Returns an individual call identified by its CallSid.
-
#retrieve_calls(account_sid, end_time: nil, end_time_gt: nil, end_time_lt: nil, from: nil, page: nil, page_size: nil, page_token: nil, start_time: nil, start_time_gt: nil, start_time_lt: nil, status: nil, to: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallRetrieveCallsResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallRetrieveCallsParams for more details.
-
#siprec_json(call_sid, account_sid:, connector_name: nil, include_metadata_custom_headers: nil, name: nil, secure: nil, session_timeout_secs: nil, sip_transport: nil, status_callback: nil, status_callback_method: nil, track: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallSiprecJsonResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallSiprecJsonParams for more details.
-
#streams_json(call_sid, account_sid:, bidirectional_codec: nil, bidirectional_mode: nil, name: nil, status_callback: nil, status_callback_method: nil, track: nil, url: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallStreamsJsonResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallStreamsJsonParams for more details.
-
#update(call_sid, account_sid:, fallback_method: nil, fallback_url: nil, method_: nil, status: nil, status_callback: nil, status_callback_method: nil, texml: nil, url: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallUpdateResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Calls
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 Calls.
372 373 374 375 376 377 378 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 372 def initialize(client:) @client = client @recordings_json = Telnyx::Resources::Texml::Accounts::Calls::RecordingsJson.new(client: client) @recordings = Telnyx::Resources::Texml::Accounts::Calls::Recordings.new(client: client) @siprec = Telnyx::Resources::Texml::Accounts::Calls::Siprec.new(client: client) @streams = Telnyx::Resources::Texml::Accounts::Calls::Streams.new(client: client) end |
Instance Attribute Details
#recordings ⇒ Telnyx::Resources::Texml::Accounts::Calls::Recordings (readonly)
TeXML REST Commands
15 16 17 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 15 def recordings @recordings end |
#recordings_json ⇒ Telnyx::Resources::Texml::Accounts::Calls::RecordingsJson (readonly)
TeXML REST Commands
11 12 13 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 11 def recordings_json @recordings_json end |
#siprec ⇒ Telnyx::Resources::Texml::Accounts::Calls::Siprec (readonly)
TeXML REST Commands
19 20 21 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 19 def siprec @siprec end |
#streams ⇒ Telnyx::Resources::Texml::Accounts::Calls::Streams (readonly)
TeXML REST Commands
23 24 25 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 23 def streams @streams end |
Instance Method Details
#calls(account_sid, application_sid:, from:, to:, async_amd: nil, async_amd_status_callback: nil, async_amd_status_callback_method: nil, caller_id: nil, cancel_playback_on_detect_message_end: nil, cancel_playback_on_machine_detection: nil, custom_headers: nil, detection_mode: nil, fallback_url: nil, machine_detection: nil, machine_detection_silence_timeout: nil, machine_detection_speech_end_threshold: nil, machine_detection_speech_threshold: nil, machine_detection_timeout: 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, supervise_call_sid: nil, supervising_role: nil, texml: nil, time_limit: nil, timeout_seconds: nil, trim: nil, url: nil, url_method: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallCallsResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallCallsParams for more details.
Initiate an outbound TeXML call. Telnyx will request TeXML from the XML Request URL configured for the connection in the Mission Control Portal.
197 198 199 200 201 202 203 204 205 206 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 197 def calls(account_sid, params) parsed, = Telnyx::Texml::Accounts::CallCallsParams.dump_request(params) @client.request( method: :post, path: ["texml/Accounts/%1$s/Calls", account_sid], body: parsed, model: Telnyx::Models::Texml::Accounts::CallCallsResponse, options: ) end |
#retrieve(call_sid, account_sid:, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallRetrieveResponse
Returns an individual call identified by its CallSid. This endpoint is eventually consistent.
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 39 def retrieve(call_sid, params) parsed, = Telnyx::Texml::Accounts::CallRetrieveParams.dump_request(params) account_sid = parsed.delete(:account_sid) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["texml/Accounts/%1$s/Calls/%2$s", account_sid, call_sid], model: Telnyx::Models::Texml::Accounts::CallRetrieveResponse, options: ) end |
#retrieve_calls(account_sid, end_time: nil, end_time_gt: nil, end_time_lt: nil, from: nil, page: nil, page_size: nil, page_token: nil, start_time: nil, start_time_gt: nil, start_time_lt: nil, status: nil, to: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallRetrieveCallsResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallRetrieveCallsParams for more details.
Returns multiple call resouces for an account. This endpoint is eventually consistent.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 247 def retrieve_calls(account_sid, params = {}) parsed, = Telnyx::Texml::Accounts::CallRetrieveCallsParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["texml/Accounts/%1$s/Calls", account_sid], query: query.transform_keys( end_time: "EndTime", end_time_gt: "EndTime_gt", end_time_lt: "EndTime_lt", from: "From", page: "Page", page_size: "PageSize", page_token: "PageToken", start_time: "StartTime", start_time_gt: "StartTime_gt", start_time_lt: "StartTime_lt", status: "Status", to: "To" ), model: Telnyx::Models::Texml::Accounts::CallRetrieveCallsResponse, options: ) end |
#siprec_json(call_sid, account_sid:, connector_name: nil, include_metadata_custom_headers: nil, name: nil, secure: nil, session_timeout_secs: nil, sip_transport: nil, status_callback: nil, status_callback_method: nil, track: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallSiprecJsonResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallSiprecJsonParams for more details.
Starts siprec session with specified parameters for call idientified by call_sid.
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 307 def siprec_json(call_sid, params) parsed, = Telnyx::Texml::Accounts::CallSiprecJsonParams.dump_request(params) account_sid = parsed.delete(:account_sid) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["texml/Accounts/%1$s/Calls/%2$s/Siprec.json", account_sid, call_sid], headers: {"content-type" => "application/x-www-form-urlencoded"}, body: parsed, model: Telnyx::Models::Texml::Accounts::CallSiprecJsonResponse, options: ) end |
#streams_json(call_sid, account_sid:, bidirectional_codec: nil, bidirectional_mode: nil, name: nil, status_callback: nil, status_callback_method: nil, track: nil, url: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallStreamsJsonResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallStreamsJsonParams for more details.
Starts streaming media from a call to a specific WebSocket address.
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 353 def streams_json(call_sid, params) parsed, = Telnyx::Texml::Accounts::CallStreamsJsonParams.dump_request(params) account_sid = parsed.delete(:account_sid) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["texml/Accounts/%1$s/Calls/%2$s/Streams.json", account_sid, call_sid], headers: {"content-type" => "application/x-www-form-urlencoded"}, body: parsed, model: Telnyx::Models::Texml::Accounts::CallStreamsJsonResponse, options: ) end |
#update(call_sid, account_sid:, fallback_method: nil, fallback_url: nil, method_: nil, status: nil, status_callback: nil, status_callback_method: nil, texml: nil, url: nil, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallUpdateResponse
Some parameter documentations has been truncated, see Models::Texml::Accounts::CallUpdateParams for more details.
Update TeXML call. Please note that the keys present in the payload MUST BE formatted in CamelCase as specified in the example.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 86 def update(call_sid, params) parsed, = Telnyx::Texml::Accounts::CallUpdateParams.dump_request(params) account_sid = parsed.delete(:account_sid) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["texml/Accounts/%1$s/Calls/%2$s", account_sid, call_sid], headers: {"content-type" => "application/x-www-form-urlencoded"}, body: parsed, model: Telnyx::Models::Texml::Accounts::CallUpdateResponse, options: ) end |