plivo 4.25.0 → 4.27.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/plivo/resources/calls.rb +5 -1
- data/lib/plivo/resources/multipartycalls.rb +14 -10
- data/lib/plivo/resources/recordings.rb +14 -1
- data/lib/plivo/version.rb +1 -1
- data/lib/plivo/xml/dial.rb +1 -1
- data/lib/plivo/xml/multipartycall.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ac7974dc26d379831ecc8637397c0cbf43156b5
|
4
|
+
data.tar.gz: 65b7a24f1cba9542117edefd8c19a48fc89e39bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b897b48d2cc18aeccbf0d5a9795fafe5f025d8d7375aad700bcdc05ea9c94a7786db3f667ed37af56df127749f66b3a6039deb90700582b8a536538e34c6278
|
7
|
+
data.tar.gz: 9dcc97d2cb1fe1d6473daf99652a5ec7fec9aaea5c8681b67e7acf4aff56f4261e9496cf096835ae64b79a0bea574e2e51a7c91169797fadbe4a856c6e4cbd20
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [4.27.0](https://github.com/plivo/plivo-ruby/tree/v4.27.0) (2022-05-05)
|
4
|
+
**Feature - List all recordings**
|
5
|
+
- `from_number` and `to_number` added to filter param [List all recordings](https://www.plivo.com/docs/voice/api/recording#list-all-recordings)
|
6
|
+
- `record_min_member_count` param added to [Add a participant to a multiparty call using API](https://www.plivo.com/docs/voice/api/multiparty-call/participants#add-a-participant)
|
7
|
+
|
8
|
+
## [4.26.0](https://github.com/plivo/plivo-ruby/tree/v4.26.0) (2022-03-24)
|
9
|
+
**Feature - DialElement**
|
10
|
+
- `confirmTimeout` parameter added to [The Dial element](https://www.plivo.com/docs/voice/xml/dial/)
|
11
|
+
|
12
|
+
## [4.25.1](https://github.com/plivo/plivo-ruby/tree/v4.25.1) (2022-02-02)
|
13
|
+
**Bugfix - Recording**
|
14
|
+
- Fix for Start Recording API response issue
|
15
|
+
|
3
16
|
## [4.25.0](https://github.com/plivo/plivo-ruby/tree/v4.25.0) (2022-01-27)
|
4
17
|
**Features - MPCStartCallRecording**
|
5
18
|
- parameter name change from statusCallback to recordingCallback
|
data/README.md
CHANGED
@@ -492,7 +492,11 @@ module Plivo
|
|
492
492
|
# @option options [String] :callback_method - The method which is used to invoke the callback_url URL. Defaults to POST.
|
493
493
|
def record(call_uuid, options = nil)
|
494
494
|
valid_param?(:call_uuid, call_uuid, [String, Symbol], true)
|
495
|
-
Call.new(@_client, resource_id: call_uuid).record(options)
|
495
|
+
response = Call.new(@_client, resource_id: call_uuid).record(options)
|
496
|
+
return Base::Response.new(Hash["api_id" => response.api_id,
|
497
|
+
"recording_id" => response.recording_id,
|
498
|
+
"message" => response.message,
|
499
|
+
"url" => response.url])
|
496
500
|
end
|
497
501
|
|
498
502
|
# @param [String] call_uuid
|
@@ -35,6 +35,7 @@ module Plivo
|
|
35
35
|
delay_dial=0,
|
36
36
|
max_duration=14400,
|
37
37
|
max_participants=10,
|
38
|
+
record_min_member_count=1,
|
38
39
|
wait_music_url=nil,
|
39
40
|
wait_music_method='GET',
|
40
41
|
agent_hold_music_url=nil,
|
@@ -95,6 +96,7 @@ module Plivo
|
|
95
96
|
valid_multiple_destination_integers?(:delay_dial, delay_dial)
|
96
97
|
valid_range?(:max_duration, max_duration, false, 300, 28800)
|
97
98
|
valid_range?(:max_participants, max_participants, false, 2, 10)
|
99
|
+
valid_range?(:record_min_member_count, record_min_member_count, false, 1, 2)
|
98
100
|
valid_url?(:wait_music_url, wait_music_url, false ) unless wait_music_url.nil?
|
99
101
|
valid_param?(:wait_music_method, wait_music_method.upcase, String, false , %w[GET POST])
|
100
102
|
valid_url?(:agent_hold_music_url, agent_hold_music_url, false) unless agent_hold_music_url.nil?
|
@@ -128,7 +130,7 @@ module Plivo
|
|
128
130
|
if (to!=nil) && (ring_timeout.is_a?(String)) && (to.split('<').size < ring_timeout.split('<').size)
|
129
131
|
raise_invalid_request("RingTimeout:number of ring_timout(s) should be same as number of destination(s)")
|
130
132
|
end
|
131
|
-
|
133
|
+
|
132
134
|
if (to!=nil) && (delay_dial.is_a?(String)) && (to.split('<').size < delay_dial.split('<').size)
|
133
135
|
raise_invalid_request("Delaydial : number of delay_dial(s) should be same as number of destination(s)")
|
134
136
|
end
|
@@ -150,6 +152,7 @@ module Plivo
|
|
150
152
|
params[:delay_dial] = delay_dial unless delay_dial.nil?
|
151
153
|
params[:max_duration] = max_duration unless max_duration.nil?
|
152
154
|
params[:max_participants] = max_participants unless max_participants.nil?
|
155
|
+
params[:record_min_member_count] = record_min_member_count unless record_min_member_count.nil?
|
153
156
|
params[:wait_music_url] = wait_music_url unless wait_music_url.nil?
|
154
157
|
params[:wait_music_method] = wait_music_method.upcase unless wait_music_method.nil?
|
155
158
|
params[:agent_hold_music_url] = agent_hold_music_url unless agent_hold_music_url.nil?
|
@@ -235,7 +238,7 @@ module Plivo
|
|
235
238
|
valid_param?(:member_id, member_id, [String, Integer], true)
|
236
239
|
MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], member_id: member_id).resume_participant_recording
|
237
240
|
end
|
238
|
-
|
241
|
+
|
239
242
|
def list_participants(call_uuid = nil )
|
240
243
|
valid_param?(:call_uuid, call_uuid, String, false) unless call_uuid.nil?
|
241
244
|
params = {}
|
@@ -405,7 +408,7 @@ module Plivo
|
|
405
408
|
valid_range?(:offset, options[:offset], false, 0)
|
406
409
|
perform_action(nil ,'GET', options ,true )
|
407
410
|
end
|
408
|
-
|
411
|
+
|
409
412
|
def get(options = {})
|
410
413
|
valid_param?(:options, options, Hash, false)
|
411
414
|
valid_param?(:uuid, options[:uuid], String, false) unless options[:uuid].nil?
|
@@ -422,10 +425,11 @@ module Plivo
|
|
422
425
|
options[:call_status_callback_method] = 'POST' unless options.key?(:call_status_callback_method)
|
423
426
|
options[:confirm_key_sound_method] = 'GET' unless options.key?(:confirm_key_sound_method)
|
424
427
|
options[:dial_music] = 'Real' unless options.key?(:dial_music)
|
425
|
-
options[:ring_timeout] = 45 unless options.key?(:ring_timeout)
|
428
|
+
options[:ring_timeout] = 45 unless options.key?(:ring_timeout)
|
426
429
|
options[:delay_dial] = 0 unless options.key?(:delay_dial)
|
427
430
|
options[:max_duration] = 14400 unless options.key?(:max_duration)
|
428
431
|
options[:max_participants] = 10 unless options.key?(:max_participants)
|
432
|
+
options[:record_min_member_count] = 1 unless options.key?(:record_min_member_count)
|
429
433
|
options[:wait_music_method] = 'GET' unless options.key?(:wait_music_method)
|
430
434
|
options[:agent_hold_music_method] = 'GET' unless options.key?(:agent_hold_music_method)
|
431
435
|
options[:customer_hold_music_method] = 'GET' unless options.key?(:customer_hold_music_method)
|
@@ -453,11 +457,11 @@ module Plivo
|
|
453
457
|
mpc_id = make_mpc_id(options[:uuid], options[:friendly_name])
|
454
458
|
|
455
459
|
MultiPartyCall.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0]).add_participant(options[:role],options[:from],options[:to],options[:call_uuid],options[:caller_name],options[:call_status_callback_url],options[:call_status_callback_method],options[:sip_headers],options[:confirm_key],
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
460
|
+
options[:confirm_key_sound_url],options[:confirm_key_sound_method],options[:dial_music],options[:ring_timeout],options[:delay_dial],options[:max_duration], options[:max_participants],options[:record_min_member_count],options[:wait_music_url],
|
461
|
+
options[:wait_music_method],options[:agent_hold_music_url],options[:agent_hold_music_method],options[:customer_hold_music_url],options[:customer_hold_music_method],
|
462
|
+
options[:recording_callback_url],options[:recording_callback_method],options[:status_callback_url],options[:status_callback_method],options[:on_exit_action_url], options[:on_exit_action_method],
|
463
|
+
options[:record],options[:record_file_format],options[:status_callback_events],options[:stay_alone], options[:coach_mode],options[:mute],options[:hold],options[:start_mpc_on_enter],options[:end_mpc_on_exit],
|
464
|
+
options[:relay_dtmf_inputs],options[:enter_sound],options[:enter_sound_method],options[:exit_sound],options[:exit_sound_method], options[:start_recording_audio], options[:start_recording_audio_method],
|
461
465
|
options[:stop_recording_audio], options[:stop_recording_audio_method])
|
462
466
|
end
|
463
467
|
|
@@ -560,7 +564,7 @@ module Plivo
|
|
560
564
|
mpc_id = make_mpc_id(options[:uuid], options[:friendly_name])
|
561
565
|
MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0], member_id: options[:member_id]).resume_participant_recording
|
562
566
|
end
|
563
|
-
|
567
|
+
|
564
568
|
def list_participants(options = {})
|
565
569
|
valid_param?(:options, options, Hash, false)
|
566
570
|
valid_param?(:uuid, options[:uuid], String, false) unless options[:uuid].nil?
|
@@ -26,7 +26,12 @@ module Plivo
|
|
26
26
|
recording_start_ms: @recording_start_ms,
|
27
27
|
recording_type: @recording_type,
|
28
28
|
recording_url: @recording_url,
|
29
|
-
resource_uri: @resource_uri
|
29
|
+
resource_uri: @resource_uri,
|
30
|
+
from_number: @from_number,
|
31
|
+
to_number: @to_number,
|
32
|
+
mpc_name: @mpc_name,
|
33
|
+
conference_uuid: @conference_uuid,
|
34
|
+
mpc_uuid: @mpc_uuid
|
30
35
|
}.to_s
|
31
36
|
end
|
32
37
|
end
|
@@ -43,6 +48,12 @@ module Plivo
|
|
43
48
|
# @param [Hash] options
|
44
49
|
# @option options [String] :subaccount auth_id of the subaccount. Lists only those recordings of the main accounts which are tied to the specified subaccount.
|
45
50
|
# @option options [String] :call_uuid Used to filter recordings for a specific call.
|
51
|
+
# @option options [String] :from_number Used to filter recordings for a specific from_number.
|
52
|
+
# @option options [String] :to_number Used to filter recordings for a specific to_number.
|
53
|
+
# @option options [String] :conference_name Used to filter recordings for a specific conference_name.
|
54
|
+
# @option options [String] :mpc_name Used to filter recordings for a specific mpc_name.
|
55
|
+
# @option options [String] :conference_uuid Used to filter recordings for a specific conference_uuid.
|
56
|
+
# @option options [String] :mpc_uuid Used to filter recordings for a specific mpc_uuid.
|
46
57
|
# @option options [String] :add_time Used to filter out recordings according to the time they were added.The add_time filter is a comparative filter that can be used in the following four forms:
|
47
58
|
# - add_time\__gt: gt stands for greater than. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started after 2012-03-21 11:47, use add_time\__gt=2012-03-21 11:47
|
48
59
|
# - add_time\__gte: gte stands for greater than or equal. The format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. Eg:- To get all recordings that started after or exactly at 2012-03-21 11:47[:30], use add_time\__gte=2012-03-21 11:47[:30]
|
@@ -59,6 +70,8 @@ module Plivo
|
|
59
70
|
params_expected = %i[
|
60
71
|
call_uuid add_time__gt add_time__gte
|
61
72
|
add_time__lt add_time__lte
|
73
|
+
from_number to_number conference_uuid
|
74
|
+
conference_name mpc_name mpc_uuid
|
62
75
|
]
|
63
76
|
|
64
77
|
params_expected.each do |param|
|
data/lib/plivo/version.rb
CHANGED
data/lib/plivo/xml/dial.rb
CHANGED
@@ -3,7 +3,7 @@ module Plivo
|
|
3
3
|
class Dial < Element
|
4
4
|
@nestables = %w[Number User]
|
5
5
|
@valid_attributes = %w[action method timeout hangupOnStar
|
6
|
-
timeLimit callerId callerName confirmSound
|
6
|
+
timeLimit callerId callerName confirmSound confirmTimeout
|
7
7
|
dialMusic confirmKey redirect
|
8
8
|
callbackUrl callbackMethod digitsMatch digitsMatchBLeg
|
9
9
|
sipHeaders]
|
@@ -11,7 +11,7 @@ module Plivo
|
|
11
11
|
enterSound enterSoundMethod exitSound exitSoundMethod
|
12
12
|
onExitActionUrl onExitActionMethod relayDTMFInputs
|
13
13
|
startRecordingAudio startRecordingAudioMethod
|
14
|
-
stopRecordingAudio stopRecordingAudioMethod]
|
14
|
+
stopRecordingAudio stopRecordingAudioMethod recordMinMemberCount]
|
15
15
|
|
16
16
|
VALID_ROLE_VALUES = %w[agent supervisor customer]
|
17
17
|
VALID_METHOD_VALUES = %w[GET POST]
|
@@ -37,6 +37,12 @@ module Plivo
|
|
37
37
|
attributes[:maxParticipants] = 10
|
38
38
|
end
|
39
39
|
|
40
|
+
if attributes[:recordMinMemberCount] && (attributes[:recordMinMemberCount]<1 || attributes[:recordMinMemberCount]>2)
|
41
|
+
raise PlivoXMLError, "invalid attribute value #{attributes[:recordMinMemberCount]} for recordMinMemberCount"
|
42
|
+
elsif !attributes[:recordMinMemberCount]
|
43
|
+
attributes[:recordMinMemberCount] = 1
|
44
|
+
end
|
45
|
+
|
40
46
|
if attributes[:waitMusicMethod] && !VALID_METHOD_VALUES.include?(attributes[:waitMusicMethod].upcase)
|
41
47
|
raise PlivoXMLError, "invalid attribute value #{attributes[:waitMusicMethod]} for waitMusicMethod"
|
42
48
|
elsif !attributes[:waitMusicMethod]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plivo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.27.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Plivo SDKs Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|