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, params:, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallCallsResponse
Initiate an outbound TeXML call.
-
#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.
291 292 293 294 295 296 297 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 291 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, params:, request_options: {}) ⇒ Telnyx::Models::Texml::Accounts::CallCallsResponse
Initiate an outbound TeXML call. Telnyx will request TeXML from the XML Request URL configured for the connection in the Mission Control Portal.
116 117 118 119 120 121 122 123 124 125 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 116 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[:params], 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.
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 166 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.
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 226 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.
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/telnyx/resources/texml/accounts/calls.rb', line 272 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 |