lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.57.1 vs lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.58.0
- old
+ new
@@ -149,10 +149,12 @@
# the same caller-id of incoming call.
# @param [String] recording_track The audio track to record for the call. Can be:
# `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the
# audio that is received by Twilio. `outbound` records the audio that is generated
# from Twilio. `both` records the audio that is received and generated by Twilio.
+ # @param [String] time_limit The maximum duration of the call in seconds.
+ # Constraints depend on account and configuration.
# @param [String] url The absolute URL that returns the TwiML instructions for the
# call. We will call this URL using the `method` when the call connects. For more
# information, see the {Url
# Parameter}[https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter]
# section in {Making Calls}[https://www.twilio.com/docs/voice/make-calls].
@@ -160,11 +162,11 @@
# fetching Twiml from url parameter. If both `twiml` and `url` are provided then
# `twiml` parameter will be ignored.
# @param [String] application_sid The SID of the Application resource that will
# handle the call, if the call will be handled by an application.
# @return [CallInstance] Created CallInstance
- def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, url: :unset, twiml: :unset, application_sid: :unset)
+ def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_event: :unset, status_callback_method: :unset, send_digits: :unset, timeout: :unset, record: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, sip_auth_username: :unset, sip_auth_password: :unset, machine_detection: :unset, machine_detection_timeout: :unset, recording_status_callback_event: :unset, trim: :unset, caller_id: :unset, machine_detection_speech_threshold: :unset, machine_detection_speech_end_threshold: :unset, machine_detection_silence_timeout: :unset, async_amd: :unset, async_amd_status_callback: :unset, async_amd_status_callback_method: :unset, byoc: :unset, call_reason: :unset, call_token: :unset, recording_track: :unset, time_limit: :unset, url: :unset, twiml: :unset, application_sid: :unset)
data = Twilio::Values.of({
'To' => to,
'From' => from,
'Url' => url,
'Twiml' => twiml,
@@ -196,10 +198,11 @@
'AsyncAmdStatusCallbackMethod' => async_amd_status_callback_method,
'Byoc' => byoc,
'CallReason' => call_reason,
'CallToken' => call_token,
'RecordingTrack' => recording_track,
+ 'TimeLimit' => time_limit,
})
payload = @version.create('POST', @uri, data: data)
CallInstance.new(@version, payload, account_sid: @solution[:account_sid], )
@@ -486,21 +489,24 @@
# @param [String] status_callback_method The HTTP method we should use when
# requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
# @param [String] twiml TwiML instructions for the call Twilio will use without
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
+ # @param [String] time_limit The maximum duration of the call in seconds.
+ # Constraints depend on account and configuration.
# @return [CallInstance] Updated CallInstance
- def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
+ def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
data = Twilio::Values.of({
'Url' => url,
'Method' => method,
'Status' => status,
'FallbackUrl' => fallback_url,
'FallbackMethod' => fallback_method,
'StatusCallback' => status_callback,
'StatusCallbackMethod' => status_callback_method,
'Twiml' => twiml,
+ 'TimeLimit' => time_limit,
})
payload = @version.update('POST', @uri, data: data)
CallInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], )
@@ -872,20 +878,23 @@
# @param [String] status_callback_method The HTTP method we should use when
# requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is
# `POST`. If an `application_sid` parameter is present, this parameter is ignored.
# @param [String] twiml TwiML instructions for the call Twilio will use without
# fetching Twiml from url. Twiml and url parameters are mutually exclusive
+ # @param [String] time_limit The maximum duration of the call in seconds.
+ # Constraints depend on account and configuration.
# @return [CallInstance] Updated CallInstance
- def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset)
+ def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset, twiml: :unset, time_limit: :unset)
context.update(
url: url,
method: method,
status: status,
fallback_url: fallback_url,
fallback_method: fallback_method,
status_callback: status_callback,
status_callback_method: status_callback_method,
twiml: twiml,
+ time_limit: time_limit,
)
end
##
# Access the recordings
\ No newline at end of file