plivo 4.24.0 → 4.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15f859f3b8d4d5c86051c7707f7a0b3519bbccc6
4
- data.tar.gz: 4058af2b93014f1552e30cae972e7f3a30bc4b3b
3
+ metadata.gz: 28692b913ed5944eadc3dc9cb233f821ac357681
4
+ data.tar.gz: 6f4ae15fc412b3eef3c09fe9588e5b65d4e0ccc1
5
5
  SHA512:
6
- metadata.gz: f14e5c137e14abb3775c6aca039e03ec3027688500ea265c33dcb9c3b2bd861b186f19694449f7f758de6632a8ab6cda90844ab424ee219507d7047cdd178647
7
- data.tar.gz: a91d7d11cda391bfc9d5079b2d5ea1d233cdf82c2cb2c7083c33cafb8e9be28d2bdafb59c8671a698b24728efe4a35e001087ee7a43ea7bf7ec172e0b8e43236
6
+ metadata.gz: a63734b4798e92b7cd8805783fd696d884fed366c15707f182da49562f192f600740f11997aa16132aaa5cbc115476cfb995532e310f480834e8e4f078f05722
7
+ data.tar.gz: 8c0564708aceb0ce7d2658fa39075b4c53c2549e3d8f21d3141b66091326551883042c7138eb8c39a0aeb15eb1c28ee93039ddb89011a14c73d2f5a1cc6acf0a
data/CHANGELOG.md CHANGED
@@ -1,4 +1,15 @@
1
1
  # Change Log
2
+ ## [4.26.0](https://github.com/plivo/plivo-ruby/tree/v4.26.0) (2022-03-24)
3
+ **Feature - DialElement**
4
+ - `confirmTimeout` parameter added to [The Dial element](https://www.plivo.com/docs/voice/xml/dial/)
5
+
6
+ ## [4.25.1](https://github.com/plivo/plivo-ruby/tree/v4.25.1) (2022-02-02)
7
+ **Bugfix - Recording**
8
+ - Fix for Start Recording API response issue
9
+
10
+ ## [4.25.0](https://github.com/plivo/plivo-ruby/tree/v4.25.0) (2022-01-27)
11
+ **Features - MPCStartCallRecording**
12
+ - parameter name change from statusCallback to recordingCallback
2
13
 
3
14
  ## [4.24.0](https://github.com/plivo/plivo-ruby/tree/v4.24.0) (2021-12-14)
4
15
  **Features - Voice**
data/README.md CHANGED
@@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'plivo', '>= 4.24.0'
12
+ gem 'plivo', '>= 4.26.0'
13
13
  ```
14
14
 
15
15
  And then execute:
@@ -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
@@ -191,15 +191,15 @@ module Plivo
191
191
  perform_action_apiresponse(nil, 'DELETE', nil, true)
192
192
  end
193
193
 
194
- def start_recording(file_format = 'mp3', status_callback_url = nil, status_callback_method='POST')
194
+ def start_recording(file_format = 'mp3', recording_callback_url = nil, recording_callback_method='POST')
195
195
  valid_param?(:file_format, file_format, String, false , %w[mp3 wav])
196
- valid_url?(:status_callback_url, status_callback_url, false) unless status_callback_url.nil?
197
- valid_param?(:status_callback_method, status_callback_method.upcase,String, false, %w[GET POST])
196
+ valid_url?(:recording_callback_url, recording_callback_url, false) unless recording_callback_url.nil?
197
+ valid_param?(:recording_callback_method, recording_callback_method.upcase,String, false, %w[GET POST])
198
198
 
199
199
  params = {}
200
200
  params[:file_format] = file_format.downcase unless file_format.nil?
201
- params[:status_callback_url] = status_callback_url unless status_callback_url.nil?
202
- params[:status_callback_method] = status_callback_method.upcase unless status_callback_method.nil?
201
+ params[:recording_callback_url] = recording_callback_url unless recording_callback_url.nil?
202
+ params[:recording_callback_method] = recording_callback_method.upcase unless recording_callback_method.nil?
203
203
 
204
204
  perform_action_apiresponse('Record', 'POST', params, true)
205
205
  end
@@ -216,9 +216,9 @@ module Plivo
216
216
  perform_action_apiresponse('Record/Resume', 'POST')
217
217
  end
218
218
 
219
- def start_participant_recording(member_id, file_format='mp3', status_callback_url=nil, status_callback_method='POST')
219
+ def start_participant_recording(member_id, file_format='mp3', recording_callback_url=nil, recording_callback_method='POST')
220
220
  valid_param?(:member_id, member_id, [String, Integer], true)
221
- MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], member_id: member_id).start_participant_recording(file_format, status_callback_url, status_callback_method)
221
+ MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], member_id: member_id).start_participant_recording(file_format, recording_callback_url, recording_callback_method)
222
222
  end
223
223
 
224
224
  def stop_participant_recording(member_id)
@@ -288,15 +288,15 @@ module Plivo
288
288
  configure_secondary_resource_uri
289
289
  end
290
290
 
291
- def start_participant_recording(file_format = 'mp3', status_callback_url = nil, status_callback_method='POST')
291
+ def start_participant_recording(file_format = 'mp3', recording_callback_url = nil, recording_callback_method='POST')
292
292
  valid_param?(:file_format, file_format, String, false , %w[mp3 wav])
293
- valid_url?(:status_callback_url, status_callback_url, false) unless status_callback_url.nil?
294
- valid_param?(:status_callback_method, status_callback_method.upcase,String, false, %w[GET POST])
293
+ valid_url?(:recording_callback_url, recording_callback_url, false) unless recording_callback_url.nil?
294
+ valid_param?(:recording_callback_method, recording_callback_method.upcase,String, false, %w[GET POST])
295
295
 
296
296
  params = {}
297
297
  params[:file_format] = file_format.downcase unless file_format.nil?
298
- params[:status_callback_url] = status_callback_url unless status_callback_url.nil?
299
- params[:status_callback_method] = status_callback_method.upcase unless status_callback_method.nil?
298
+ params[:recording_callback_url] = recording_callback_url unless recording_callback_url.nil?
299
+ params[:recording_callback_method] = recording_callback_method.upcase unless recording_callback_method.nil?
300
300
 
301
301
  perform_action_apiresponse('Record', 'POST', params, true)
302
302
  end
@@ -480,11 +480,11 @@ module Plivo
480
480
  def start_recording(options = {})
481
481
  valid_param?(:options, options, Hash, false)
482
482
  options[:file_format] = 'mp3' unless options.key?(:file_format)
483
- options[:status_callback_method] = 'POST' unless options.key?(:status_callback_method)
483
+ options[:recording_callback_method] = 'POST' unless options.key?(:recording_callback_method)
484
484
  valid_param?(:uuid, options[:uuid], String, false) unless options[:uuid].nil?
485
485
  valid_param?(:friendly_name, options[:friendly_name], String, false) unless options[:friendly_name].nil?
486
486
  mpc_id = make_mpc_id(options[:uuid], options[:friendly_name])
487
- MultiPartyCall.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0]).start_recording(options[:file_format], options[:status_callback_url], options[:status_callback_method])
487
+ MultiPartyCall.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0]).start_recording(options[:file_format], options[:recording_callback_url], options[:recording_callback_method])
488
488
  end
489
489
 
490
490
  def stop_recording(options = {})
@@ -517,12 +517,12 @@ module Plivo
517
517
  raise_invalid_request("Member Id is mandatory")
518
518
  end
519
519
  options[:file_format] = 'mp3' unless options.key?(:file_format)
520
- options[:status_callback_method] = 'POST' unless options.key?(:status_callback_method)
520
+ options[:recording_callback_method] = 'POST' unless options.key?(:recording_callback_method)
521
521
  valid_param?(:member_id, options[:member_id], [String, Integer], true)
522
522
  valid_param?(:uuid, options[:uuid], String, false) unless options[:uuid].nil?
523
523
  valid_param?(:friendly_name, options[:friendly_name], String, false) unless options[:friendly_name].nil?
524
524
  mpc_id = make_mpc_id(options[:uuid], options[:friendly_name])
525
- MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0], member_id: options[:member_id]).start_participant_recording(options[:file_format], options[:status_callback_url], options[:status_callback_method])
525
+ MultiPartyCallParticipant.new(@_client, resource_id: mpc_id[1], multi_party_prefix: mpc_id[0], member_id: options[:member_id]).start_participant_recording(options[:file_format], options[:recording_callback_url], options[:recording_callback_method])
526
526
  end
527
527
 
528
528
  def stop_participant_recording(options = {})
data/lib/plivo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plivo
2
- VERSION = "4.24.0".freeze
2
+ VERSION = "4.26.0".freeze
3
3
  end
@@ -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]
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.24.0
4
+ version: 4.26.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: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2022-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday