twilio-ruby 5.10.3 → 5.10.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +14 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +109 -107
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +8 -4
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +8 -4
- data/lib/twilio-ruby/rest/client.rb +10 -1
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +2 -2
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +40 -31
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +6 -3
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +28 -28
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +13 -7
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +13 -7
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +18 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +7 -7
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +4 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +19 -4
- data/lib/twilio-ruby/twiml/twiml.rb +32 -13
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/application_spec.rb +5 -11
- data/spec/rest/client_spec.rb +12 -0
- data/spec/twiml/messaging_response_spec.rb +26 -0
- data/spec/twiml/voice_response_spec.rb +25 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 483e58a3cf9680dcd21af82952f77ff94d389664
|
4
|
+
data.tar.gz: f6be57565c6c9f9225e2a3989c18d9c14068e5a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6ed194dad05bd87330f7082a3835e0b110ce6ee78dab8eb0bb7760936e9719cb2f111a58a59ac291cd8dc6e7bdaac6a9e11c5cf07d08331f74b96428d8eb7ab
|
7
|
+
data.tar.gz: 16b7c469d432b71bbfc2c0918bc48d114240bf6fe68511fef15b7fa0e45ec6c3dbde8adaf535daf95aa331df6dcdba584070ccee40047dd63bf95cfcbf7387e5
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,20 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2018-06-19] Version 5.10.4
|
5
|
+
----------------------------
|
6
|
+
**Library**
|
7
|
+
- PR #412: Allow adding TwiML children with generic tag names. Thanks to @ekarson!
|
8
|
+
- PR #408: Add validate_ssl_certificate helper method to Client. Thanks to @ekarson!
|
9
|
+
- PR #410: Allow adding text nodes to TwiML responses. Thanks to @ekarson!
|
10
|
+
|
11
|
+
**Api**
|
12
|
+
- Add Fraud Lookups category to usage records
|
13
|
+
|
14
|
+
**Twiml**
|
15
|
+
- Add methods to helper libraries to inject arbitrary text under a TwiML node
|
16
|
+
|
17
|
+
|
4
18
|
[2018-06-04] Version 5.10.3
|
5
19
|
----------------------------
|
6
20
|
**Library**
|
data/README.md
CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem 'twilio-ruby', '~> 5.10.
|
30
|
+
gem 'twilio-ruby', '~> 5.10.4'
|
31
31
|
```
|
32
32
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
34
34
|
|
35
35
|
```bash
|
36
|
-
gem install twilio-ruby -v 5.10.
|
36
|
+
gem install twilio-ruby -v 5.10.4
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
data/lib/twilio-ruby/rest/api.rb
CHANGED
@@ -78,7 +78,7 @@ module Twilio
|
|
78
78
|
end
|
79
79
|
|
80
80
|
##
|
81
|
-
# @param [String] sid A 34
|
81
|
+
# @param [String] sid A 34-character string that uniquely identifies the Call
|
82
82
|
# resource.
|
83
83
|
# @return [Twilio::REST::Api::V2010::AccountContext::CallInstance] if sid was passed.
|
84
84
|
# @return [Twilio::REST::Api::V2010::AccountContext::CallList]
|
@@ -17,7 +17,7 @@ module Twilio
|
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
18
|
# @param [String] account_sid The unique id of the
|
19
19
|
# [Account](https://www.twilio.com/docs/api/rest/account) responsible for creating
|
20
|
-
# this
|
20
|
+
# this Call.
|
21
21
|
# @return [CallList] CallList
|
22
22
|
def initialize(version, account_sid: nil)
|
23
23
|
super(version)
|
@@ -33,14 +33,14 @@ module Twilio
|
|
33
33
|
##
|
34
34
|
# Retrieve a single page of CallInstance records from the API.
|
35
35
|
# Request is executed immediately.
|
36
|
-
# @param [String] to The phone number, SIP address or client identifier to call.
|
36
|
+
# @param [String] to The phone number, SIP address, or client identifier to call.
|
37
37
|
# @param [String] from The phone number or client identifier to use as the caller
|
38
|
-
# id.
|
39
|
-
# caller id](https://www.twilio.com/docs/api/
|
38
|
+
# id. If using a phone number, it must be a Twilio number or a Verified [outgoing
|
39
|
+
# caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your
|
40
40
|
# account. If the `To` parameter is a phone number, `From` must also be a phone
|
41
41
|
# number.
|
42
42
|
# @param [String] method The HTTP method Twilio should use when making its request
|
43
|
-
# to the
|
43
|
+
# to the `Url` parameter's value. Defaults to `POST`. If an `ApplicationSid`
|
44
44
|
# parameter is present, this parameter is ignored.
|
45
45
|
# @param [String] fallback_url A URL that Twilio will request if an error occurs
|
46
46
|
# requesting or executing the TwiML at `Url`. If an `ApplicationSid` parameter is
|
@@ -50,80 +50,82 @@ module Twilio
|
|
50
50
|
# If an `ApplicationSid` parameter is present, this parameter is ignored.
|
51
51
|
# @param [String] status_callback A URL that Twilio will send asynchronous webhook
|
52
52
|
# requests to on every call event specified in the `StatusCallbackEvent`
|
53
|
-
# parameter. If no event is
|
53
|
+
# parameter. If no event is specified, Twilio will send `completed` by default. If
|
54
54
|
# an `ApplicationSid` parameter is present, this parameter is ignored. URLs must
|
55
55
|
# contain a valid hostname (underscores are not permitted).
|
56
|
-
# @param [String] status_callback_event The call progress events that
|
57
|
-
#
|
58
|
-
# `completed`. If
|
59
|
-
#
|
60
|
-
# the code sample for
|
61
|
-
#
|
56
|
+
# @param [String] status_callback_event The call progress events that will trigger
|
57
|
+
# a webhook from Twilio. Available values are `initiated`, `ringing`, `answered`,
|
58
|
+
# and `completed`. If no event is specified, defaults to `completed`. If you want
|
59
|
+
# to receive multiple events, please provide multiple `StatusCallbackEvent` values
|
60
|
+
# as individual parameters in the `POST` request. See the code sample for
|
61
|
+
# [monitoring call
|
62
|
+
# progress](https://www.twilio.com/docs/voice/api/call?code-sample=code-create-a-call-and-specify-a-statuscallbackevent). If an `ApplicationSid` is present, this parameter is ignored.
|
62
63
|
# @param [String] status_callback_method The HTTP method Twilio should use when
|
63
|
-
# requesting the
|
64
|
-
# is present, this parameter is ignored.
|
64
|
+
# requesting the `StatusCallback` URL. Defaults to `POST`. If an `ApplicationSid`
|
65
|
+
# parameter is present, this parameter is ignored.
|
65
66
|
# @param [String] send_digits A string of keys to dial after connecting to the
|
66
67
|
# number, maximum of 32 digits. Valid digits in the string include: any digit
|
67
68
|
# (`0`-`9`), '`#`', '`*`' and '`w`' (to insert a half second pause). For example,
|
68
|
-
# if you connected to a company phone number
|
69
|
-
# dial extension 1234 and then the pound key, use `SendDigits=ww1234#`. Remember
|
69
|
+
# if you connected to a company phone number and wanted to pause for one second,
|
70
|
+
# dial extension 1234, and then the pound key, use `SendDigits=ww1234#`. Remember
|
70
71
|
# to URL-encode this string, since the '`#`' character has special meaning in a
|
71
72
|
# URL. If both `SendDigits` and `MachineDetection` parameters are provided, then
|
72
73
|
# `MachineDetection` will be ignored.
|
73
74
|
# @param [String] if_machine The if_machine
|
74
75
|
# @param [String] timeout The integer number of seconds that Twilio should allow
|
75
76
|
# the phone to ring before assuming there is no answer. Default is `60` seconds,
|
76
|
-
# the maximum is `600` seconds. For some call flows Twilio will add a 5
|
77
|
+
# the maximum is `600` seconds. For some call flows, Twilio will add a 5-second
|
77
78
|
# buffer to the timeout value provided, so if you enter a timeout value of 10
|
78
79
|
# seconds, you could see actual timeout closer to 15 seconds. Note, you could set
|
79
|
-
# this to a low value
|
80
|
-
#
|
81
|
-
# @param [Boolean] record Set this parameter to true to record the entirety of a
|
82
|
-
# phone call. The RecordingUrl will be sent to the StatusCallback URL.
|
83
|
-
# false.
|
84
|
-
# @param [String] recording_channels `mono` or `dual`
|
85
|
-
# the number of channels in the final recording.
|
86
|
-
# mono-channel, both legs of the call are mixed down into a single
|
87
|
-
# a single recording file. With dual-channel, both legs
|
88
|
-
# within a single recording file.
|
89
|
-
#
|
80
|
+
# this to a low value like `15` to hang up before reaching an answering machine or
|
81
|
+
# voicemail.
|
82
|
+
# @param [Boolean] record Set this parameter to `true` to record the entirety of a
|
83
|
+
# phone call. The `RecordingUrl` will be sent to the `StatusCallback` URL.
|
84
|
+
# Defaults to false.
|
85
|
+
# @param [String] recording_channels `mono` or `dual` – defaults to `mono`. Set
|
86
|
+
# this parameter to specify the number of channels in the final recording. In a
|
87
|
+
# mono-channel recording, both legs of the call are mixed down into a single
|
88
|
+
# channel within a single recording file. With dual-channel recording, both legs
|
89
|
+
# use separate channels within a single recording file. In dual-channel
|
90
|
+
# recordings, the parent call will always be in the first channel, and the child
|
91
|
+
# call will always be in the second channel.
|
90
92
|
# @param [String] recording_status_callback A URL that Twilio will send a webhook
|
91
93
|
# request to when the recording is available for access.
|
92
94
|
# @param [String] recording_status_callback_method The HTTP method Twilio should
|
93
|
-
# use when requesting the
|
95
|
+
# use when requesting the `RecordingStatusCallback` URL. Defaults to `POST`.
|
94
96
|
# @param [String] sip_auth_username The sip_auth_username
|
95
97
|
# @param [String] sip_auth_password The sip_auth_password
|
96
|
-
# @param [String] machine_detection Detect if a human, answering machine or fax
|
98
|
+
# @param [String] machine_detection Detect if a human, answering machine, or fax
|
97
99
|
# has picked up the call. Use `Enable` if you would like Twilio to return an
|
98
100
|
# `AnsweredBy` value as soon as it identifies the called party. If you would like
|
99
|
-
# to leave a message on an answering machine specify `DetectMessageEnd`. If both
|
100
|
-
# SendDigits and MachineDetection parameters are provided, then
|
101
|
-
# will be ignored. [Detailed documentation is
|
102
|
-
# here](https://www.twilio.com/docs/
|
101
|
+
# to leave a message on an answering machine, specify `DetectMessageEnd`. If both
|
102
|
+
# `SendDigits` and `MachineDetection` parameters are provided, then
|
103
|
+
# MachineDetection will be ignored. [Detailed documentation is
|
104
|
+
# here](https://www.twilio.com/docs/voice/answering-machine-detection).
|
103
105
|
# @param [String] machine_detection_timeout The number of seconds that Twilio
|
104
106
|
# should attempt to perform answering machine detection before timing out and
|
105
107
|
# firing a voice request with `AnsweredBy` of `unknown`. Defaults to 30 seconds.
|
106
|
-
# @param [String] recording_status_callback_event The recording status
|
107
|
-
#
|
108
|
-
# RecordingStatusCallback
|
109
|
-
# `failed`.
|
110
|
-
#
|
111
|
-
# applicable.
|
112
|
-
# @param [String] trim `trim-silence` or `do-not-trim
|
113
|
-
# whether leading and trailing silence is trimmed from the recording.
|
114
|
-
# `trim-silence`.
|
115
|
-
# @param [String] caller_id The phone number, SIP address or Client identifier
|
116
|
-
# that made this Call. Phone numbers are in E.164
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
# Parameter](https://www.twilio.com/docs/
|
122
|
-
# @param [String] application_sid The 34
|
108
|
+
# @param [String] recording_status_callback_event The recording status events that
|
109
|
+
# will trigger Twilio to send webhooks on to the URL specified in
|
110
|
+
# `RecordingStatusCallback`. The available values are `in-progress`, `completed`,
|
111
|
+
# and `failed`. Defaults are `completed` and `failed`. To specify multiple values,
|
112
|
+
# separate them with a space. If any values are specified, the defaults are no
|
113
|
+
# longer applicable.
|
114
|
+
# @param [String] trim `trim-silence` or `do-not-trim`. Set this parameter to
|
115
|
+
# define whether leading and trailing silence is trimmed from the recording.
|
116
|
+
# Defaults to `trim-silence`.
|
117
|
+
# @param [String] caller_id The phone number, SIP address, or Client identifier
|
118
|
+
# that made this Call. Phone numbers are in [E.164
|
119
|
+
# format](https://www.twilio.com/docs/glossary/what-e164) (e.g., +16175551212).
|
120
|
+
# SIP addresses are formatted as `name@company.com`.
|
121
|
+
# @param [String] url The fully qualified URL that hosts instructions for the
|
122
|
+
# call. Twilio will consult this URL when the call connects. See the [Url
|
123
|
+
# Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) details in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more details.
|
124
|
+
# @param [String] application_sid The 34-character SID of the application Twilio
|
123
125
|
# should use to handle this phone call. If this parameter is present, Twilio will
|
124
126
|
# ignore all of the voice URLs passed and use the URLs set on the application. See
|
125
127
|
# the [ApplicationSid
|
126
|
-
# Parameter](https://www.twilio.com/docs/
|
128
|
+
# Parameter](https://www.twilio.com/docs/voice/make-calls#specify-an-applicationsid-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more details.
|
127
129
|
# @return [CallInstance] Newly created CallInstance
|
128
130
|
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, if_machine: :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, url: :unset, application_sid: :unset)
|
129
131
|
data = Twilio::Values.of({
|
@@ -170,11 +172,11 @@ module Twilio
|
|
170
172
|
# identifier or SIM SID.
|
171
173
|
# @param [String] from Only show calls from this phone number, SIP address, Client
|
172
174
|
# identifier or SIM SID.
|
173
|
-
# @param [String] parent_call_sid Only show calls spawned by the
|
175
|
+
# @param [String] parent_call_sid Only show calls spawned by the Call with this
|
174
176
|
# SID.
|
175
|
-
# @param [call.Status] status Only show calls currently in
|
176
|
-
# `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
|
177
|
-
# or `no-answer`.
|
177
|
+
# @param [call.Status] status Only show calls currently in the specified status.
|
178
|
+
# May be `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
|
179
|
+
# `busy`, or `no-answer`.
|
178
180
|
# @param [Time] start_time_before StartTime to filter on
|
179
181
|
# @param [Time] start_time StartTime to filter on
|
180
182
|
# @param [Time] start_time_after StartTime to filter on
|
@@ -213,11 +215,11 @@ module Twilio
|
|
213
215
|
# identifier or SIM SID.
|
214
216
|
# @param [String] from Only show calls from this phone number, SIP address, Client
|
215
217
|
# identifier or SIM SID.
|
216
|
-
# @param [String] parent_call_sid Only show calls spawned by the
|
218
|
+
# @param [String] parent_call_sid Only show calls spawned by the Call with this
|
217
219
|
# SID.
|
218
|
-
# @param [call.Status] status Only show calls currently in
|
219
|
-
# `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
|
220
|
-
# or `no-answer`.
|
220
|
+
# @param [call.Status] status Only show calls currently in the specified status.
|
221
|
+
# May be `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
|
222
|
+
# `busy`, or `no-answer`.
|
221
223
|
# @param [Time] start_time_before StartTime to filter on
|
222
224
|
# @param [Time] start_time StartTime to filter on
|
223
225
|
# @param [Time] start_time_after StartTime to filter on
|
@@ -272,11 +274,11 @@ module Twilio
|
|
272
274
|
# identifier or SIM SID.
|
273
275
|
# @param [String] from Only show calls from this phone number, SIP address, Client
|
274
276
|
# identifier or SIM SID.
|
275
|
-
# @param [String] parent_call_sid Only show calls spawned by the
|
277
|
+
# @param [String] parent_call_sid Only show calls spawned by the Call with this
|
276
278
|
# SID.
|
277
|
-
# @param [call.Status] status Only show calls currently in
|
278
|
-
# `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
|
279
|
-
# or `no-answer`.
|
279
|
+
# @param [call.Status] status Only show calls currently in the specified status.
|
280
|
+
# May be `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`,
|
281
|
+
# `busy`, or `no-answer`.
|
280
282
|
# @param [Time] start_time_before StartTime to filter on
|
281
283
|
# @param [Time] start_time StartTime to filter on
|
282
284
|
# @param [Time] start_time_after StartTime to filter on
|
@@ -419,32 +421,32 @@ module Twilio
|
|
419
421
|
|
420
422
|
##
|
421
423
|
# Update the CallInstance
|
422
|
-
# @param [String] url
|
423
|
-
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
#
|
424
|
+
# @param [String] url that hosts instructions for the call. Twilio will consult
|
425
|
+
# this URL when the call connects. See the [Url
|
426
|
+
# Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter)
|
427
|
+
# section in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more
|
428
|
+
# details.
|
427
429
|
# @param [String] method The HTTP method Twilio should use when making its request
|
428
|
-
# to the
|
430
|
+
# to the `Url` parameter's value. Defaults to `POST`. If an `ApplicationSid`
|
429
431
|
# parameter is present, this parameter is ignored.
|
430
432
|
# @param [call.UpdateStatus] status Either `canceled` or `completed`.
|
431
|
-
# Specifying `canceled` will attempt to hang up calls that are queued or ringing
|
432
|
-
# but not affect calls already in progress. Specifying `completed` will
|
433
|
-
# hang up a call even if it's already in progress.
|
433
|
+
# Specifying `canceled` will attempt to hang up calls that are queued or ringing,
|
434
|
+
# but will not affect calls already in progress. Specifying `completed` will
|
435
|
+
# attempt to hang up a call even if it's already in progress.
|
434
436
|
# @param [String] fallback_url A URL that Twilio will request if an error occurs
|
435
|
-
# requesting or executing the TwiML at `Url`. If an `ApplicationSid`
|
436
|
-
# present, this parameter is ignored.
|
437
|
+
# when requesting or executing the TwiML at `Url`. If an `ApplicationSid`
|
438
|
+
# parameter is present, this parameter is ignored.
|
437
439
|
# @param [String] fallback_method The HTTP method that Twilio should use to
|
438
440
|
# request the `FallbackUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
|
439
441
|
# If an `ApplicationSid` parameter is present, this parameter is ignored.
|
440
442
|
# @param [String] status_callback A URL that Twilio will send asynchronous webhook
|
441
443
|
# requests to on every call event specified in the `StatusCallbackEvent`
|
442
|
-
# parameter. If no event is
|
444
|
+
# parameter. If no event is specified, Twilio will send `completed` by default. If
|
443
445
|
# an `ApplicationSid` parameter is present, this parameter is ignored. URLs must
|
444
446
|
# contain a valid hostname (underscores are not permitted).
|
445
447
|
# @param [String] status_callback_method The HTTP method Twilio should use when
|
446
|
-
# requesting the
|
447
|
-
# is present, this parameter is ignored.
|
448
|
+
# requesting the `StatusCallback` URL. Defaults to `POST`. If an `ApplicationSid`
|
449
|
+
# parameter is present, this parameter is ignored.
|
448
450
|
# @return [CallInstance] Updated CallInstance
|
449
451
|
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset)
|
450
452
|
data = Twilio::Values.of({
|
@@ -533,7 +535,7 @@ module Twilio
|
|
533
535
|
# @param [Hash] payload payload that contains response from Twilio
|
534
536
|
# @param [String] account_sid The unique id of the
|
535
537
|
# [Account](https://www.twilio.com/docs/api/rest/account) responsible for creating
|
536
|
-
# this
|
538
|
+
# this Call.
|
537
539
|
# @param [String] sid The Call Sid that uniquely identifies the Call to fetch
|
538
540
|
# @return [CallInstance] CallInstance
|
539
541
|
def initialize(version, payload, account_sid: nil, sid: nil)
|
@@ -597,19 +599,19 @@ module Twilio
|
|
597
599
|
end
|
598
600
|
|
599
601
|
##
|
600
|
-
# @return [String]
|
602
|
+
# @return [String] Either `human` or `machine` if this Call was initiated with answering machine detection. Empty otherwise.
|
601
603
|
def answered_by
|
602
604
|
@properties['answered_by']
|
603
605
|
end
|
604
606
|
|
605
607
|
##
|
606
|
-
# @return [String] The API Version
|
608
|
+
# @return [String] The API Version used to create the Call
|
607
609
|
def api_version
|
608
610
|
@properties['api_version']
|
609
611
|
end
|
610
612
|
|
611
613
|
##
|
612
|
-
# @return [String]
|
614
|
+
# @return [String] The caller's name if this Call was an incoming call to a phone number with Caller ID Lookup enabled. Empty otherwise.
|
613
615
|
def caller_name
|
614
616
|
@properties['caller_name']
|
615
617
|
end
|
@@ -627,13 +629,13 @@ module Twilio
|
|
627
629
|
end
|
628
630
|
|
629
631
|
##
|
630
|
-
# @return [String] A string describing the direction of the
|
632
|
+
# @return [String] A string describing the direction of the Call. `inbound` for inbound calls, `outbound-api` for calls initiated via the REST API or `outbound-dial` for calls initiated by a `Dial` verb.
|
631
633
|
def direction
|
632
634
|
@properties['direction']
|
633
635
|
end
|
634
636
|
|
635
637
|
##
|
636
|
-
# @return [String] The length of the
|
638
|
+
# @return [String] The length of the Call in seconds.
|
637
639
|
def duration
|
638
640
|
@properties['duration']
|
639
641
|
end
|
@@ -645,13 +647,13 @@ module Twilio
|
|
645
647
|
end
|
646
648
|
|
647
649
|
##
|
648
|
-
# @return [String]
|
650
|
+
# @return [String] The forwarding phone number if this Call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Empty otherwise.
|
649
651
|
def forwarded_from
|
650
652
|
@properties['forwarded_from']
|
651
653
|
end
|
652
654
|
|
653
655
|
##
|
654
|
-
# @return [String] The phone number, SIP address or Client identifier that made this Call. Phone numbers are in E.164 format (e.g
|
656
|
+
# @return [String] The phone number, SIP address or Client identifier that made this Call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`.
|
655
657
|
def from
|
656
658
|
@properties['from']
|
657
659
|
end
|
@@ -663,25 +665,25 @@ module Twilio
|
|
663
665
|
end
|
664
666
|
|
665
667
|
##
|
666
|
-
# @return [String] A 34
|
668
|
+
# @return [String] A 34-character Group Sid associated with this Call. Empty if no Group is associated with the Call.
|
667
669
|
def group_sid
|
668
670
|
@properties['group_sid']
|
669
671
|
end
|
670
672
|
|
671
673
|
##
|
672
|
-
# @return [String] A 34
|
674
|
+
# @return [String] A 34-character string that uniquely identifies the Call that created this leg.
|
673
675
|
def parent_call_sid
|
674
676
|
@properties['parent_call_sid']
|
675
677
|
end
|
676
678
|
|
677
679
|
##
|
678
|
-
# @return [String] If the call was inbound, this is the Sid of the IncomingPhoneNumber that received the call. If the call was outbound, it is the Sid of the OutgoingCallerId from which the call was placed.
|
680
|
+
# @return [String] If the call was inbound, this is the Sid of the `IncomingPhoneNumber` that received the call. If the call was outbound, it is the Sid of the `OutgoingCallerId` from which the call was placed.
|
679
681
|
def phone_number_sid
|
680
682
|
@properties['phone_number_sid']
|
681
683
|
end
|
682
684
|
|
683
685
|
##
|
684
|
-
# @return [String] The charge for this
|
686
|
+
# @return [String] The charge for this Call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
|
685
687
|
def price
|
686
688
|
@properties['price']
|
687
689
|
end
|
@@ -693,7 +695,7 @@ module Twilio
|
|
693
695
|
end
|
694
696
|
|
695
697
|
##
|
696
|
-
# @return [String] A 34
|
698
|
+
# @return [String] A 34-character string that uniquely identifies the Call resource.
|
697
699
|
def sid
|
698
700
|
@properties['sid']
|
699
701
|
end
|
@@ -705,7 +707,7 @@ module Twilio
|
|
705
707
|
end
|
706
708
|
|
707
709
|
##
|
708
|
-
# @return [call.Status] A string representing the status of the
|
710
|
+
# @return [call.Status] A string representing the status of the Call.
|
709
711
|
def status
|
710
712
|
@properties['status']
|
711
713
|
end
|
@@ -717,7 +719,7 @@ module Twilio
|
|
717
719
|
end
|
718
720
|
|
719
721
|
##
|
720
|
-
# @return [String] The phone number, SIP address or Client identifier that received this Call. Phone numbers are in E.164 format (e.g
|
722
|
+
# @return [String] The phone number, SIP address or Client identifier that received this Call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`. Client identifiers are formatted `client:name`.
|
721
723
|
def to
|
722
724
|
@properties['to']
|
723
725
|
end
|
@@ -750,32 +752,32 @@ module Twilio
|
|
750
752
|
|
751
753
|
##
|
752
754
|
# Update the CallInstance
|
753
|
-
# @param [String] url
|
754
|
-
#
|
755
|
-
#
|
756
|
-
#
|
757
|
-
#
|
755
|
+
# @param [String] url that hosts instructions for the call. Twilio will consult
|
756
|
+
# this URL when the call connects. See the [Url
|
757
|
+
# Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter)
|
758
|
+
# section in [Making Calls](https://www.twilio.com/docs/voice/make-calls) for more
|
759
|
+
# details.
|
758
760
|
# @param [String] method The HTTP method Twilio should use when making its request
|
759
|
-
# to the
|
761
|
+
# to the `Url` parameter's value. Defaults to `POST`. If an `ApplicationSid`
|
760
762
|
# parameter is present, this parameter is ignored.
|
761
763
|
# @param [call.UpdateStatus] status Either `canceled` or `completed`.
|
762
|
-
# Specifying `canceled` will attempt to hang up calls that are queued or ringing
|
763
|
-
# but not affect calls already in progress. Specifying `completed` will
|
764
|
-
# hang up a call even if it's already in progress.
|
764
|
+
# Specifying `canceled` will attempt to hang up calls that are queued or ringing,
|
765
|
+
# but will not affect calls already in progress. Specifying `completed` will
|
766
|
+
# attempt to hang up a call even if it's already in progress.
|
765
767
|
# @param [String] fallback_url A URL that Twilio will request if an error occurs
|
766
|
-
# requesting or executing the TwiML at `Url`. If an `ApplicationSid`
|
767
|
-
# present, this parameter is ignored.
|
768
|
+
# when requesting or executing the TwiML at `Url`. If an `ApplicationSid`
|
769
|
+
# parameter is present, this parameter is ignored.
|
768
770
|
# @param [String] fallback_method The HTTP method that Twilio should use to
|
769
771
|
# request the `FallbackUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
|
770
772
|
# If an `ApplicationSid` parameter is present, this parameter is ignored.
|
771
773
|
# @param [String] status_callback A URL that Twilio will send asynchronous webhook
|
772
774
|
# requests to on every call event specified in the `StatusCallbackEvent`
|
773
|
-
# parameter. If no event is
|
775
|
+
# parameter. If no event is specified, Twilio will send `completed` by default. If
|
774
776
|
# an `ApplicationSid` parameter is present, this parameter is ignored. URLs must
|
775
777
|
# contain a valid hostname (underscores are not permitted).
|
776
778
|
# @param [String] status_callback_method The HTTP method Twilio should use when
|
777
|
-
# requesting the
|
778
|
-
# is present, this parameter is ignored.
|
779
|
+
# requesting the `StatusCallback` URL. Defaults to `POST`. If an `ApplicationSid`
|
780
|
+
# parameter is present, this parameter is ignored.
|
779
781
|
# @return [CallInstance] Updated CallInstance
|
780
782
|
def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, status_callback_method: :unset)
|
781
783
|
context.update(
|