From a8da2bb8ffbeccce4c4925a5afbd259f01871391 Mon Sep 17 00:00:00 2001 From: Prashant Pandey Date: Fri, 30 Aug 2024 02:39:18 +0530 Subject: [PATCH] VT-8038: SDK changes for stream xml element keepCallAlive --- CHANGELOG.md | 4 ++++ README.md | 2 +- lib/plivo/version.rb | 2 +- lib/plivo/xml/stream.rb | 6 +++++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b639d12..4f9bad9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [4.60.1](https://github.com/plivo/plivo-ruby/tree/v4.60.1) (2024-09-03) +**Feature - Adding new element for Audio Stream XML ** +- Added `keepCallAlive` element in Audio Stream XML + ## [4.60.0](https://github.com/plivo/plivo-ruby/tree/v4.60.0) (2024-07-11) **Feature - Adding support for Locale param in Create, Get and List Session** - Added new request param `locale` in create Session API diff --git a/README.md b/README.md index 6760631c..da2fe62a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a Add this line to your application's Gemfile: ```ruby -gem 'plivo', '>= 4.60.0' +gem 'plivo', '>= 4.60.1' ``` And then execute: diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index 0d8cdc5c..f1736dd2 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.60.0".freeze + VERSION = "4.60.1".freeze end diff --git a/lib/plivo/xml/stream.rb b/lib/plivo/xml/stream.rb index b4bef209..27aa15dc 100644 --- a/lib/plivo/xml/stream.rb +++ b/lib/plivo/xml/stream.rb @@ -3,11 +3,12 @@ module XML class Stream < Element @nestables = [] @valid_attributes = %w[bidirectional audioTrack streamTimeout statusCallbackUrl - statusCallbackMethod contentType extraHeaders] + statusCallbackMethod contentType extraHeaders keepCallAlive] SUPPORTED_BIDIRECTIONAL=%w(true false) SUPPORTED_AUDIOTRACK=%w(inbound outbound both) SUPPORTED_CALLBACKMETHOD=%w(GET POST) + SUPPORTED_KEEPCALLALIVE=%w(true false) def initialize(body, attributes = {}) if attributes[:bidirectional] && !SUPPORTED_BIDIRECTIONAL.include?(attributes[:bidirectional]) @@ -19,6 +20,9 @@ def initialize(body, attributes = {}) if attributes[:statusCallbackMethod] && !SUPPORTED_CALLBACKMETHOD.include?(attributes[:statusCallbackMethod].upcase) raise PlivoXMLError, " statusCallbackMethod #{attributes[:statusCallbackMethod]} is not valid." end + if attributes[:keepCallAlive] && !SUPPORTED_KEEPCALLALIVE.include?(attributes[:keepCallAlive]) + raise PlivoXMLError, " keepCallAlive #{attributes[:keepCallAlive]} is not valid." + end raise PlivoXMLError, 'No text set for Stream' unless body super(body, attributes) end