lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.49.0 vs lib/twilio-ruby/rest/api/v2010/account/call.rb in twilio-ruby-5.50.0
- old
+ new
@@ -140,14 +140,21 @@
# this call with. Note that `byoc` is only meaningful when `to` is a phone number;
# it will otherwise be ignored. (Beta)
# @param [String] call_reason The Reason for the outgoing call. Use it to specify
# the purpose of the call that is presented on the called party's phone. (Branded
# Calls Beta)
+ # @param [String] call_token A token string needed to invoke a forwarded call. A
+ # call_token is generated when an incoming call is received on a Twilio number.
+ # this field should be populated by the incoming call's call_token to make this
+ # outgoing call as a forwarded call of incoming call. A forwarded call should bear
+ # 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].
@@ -155,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, 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,
@@ -189,10 +196,12 @@
'AsyncAmd' => async_amd,
'AsyncAmdStatusCallback' => async_amd_status_callback,
'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], )
\ No newline at end of file