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
Defined Under Namespace
Classes: Recordings, RecordingsJson, Siprec, Streams
Instance Attribute Summary collapse
- #recordings ⇒ Telnyx::Resources::Texml::Accounts::Calls::Recordings readonly
- #recordings_json ⇒ Telnyx::Resources::Texml::Accounts::Calls::RecordingsJson readonly
- #siprec ⇒ Telnyx::Resources::Texml::Accounts::Calls::Siprec readonly
- #streams ⇒ Telnyx::Resources::Texml::Accounts::Calls::Streams readonly
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, 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.
360 361 362 363 364 365 366 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 360 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)
12 13 14 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 12 def recordings @recordings end |
#recordings_json ⇒ Telnyx::Resources::Texml::Accounts::Calls::RecordingsJson (readonly)
9 10 11 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 9 def recordings_json @recordings_json end |
#siprec ⇒ Telnyx::Resources::Texml::Accounts::Calls::Siprec (readonly)
15 16 17 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 15 def siprec @siprec end |
#streams ⇒ Telnyx::Resources::Texml::Accounts::Calls::Streams (readonly)
18 19 20 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 18 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, 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.
186 187 188 189 190 191 192 193 194 195 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 186 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.
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 34 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.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 236 def retrieve_calls(account_sid, params = {}) parsed, = Telnyx::Texml::Accounts::CallRetrieveCallsParams.dump_request(params) @client.request( method: :get, path: ["texml/Accounts/%1$s/Calls", account_sid], query: parsed.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.
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 295 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.
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 341 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.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 81 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 |